{"id":13737706,"url":"https://github.com/salesforce/MUST","last_synced_at":"2025-05-08T15:31:03.407Z","repository":{"id":37688271,"uuid":"495611295","full_name":"salesforce/MUST","owner":"salesforce","description":"PyTorch code for MUST","archived":false,"fork":false,"pushed_at":"2023-03-08T07:25:18.000Z","size":1393,"stargazers_count":104,"open_issues_count":8,"forks_count":12,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-08T13:21:11.739Z","etag":null,"topics":["clip","masked-image-modeling","self-training","unsupervised-learning","zero-shot-classification","zero-shot-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salesforce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null}},"created_at":"2022-05-24T00:05:36.000Z","updated_at":"2024-10-22T09:17:40.000Z","dependencies_parsed_at":"2023-09-24T16:57:13.313Z","dependency_job_id":null,"html_url":"https://github.com/salesforce/MUST","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.375,"last_synced_commit":"1e0f84eb77ed0a3e57f3c14e67e987bccf5212c7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FMUST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FMUST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FMUST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FMUST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salesforce","download_url":"https://codeload.github.com/salesforce/MUST/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224742260,"owners_count":17362229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clip","masked-image-modeling","self-training","unsupervised-learning","zero-shot-classification","zero-shot-learning"],"created_at":"2024-08-03T03:01:57.894Z","updated_at":"2024-11-15T06:30:49.634Z","avatar_url":"https://github.com/salesforce.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Masked Unsupervised Self-training for Zero-shot Image Classification \nThis is the PyTorch code of the [MUST paper](https://arxiv.org/abs/2206.02967). The repository supports finetuning a CLIP model on unlabeled images from a target domain.\n\n### Requirements\n* pytorch 1.10.0\n* timm 0.4.12\n* tensorboardX\n* ftfy\n\n### Dataset Setup\nDataset paths are stored in [dataset_catalog.json](https://github.com/salesforce/MUST/blob/main/dataset_catalog.json), which need to be modified to local paths. The imagenet dataset follows the standard folder structure. For other datasets, please refer to the scrips from [VISSL](https://github.com/facebookresearch/vissl/tree/main/extra_scripts/datasets) to download and prepare. CLIP's labels and prompt templates are stored in [classes.json](https://github.com/salesforce/MUST/blob/main/classes.json) and [templates.json](https://github.com/salesforce/MUST/blob/main/templates.json).\n\n### Training\nRun the following code on 16 A100 GPUs:\n\u003cpre\u003epython -m torch.distributed.run --nproc_per_node=16 train.py --dataset [name_of_dataset] --clip_model ViT-B/16 \u003c/pre\u003e\n\n### Results\nViT-B/16:\nMethod | ImageNet | SUN397 | Food101 | GTSRB | DTD | UCF101 \n--- | :---: | :---: | :---: | :---: | :---: | :---:\nCLIP | 68.3 | 64.4 | 88.7 | 43.4 | 44.7 | 68.8\nMUST | 77.7 | 71.8 | 92.7 | 65.5 | 54.1 | 81.1 \n\nViT-L/14:\nMethod | ImageNet | SUN397 | Food101 | GTSRB | DTD | UCF101 \n--- | :---: | :---: | :---: | :---: | :---: | :---:\nCLIP | 75.5 | 67.4 | 92.9 | 50.6 | 55.4 | 77.0\nMUST | 82.1 | 74.6 | 95.3 | 68.7 | 62.6 | 85.7 \n\n### Citation\n\u003cpre\u003e\n@inproceedings{li2022masked,\n      title={Masked Unsupervised Self-training for Label-Free Image Classification}, \n      author={Junnan Li and Silvio Savarese and Steven C. H. Hoi},\n      year={2023},\n      booktitle={ICLR},\n}\n\u003c/pre\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforce%2FMUST","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalesforce%2FMUST","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforce%2FMUST/lists"}