{"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/chinese-clip-contrastive-vision-language","title":"Chinese CLIP: Contrastive Vision-Language Pretraining in Chinese","arxiv_id":"2211.01335","date":"2022-11-02","proceeding":null,"authors":["An Yang","Junshu Pan","Junyang Lin","Rui Men","Yichang Zhang","Jingren Zhou","Chang Zhou"],"abstract":"The tremendous success of CLIP (Radford et al., 2021) has promoted the research and application of contrastive learning for vision-language pretraining. In this work, we construct a large-scale dataset of image-text pairs in Chinese, where most data are retrieved from publicly available datasets, and we pretrain Chinese CLIP models on the new dataset. We develop 5 Chinese CLIP models of multiple sizes, spanning from 77 to 958 million parameters. Furthermore, we propose a two-stage pretraining method, where the model is first trained with the image encoder frozen and then trained with all parameters being optimized, to achieve enhanced model performance. Our comprehensive experiments demonstrate that Chinese CLIP can achieve the state-of-the-art performance on MUGE, Flickr30K-CN, and COCO-CN in the setups of zero-shot learning and finetuning, and it is able to achieve competitive performance in zero-shot image classification based on the evaluation on the ELEVATER benchmark (Li et al., 2022). We have released our codes, models, and demos in https://github.com/OFA-Sys/Chinese-CLIP","url_abs":"https://arxiv.org/abs/2211.01335v3","url_pdf":"https://arxiv.org/pdf/2211.01335v3.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":"chinese-clip-contrastive-vision-language","repo_url":"https://github.com/ofa-sys/chinese-clip","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"contrastive-learning","task_name":"Contrastive Learning"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"image-retrieval","task_name":"Image Retrieval"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"retrieval","task_name":"Retrieval"},{"task_slug":"zero-shot-image-classification","task_name":"Zero-Shot Image Classification"},{"task_slug":"zero-shot-learning","task_name":"Zero-Shot Learning"},{"task_slug":"zero-shot-image-retrieval","task_name":"Zero-shot Image Retrieval"},{"task_slug":"zero-shot-text-retrieval","task_name":"Zero-shot Text Retrieval"},{"task_slug":"zero-shot-text-to-image-retrieval","task_name":"Zero-shot Text-to-Image Retrieval"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[{"method_slug":"clip","method_name":"CLIP"},{"method_slug":"contrastive-learning","method_name":"Contrastive Learning"}],"datasets_introduced":[{"slug":"imagenet-cn","name":"ImageNet_CN","full_name":"Chinese ImageNet Classification"}],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-retrieval-on-coco-cn","task":"Image Retrieval","dataset":"COCO-CN","model":"CN-CLIP (ViT-H/14)","rank_in_archive_order":1,"of":9,"metrics":{"R@1":"81.5","R@10":"99.1","R@5":"96.9"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-coco-cn","task":"Image Retrieval","dataset":"COCO-CN","model":"CN-CLIP (ViT-L/14@336px)","rank_in_archive_order":2,"of":9,"metrics":{"R@1":"80.1","R@10":"99.2","R@5":"96.7"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-coco-cn","task":"Image Retrieval","dataset":"COCO-CN","model":"CN-CLIP (ViT-L/14)","rank_in_archive_order":4,"of":9,"metrics":{"R@1":"78.9","R@10":"99.0","R@5":"96.3"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-coco-cn","task":"Image Retrieval","dataset":"COCO-CN","model":"CN-CLIP (ViT-B/16)","rank_in_archive_order":5,"of":9,"metrics":{"R@1":"77.0","R@10":"99.0","R@5":"97.1"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-coco-cn","task":"Image Retrieval","dataset":"COCO-CN","model":"CN-CLIP (RN50)","rank_in_archive_order":9,"of":9,"metrics":{"R@1":"66.8","R@10":"97.0","R@5":"91.1"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-flickr30k-cn","task":"Image Retrieval","dataset":"Flickr30k-CN","model":"CN-CLIP (ViT-L/14@336px)","rank_in_archive_order":3,"of":11,"metrics":{"R@1":"84.4","R@10":"98.7","R@5":"97.1"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-flickr30k-cn","task":"Image Retrieval","dataset":"Flickr30k-CN","model":"CN-CLIP (ViT-H/14)","rank_in_archive_order":5,"of":11,"metrics":{"R@1":"83.8","R@10":"98.6","R@5":"96.9"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-flickr30k-cn","task":"Image Retrieval","dataset":"Flickr30k-CN","model":"CN-CLIP (ViT-L/14)","rank_in_archive_order":6,"of":11,"metrics":{"R@1":"82.7","R@10":"98.6","R@5":"96.7"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-flickr30k-cn","task":"Image Retrieval","dataset":"Flickr30k-CN","model":"CN-CLIP (ViT-B/16)","rank_in_archive_order":7,"of":11,"metrics":{"R@1":"79.1","R@10":"97.4","R@5":"94.8"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-flickr30k-cn","task":"Image Retrieval","dataset":"Flickr30k-CN","model":"CN-CLIP (RN50)","rank_in_archive_order":11,"of":11,"metrics":{"R@1":"66.7","R@10":"94.1","R@5":"89.4"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-muge-retrieval","task":"Image Retrieval","dataset":"MUGE Retrieval","model":"CN-CLIP (ViT-H/14)","rank_in_archive_order":1,"of":9,"metrics":{"Mean Recall":"83.6","R@1":"68.9","R@10":"93.1","R@5":"88.7"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-muge-retrieval","task":"Image Retrieval","dataset":"MUGE Retrieval","model":"CN-CLIP (ViT-L/14@336px)","rank_in_archive_order":2,"of":9,"metrics":{"Mean Recall":"81.3","R@1":"65.3","R@10":"92.1","R@5":"86.7"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-muge-retrieval","task":"Image Retrieval","dataset":"MUGE Retrieval","model":"CN-CLIP (ViT-L/14)","rank_in_archive_order":3,"of":9,"metrics":{"Mean Recall":"80.1","R@1":"63.3","R@10":"91.3","R@5":"85.6"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-muge-retrieval","task":"Image Retrieval","dataset":"MUGE Retrieval","model":"CN-CLIP (ViT-B/16)","rank_in_archive_order":5,"of":9,"metrics":{"Mean Recall":"77.4","R@1":"58.4","R@10":"90.0","R@5":"83.6"},"uses_additional_data":false},{"leaderboard":"/sota/image-retrieval-on-muge-retrieval","task":"Image Retrieval","dataset":"MUGE Retrieval","model":"CN-CLIP (RN50)","rank_in_archive_order":7,"of":9,"metrics":{"Mean Recall":"69.2","R@1":"48.6","R@10":"84.0","R@5":"75.1"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2211.01335","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.01335"}},"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/ofa-sys/chinese-clip","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":2,"ran_honours":2,"unverified":3},"by_repo_kind":{"official":{"samples":7,"ran":4,"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":0,"samples":[{"code_sha256_prefix":"0f786c407fb1ee4c","entry":"swish","repo":"ofa-sys/chinese-clip","repo_kind":"official","path":"cn_clip/clip/modeling_bert.py","file_url":"https://github.com/ofa-sys/chinese-clip/blob/HEAD/cn_clip/clip/modeling_bert.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0f786c407fb1ee4c"}},{"code_sha256_prefix":"1923fc05163d207d","entry":"convert_to_unicode","repo":"ofa-sys/chinese-clip","repo_kind":"official","path":"cn_clip/clip/bert_tokenizer.py","file_url":"https://github.com/ofa-sys/chinese-clip/blob/HEAD/cn_clip/clip/bert_tokenizer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1923fc05163d207d"}},{"code_sha256_prefix":"211753ba29188d4e","entry":"gelu","repo":"ofa-sys/chinese-clip","repo_kind":"official","path":"cn_clip/clip/modeling_bert.py","file_url":"https://github.com/ofa-sys/chinese-clip/blob/HEAD/cn_clip/clip/modeling_bert.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"211753ba29188d4e"}},{"code_sha256_prefix":"77601724cad03f95","entry":"gelu_new","repo":"ofa-sys/chinese-clip","repo_kind":"official","path":"cn_clip/clip/modeling_bert.py","file_url":"https://github.com/ofa-sys/chinese-clip/blob/HEAD/cn_clip/clip/modeling_bert.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"77601724cad03f95"}},{"code_sha256_prefix":"650bf97faab74187","entry":"convert_state_dict","repo":"ofa-sys/chinese-clip","repo_kind":"official","path":"cn_clip/clip/model.py","file_url":"https://github.com/ofa-sys/chinese-clip/blob/HEAD/cn_clip/clip/model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"650bf97faab74187"}},{"code_sha256_prefix":"aaf1cb2c01043065","entry":"load_vocab","repo":"ofa-sys/chinese-clip","repo_kind":"official","path":"cn_clip/clip/bert_tokenizer.py","file_url":"https://github.com/ofa-sys/chinese-clip/blob/HEAD/cn_clip/clip/bert_tokenizer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aaf1cb2c01043065"}},{"code_sha256_prefix":"0e5615f8994003cf","entry":"printable_text","repo":"ofa-sys/chinese-clip","repo_kind":"official","path":"cn_clip/clip/bert_tokenizer.py","file_url":"https://github.com/ofa-sys/chinese-clip/blob/HEAD/cn_clip/clip/bert_tokenizer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0e5615f8994003cf"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}