{"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/imagenet-21k-pretraining-for-the-masses","title":"ImageNet-21K Pretraining for the Masses","arxiv_id":"2104.10972","date":"2021-04-22","proceeding":null,"authors":["Tal Ridnik","Emanuel Ben-Baruch","Asaf Noy","Lihi Zelnik-Manor"],"abstract":"ImageNet-1K serves as the primary dataset for pretraining deep learning models for computer vision tasks. ImageNet-21K dataset, which is bigger and more diverse, is used less frequently for pretraining, mainly due to its complexity, low accessibility, and underestimation of its added value. This paper aims to close this gap, and make high-quality efficient pretraining on ImageNet-21K available for everyone. Via a dedicated preprocessing stage, utilization of WordNet hierarchical structure, and a novel training scheme called semantic softmax, we show that various models significantly benefit from ImageNet-21K pretraining on numerous datasets and tasks, including small mobile-oriented models. We also show that we outperform previous ImageNet-21K pretraining schemes for prominent new models like ViT and Mixer. Our proposed pretraining pipeline is efficient, accessible, and leads to SoTA reproducible results, from a publicly available dataset. The training code and pretrained models are available at: https://github.com/Alibaba-MIIL/ImageNet21K","url_abs":"https://arxiv.org/abs/2104.10972v4","url_pdf":"https://arxiv.org/pdf/2104.10972v4.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":"imagenet-21k-pretraining-for-the-masses","repo_url":"https://github.com/Alibaba-MIIL/ImageNet21K","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"imagenet-21k-pretraining-for-the-masses","repo_url":"https://github.com/YutingLi0606/SURE","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"imagenet-21k-pretraining-for-the-masses","repo_url":"https://github.com/encounter1997/fp-detr","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"imagenet-21k-pretraining-for-the-masses","repo_url":"https://github.com/gregorbachmann/scaling_mlps","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"imagenet-21k-pretraining-for-the-masses","repo_url":"https://github.com/MS-Mind/MS-Code-01/tree/main/mass","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":{"status":"ok"}}],"tasks":[{"task_slug":"action-recognition-in-videos","task_name":"Action Recognition"},{"task_slug":"fine-grained-image-classification","task_name":"Fine-Grained Image Classification"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"multi-label-classification","task_name":"Multi-Label Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-classification-on-cifar-100","task":"Image Classification","dataset":"CIFAR-100","model":"ViT-B-16 (ImageNet-21K-P pretrain)","rank_in_archive_order":4,"of":211,"metrics":{"Percentage correct":"94.2"},"uses_additional_data":true},{"leaderboard":"/sota/image-classification-on-stanford-cars","task":"Image Classification","dataset":"Stanford Cars","model":"TResNet-L-V2","rank_in_archive_order":2,"of":24,"metrics":{"Accuracy":"96.32"},"uses_additional_data":false},{"leaderboard":"/sota/multi-label-classification-on-ms-coco","task":"Multi-Label Classification","dataset":"MS-COCO","model":"TResNet-L-V2, (ImageNet-21K-P pretraining, resolution 640)","rank_in_archive_order":13,"of":34,"metrics":{"mAP":"89.8"},"uses_additional_data":false},{"leaderboard":"/sota/multi-label-classification-on-ms-coco","task":"Multi-Label Classification","dataset":"MS-COCO","model":"TResNet-L-V2, (ImageNet-21K-P pretraining, resolution 448)","rank_in_archive_order":16,"of":34,"metrics":{"mAP":"88.4"},"uses_additional_data":false},{"leaderboard":"/sota/multi-label-classification-on-pascal-voc-2007","task":"Multi-Label Classification","dataset":"PASCAL VOC 2007","model":"ViT-B-16 (ImageNet-21K pretrained)","rank_in_archive_order":16,"of":17,"metrics":{"mAP":"93.1"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2104.10972","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2104.10972"}},"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":"deterministic:regex_extraction","url":"https://github.com/Alibaba-MIIL/ImageNet21K","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/YutingLi0606/SURE","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MS-Mind/MS-Code-01/tree/main/mass","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/encounter1997/fp-detr","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gregorbachmann/scaling_mlps","reach":{"status":"ok"}}],"summary":{"ran":1,"unverified":1},"by_repo_kind":{"official":{"samples":2,"ran":1,"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":"fa1eb87122247e2f","entry":"to_ddp","repo":"Alibaba-MIIL/ImageNet21K","repo_kind":"official","path":"src_files/helper_functions/distributed.py","file_url":"https://github.com/Alibaba-MIIL/ImageNet21K/blob/HEAD/src_files/helper_functions/distributed.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fa1eb87122247e2f"}},{"code_sha256_prefix":"14265d790751cfed","entry":"reduce_tensor","repo":"Alibaba-MIIL/ImageNet21K","repo_kind":"official","path":"src_files/helper_functions/distributed.py","file_url":"https://github.com/Alibaba-MIIL/ImageNet21K/blob/HEAD/src_files/helper_functions/distributed.py","link_basis":"plan_row","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":"14265d790751cfed"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}