{"id":13737621,"url":"https://github.com/salesforce/MoPro","last_synced_at":"2025-05-08T14:33:11.625Z","repository":{"id":40624585,"uuid":"293913808","full_name":"salesforce/MoPro","owner":"salesforce","description":"MoPro: Webly Supervised Learning","archived":false,"fork":false,"pushed_at":"2021-03-03T01:34:34.000Z","size":616,"stargazers_count":87,"open_issues_count":0,"forks_count":8,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-16T03:08:37.771Z","etag":null,"topics":["noisy-labels","representation-learning","weakly-supervised-learning","webly-supervised-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-08T19:57:23.000Z","updated_at":"2024-11-22T12:59:14.000Z","dependencies_parsed_at":"2022-09-23T17:12:44.479Z","dependency_job_id":null,"html_url":"https://github.com/salesforce/MoPro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FMoPro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FMoPro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FMoPro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salesforce%2FMoPro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salesforce","download_url":"https://codeload.github.com/salesforce/MoPro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253085776,"owners_count":21851699,"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":["noisy-labels","representation-learning","weakly-supervised-learning","webly-supervised-learning"],"created_at":"2024-08-03T03:01:55.239Z","updated_at":"2025-05-08T14:33:07.481Z","avatar_url":"https://github.com/salesforce.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## MoPro: Webly Supervised Learning with Momentum Prototypes (Salesforce Research)\n\u003cimg src=\"./img/blog.png\" width=\"600\"\u003e\n\nThis is a PyTorch implementation of the \u003ca href=\"https://openreview.net/forum?id=0-EYBhgw80y\"\u003eMoPro paper\u003c/a\u003e (\u003ca href=\"https://blog.einstein.ai/mopro-webly-supervised-learning-with-momentum-prototypes/\"\u003eBlog post\u003c/a\u003e):\n\u003cpre\u003e\n@article{MoPro,\n\ttitle={MoPro: Webly Supervised Learning with Momentum Prototypes},\n\tauthor={Junnan Li and Caiming Xiong and Steven C.H. Hoi},\n\tjournal={ICLR},\n\tyear={2021}\n}\u003c/pre\u003e\n\n\n### Requirements:\n* \u003ca href=\"https://data.vision.ee.ethz.ch/cvl/webvision/download.html\"\u003eWebVision dataset\u003c/a\u003e\n* ImageNet dataset (for evaluation)\n* Python ≥ 3.6\n* PyTorch ≥ 1.4\n\n\n### Training\nThis implementation currently only supports multi-gpu, DistributedDataParallel training, which is faster and simpler.\n\nTo perform webly-supervised training of a ResNet-50 model on WebVision V1.0 using a 4-gpu or 8-gpu machine, run: \n\u003cpre\u003epython train.py \\ \n  --data [WebVision folder] \\ \n  --exp-dir experiment/MoPro\\\n  --dist-url 'tcp://localhost:10001' --multiprocessing-distributed --world-size 1 --rank 0\n\u003c/pre\u003e\n\n\n### Download MoPro Pre-trained ResNet-50 Models\n\u003ca href=\"https://storage.googleapis.com/sfr-pcl-data-research/MoPro_checkpoint/MoPro_V1_epoch90.tar\"\u003eWebVision V1\u003c/a\u003e| \u003ca href=\"https://storage.googleapis.com/sfr-pcl-data-research/MoPro_checkpoint/MoPro_V2_epoch90.tar\"\u003eWebVision v2\u003c/a\u003e\n------ | ------\n\n\n### Noise Cleaning\n\u003cpre\u003epython noise_cleaning.py --data [WebVision folder] --resume [pre-trained model path] --annotation pseudo_label.json\n\u003c/pre\u003e\n\n\n### Classifier Retraining on WebVision\n\u003cpre\u003epython classifier_retrain.py --data [WebVision folder] --imagenet [ImageNet folder]\\ \n  --resume [pre-trained model path] --annotation pseudo_label.json --exp-dir experiment/cRT\\\n  --dist-url 'tcp://localhost:10001' --multiprocessing-distributed --world-size 1 --rank 0 \n\u003c/pre\u003e\n\n### Fine-tuning on ImageNet (1% of labeled data)\n\u003cpre\u003epython finetune_imagenet.py \\\n  --data [ImageNet path] \\\n  --model-path [pre-trained model path] \\\n  --exp-dir experiment/Finetune \\\n  --low-resource 0.01 \\\n  --dist-url 'tcp://localhost:10001' --multiprocessing-distributed --world-size 1 --rank 0 \n\u003c/pre\u003e\n\nResult for WebVision-V1 pre-trained model: \nPercentage | 1% | 10% \n------ | ------ | ------\nAccuracy | 71.2 | 74.8 \n\n\n### Linear SVM Evaluation on VOC or Places\n\u003cpre\u003epython lowshot_svm.py --model_path [your pretrained model] --dataset VOC --voc-path [VOC data path]\n\u003c/pre\u003e\n\nResult for WebVision-V1 pre-trained model: \nVOC| k=1 | k=2 | k=4 | k=8 | k=16\n--- | --- | --- | --- | --- | --- \nmAP| 59.5| 71.3| 76.5| 81.4| 83.7\n\nPlaces| k=1 | k=2 | k=4 | k=8 | k=16\n--- | --- | --- | --- | --- | --- \nAcc| 16.9| 23.2| 29.2| 34.5| 38.7\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforce%2FMoPro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalesforce%2FMoPro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalesforce%2FMoPro/lists"}