{"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/meacap-memory-augmented-zero-shot-image","title":"MeaCap: Memory-Augmented Zero-shot Image Captioning","arxiv_id":"2403.03715","date":"2024-03-06","proceeding":"CVPR 2024 1","authors":["Zequn Zeng","Yan Xie","Hao Zhang","Chiyu Chen","Zhengjue Wang","Bo Chen"],"abstract":"Zero-shot image captioning (IC) without well-paired image-text data can be divided into two categories, training-free and text-only-training. Generally, these two types of methods realize zero-shot IC by integrating pretrained vision-language models like CLIP for image-text similarity evaluation and a pre-trained language model (LM) for caption generation. The main difference between them is whether using a textual corpus to train the LM. Though achieving attractive performance w.r.t. some metrics, existing methods often exhibit some common drawbacks. Training-free methods tend to produce hallucinations, while text-only-training often lose generalization capability. To move forward, in this paper, we propose a novel Memory-Augmented zero-shot image Captioning framework (MeaCap). Specifically, equipped with a textual memory, we introduce a retrieve-then-filter module to get key concepts that are highly related to the image. By deploying our proposed memory-augmented visual-related fusion score in a keywords-to-sentence LM, MeaCap can generate concept-centered captions that keep high consistency with the image with fewer hallucinations and more world-knowledge. The framework of MeaCap achieves the state-of-the-art performance on a series of zero-shot IC settings. Our code is available at https://github.com/joeyz0z/MeaCap.","url_abs":"https://arxiv.org/abs/2403.03715v1","url_pdf":"https://arxiv.org/pdf/2403.03715v1.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":"meacap-memory-augmented-zero-shot-image","repo_url":"https://github.com/joeyz0z/meacap","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"caption-generation","task_name":"Caption Generation"},{"task_slug":"image-captioning","task_name":"Image Captioning"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"world-knowledge","task_name":"World Knowledge"},{"task_slug":"text-similarity","task_name":"text similarity"}],"methods":[{"method_slug":"clip","method_name":"CLIP"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.03715","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.03715"}},"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/joeyz0z/meacap","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/joeyz0z/MeaCap","reach":{"status":"ok"}}],"summary":{"ran":4,"ran_fixture":2,"unverified":4},"by_repo_kind":{"official":{"samples":10,"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":10,"samples":[{"code_sha256_prefix":"e5642d3fd6e24304","entry":"BARTDataset","repo":"joeyz0z/MeaCap","repo_kind":"official","path":"models/main_CLIPe.py","file_url":"https://github.com/joeyz0z/MeaCap/blob/HEAD/models/main_CLIPe.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e5642d3fd6e24304"}},{"code_sha256_prefix":"f39a0b36cce201d2","entry":"enforce_repetition_penalty_parallel","repo":"joeyz0z/MeaCap","repo_kind":"official","path":"models/main_CLIPe.py","file_url":"https://github.com/joeyz0z/MeaCap/blob/HEAD/models/main_CLIPe.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f39a0b36cce201d2"}},{"code_sha256_prefix":"38b19fe2fa7391c9","entry":"filter_relation","repo":"joeyz0z/meacap","repo_kind":"official","path":"models/model_utils.py","file_url":"https://github.com/joeyz0z/meacap/blob/HEAD/models/model_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"38b19fe2fa7391c9"}},{"code_sha256_prefix":"67b9c6bc431fc39b","entry":"get_encoder_labels","repo":"joeyz0z/MeaCap","repo_kind":"official","path":"models/main_CLIPe.py","file_url":"https://github.com/joeyz0z/MeaCap/blob/HEAD/models/main_CLIPe.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"67b9c6bc431fc39b"}},{"code_sha256_prefix":"76142d97b7ca58f8","entry":"merge_graph_dict","repo":"joeyz0z/meacap","repo_kind":"official","path":"models/model_utils.py","file_url":"https://github.com/joeyz0z/meacap/blob/HEAD/models/model_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"76142d97b7ca58f8"}},{"code_sha256_prefix":"0f73f0facaae17cf","entry":"merge_sim_entities","repo":"joeyz0z/meacap","repo_kind":"official","path":"models/model_utils.py","file_url":"https://github.com/joeyz0z/meacap/blob/HEAD/models/model_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0f73f0facaae17cf"}},{"code_sha256_prefix":"c6ae5ad6d6d1cdac","entry":"_generate_no_beam_search_parallel","repo":"joeyz0z/MeaCap","repo_kind":"official","path":"models/main_CLIPe.py","file_url":"https://github.com/joeyz0z/MeaCap/blob/HEAD/models/main_CLIPe.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c6ae5ad6d6d1cdac"}},{"code_sha256_prefix":"d462a2b62d3796e1","entry":"conzic_sample_function","repo":"joeyz0z/MeaCap","repo_kind":"official","path":"models/main_CLIPe.py","file_url":"https://github.com/joeyz0z/MeaCap/blob/HEAD/models/main_CLIPe.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d462a2b62d3796e1"}},{"code_sha256_prefix":"03d9a31b0921cfac","entry":"generate_function","repo":"joeyz0z/MeaCap","repo_kind":"official","path":"models/main_CLIPe.py","file_url":"https://github.com/joeyz0z/MeaCap/blob/HEAD/models/main_CLIPe.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"03d9a31b0921cfac"}},{"code_sha256_prefix":"1531747d9b0129e6","entry":"generate_step_parallel","repo":"joeyz0z/MeaCap","repo_kind":"official","path":"models/main_CLIPe.py","file_url":"https://github.com/joeyz0z/MeaCap/blob/HEAD/models/main_CLIPe.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1531747d9b0129e6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}