{"id":28100717,"url":"https://github.com/mit-han-lab/amc-models","last_synced_at":"2025-05-13T18:38:27.954Z","repository":{"id":99376251,"uuid":"180045005","full_name":"mit-han-lab/amc-models","owner":"mit-han-lab","description":"[ECCV 2018] AMC: AutoML for Model Compression and Acceleration on Mobile Devices","archived":false,"fork":false,"pushed_at":"2021-02-26T02:45:26.000Z","size":38,"stargazers_count":164,"open_issues_count":0,"forks_count":27,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-03-26T08:34:16.216Z","etag":null,"topics":["automl","efficient-model","model-compression","on-device-ai"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1802.03494","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mit-han-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-04-08T01:10:18.000Z","updated_at":"2024-01-04T16:32:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"f8f05c61-cc42-4864-8244-40b09767f824","html_url":"https://github.com/mit-han-lab/amc-models","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/mit-han-lab%2Famc-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-han-lab%2Famc-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-han-lab%2Famc-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mit-han-lab%2Famc-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mit-han-lab","download_url":"https://codeload.github.com/mit-han-lab/amc-models/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254004839,"owners_count":21998136,"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":["automl","efficient-model","model-compression","on-device-ai"],"created_at":"2025-05-13T18:38:27.297Z","updated_at":"2025-05-13T18:38:27.896Z","avatar_url":"https://github.com/mit-han-lab.png","language":"Python","readme":"# AMC Compressed Models\n\nThis repo contains some of the compressed models from paper **AMC: AutoML for Model Compression and Acceleration on Mobile Devices (ECCV18)**.\n\n## Reference\n\nIf you find the models useful, please kindly cite our paper:\n\n```\n@inproceedings{he2018amc,\n  title={AMC: AutoML for Model Compression and Acceleration on Mobile Devices},\n  author={He, Yihui and Lin, Ji and Liu, Zhijian and Wang, Hanrui and Li, Li-Jia and Han, Song},\n  booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},\n  pages={784--800},\n  year={2018}\n}\n```\n\n## Download the Pretrained Models\n\nFirstly, download the pretrained models from [here](https://drive.google.com/drive/folders/1w_1OyKuoj8JciwKPFNvztSmAqEEwPFlA?usp=sharing) and put it in `./checkpoints`.\n\n## Models\n\n### Compressed MobileNets\n\nWe provide compressed MobileNetV1 by **50% FLOPs** and **50% Inference time**, and also compressed MobileNetV2 by **70% FLOPs**, with PyTorch. The comparison with vanila models as follows:\n\n| Models                   | Top1 Acc (%) | Top5 Acc (%) | Latency (ms) | MACs (M) |\n| ------------------------ | ------------ | ------------ | ------------ | -------- |\n| MobileNetV1              | 70.9         | 89.5         | 123          | 569      |\n| MobileNetV1-width*0.75   | 68.4         | 88.2         | 72.5         | 325      |\n| **MobileNetV1-50%FLOPs** | **70.5**     | **89.3**     | 68.9         | 285      |\n| **MobileNetV1-50%Time**  | **70.2**     | **89.4**     | 63.2         | 272      |\n| MobileNetV2-width*0.75   | 69.8         | 89.6         | -            | 300      |\n| **MobileNetV2-70%FLOPs** | **70.9**     | **89.9**     | -            | 210      |\n\nTo test the model, run:\n\n```\npython eval_mobilenet_torch.py --profile={mobilenet_0.5flops, mobilenet_0.5time, mobilenetv2_0.7flops}\n```\n\n\n\n### Converted TensorFLow Models\n\nWe converted the **50% FLOPs** and **50% time** compressed MobileNetV1 model to TensorFlow. We offer the normal checkpoint format and also the TF-Lite format. We used the TF-Lite format to test the speed on MobileNet.\n\nTo replicate the results of PyTorch, we write a new preprocessing function, and also adapt some hyper-parameters from the original TF [MobileNetV1](https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md). To verify the performance, run following scripts:\n\n```\npython eval_mobilenet_tf.py --profile={0.5flops, 0.5time}\n```\n\nThe produced result is:\n\n| Models    | Top1 Acc (%) | Top5 Acc (%) |\n| --------- | ------------ | ------------ |\n| 50% FLOPs | 70.424       | 89.28        |\n| 50% Time  | 70.214       | 89.244       |\n\n## Timing Logs\n\nHere we provide timing logs on Google Pixel 1 using **TensorFlow Lite** in `./logs` directory. We benchmarked the original MobileNetV1 (mobilenet), MobileNetV1 with 0.75 width multiplier (0.75mobilenet), 50% FLOPs pruned MobileNetV1 (0.5flops) and 50% time pruned MobileNetV1 (0.5time). Each model is benchmarked for 200 iterations with extra 100 iterations for warming up, and repeated for 3 runs. \n\n## AMC\n\nYou can also find our PyTorch implementation of AMC [Here](https://github.com/mit-han-lab/amc-release.git).\n\n## Contact\n\nTo contact the authors:\n\nJi Lin, jilin@mit.edu\n\nSong Han, songhan@mit.edu\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmit-han-lab%2Famc-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmit-han-lab%2Famc-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmit-han-lab%2Famc-models/lists"}