{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/subobject-level-image-tokenization","title":"Subobject-level Image Tokenization","arxiv_id":"2402.14327","date":"2024-02-22","proceeding":null,"authors":["Delong Chen","Samuel Cahyawijaya","Jianfeng Liu","Baoyuan Wang","Pascale Fung"],"abstract":"Transformer-based vision models typically tokenize images into fixed-size square patches as input units, which lacks the adaptability to image content and overlooks the inherent pixel grouping structure. Inspired by the subword tokenization widely adopted in language models, we propose an image tokenizer at a subobject level, where the subobjects are represented by semantically meaningful image segments obtained by segmentation models (e.g., segment anything models). To implement a learning system based on subobject tokenization, we first introduced a Direct Segment Anything Model (DirectSAM) that efficiently produces comprehensive segmentation of subobjects, then embed subobjects into compact latent vectors and fed them into a large language model for vision language learning. Empirical results demonstrated that our subobject-level tokenization significantly facilitates efficient learning of translating images into object and attribute descriptions compared to the traditional patch-level tokenization. Codes and models are open-sourced at https://github.com/ChenDelong1999/subobjects.","url_abs":"https://arxiv.org/abs/2402.14327v2","url_pdf":"https://arxiv.org/pdf/2402.14327v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"subobject-level-image-tokenization","repo_url":"https://github.com/chendelong1999/subobjects","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"task_slug":"segmentation","task_name":"Segmentation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.14327","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.14327"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/chendelong1999/subobjects","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":6,"unverified":1},"by_repo_kind":{"official":{"samples":7,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":7,"samples":[{"code_sha256_prefix":"0cc83d8733e07d10","entry":"annotation_to_label","repo":"chendelong1999/subobjects","repo_kind":"official","path":"DirectSAM/trainer.py","file_url":"https://github.com/chendelong1999/subobjects/blob/HEAD/DirectSAM/trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"0cc83d8733e07d10"}},{"code_sha256_prefix":"baf61157f9a6d984","entry":"boundary_zero_padding","repo":"chendelong1999/subobjects","repo_kind":"official","path":"DirectSAM/utils.py","file_url":"https://github.com/chendelong1999/subobjects/blob/HEAD/DirectSAM/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"baf61157f9a6d984"}},{"code_sha256_prefix":"9fefaccd0689ff5c","entry":"generate_crop_boxes","repo":"chendelong1999/subobjects","repo_kind":"official","path":"DirectSAM/utils.py","file_url":"https://github.com/chendelong1999/subobjects/blob/HEAD/DirectSAM/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"9fefaccd0689ff5c"}},{"code_sha256_prefix":"b9bf08acc21d821f","entry":"inference_single_image","repo":"chendelong1999/subobjects","repo_kind":"official","path":"DirectSAM/utils.py","file_url":"https://github.com/chendelong1999/subobjects/blob/HEAD/DirectSAM/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"b9bf08acc21d821f"}},{"code_sha256_prefix":"ebbd4f94e6639d26","entry":"label_map_to_random_rgb","repo":"chendelong1999/subobjects","repo_kind":"official","path":"subobjects/utils/visualizer.py","file_url":"https://github.com/chendelong1999/subobjects/blob/HEAD/subobjects/utils/visualizer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"ebbd4f94e6639d26"}},{"code_sha256_prefix":"c81ae6c0506ee819","entry":"visualize_masks","repo":"chendelong1999/subobjects","repo_kind":"official","path":"subobjects/utils/visualizer.py","file_url":"https://github.com/chendelong1999/subobjects/blob/HEAD/subobjects/utils/visualizer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"c81ae6c0506ee819"}},{"code_sha256_prefix":"95c26d9e3381c9b3","entry":"transforms","repo":"chendelong1999/subobjects","repo_kind":"official","path":"DirectSAM/trainer.py","file_url":"https://github.com/chendelong1999/subobjects/blob/HEAD/DirectSAM/trainer.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"95c26d9e3381c9b3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}