{"id":19731665,"url":"https://github.com/clovaai/frostnet","last_synced_at":"2025-10-06T16:30:33.365Z","repository":{"id":43574215,"uuid":"272871375","full_name":"clovaai/frostnet","owner":"clovaai","description":"FrostNet: Towards Quantization-Aware Network Architecture Search","archived":false,"fork":false,"pushed_at":"2024-05-03T19:52:44.000Z","size":517,"stargazers_count":106,"open_issues_count":1,"forks_count":18,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-01-15T03:54:20.344Z","etag":null,"topics":["classification","computer-vision","deep-learning","int8-quantization","network-architecture","object-detection","optimizers","post-quantization","pytorch","quantization","quantization-aware-training","quantization-efficient-network","semantic-segmentation","style-transfer"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2006.09679","language":"Python","has_issues":true,"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/clovaai.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}},"created_at":"2020-06-17T03:42:41.000Z","updated_at":"2024-04-03T00:05:21.000Z","dependencies_parsed_at":"2022-09-24T08:22:49.938Z","dependency_job_id":null,"html_url":"https://github.com/clovaai/frostnet","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/clovaai%2Ffrostnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovaai%2Ffrostnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovaai%2Ffrostnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovaai%2Ffrostnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clovaai","download_url":"https://codeload.github.com/clovaai/frostnet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235534414,"owners_count":19005469,"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":["classification","computer-vision","deep-learning","int8-quantization","network-architecture","object-detection","optimizers","post-quantization","pytorch","quantization","quantization-aware-training","quantization-efficient-network","semantic-segmentation","style-transfer"],"created_at":"2024-11-12T00:22:31.109Z","updated_at":"2025-10-06T16:30:27.930Z","avatar_url":"https://github.com/clovaai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## FrostNet: Towards Quantization-Aware Network Architecture Search\n\n**Taehoon Kim\u003csup\u003e1,2\u003c/sup\u003e, YoungJoon Yoo\u003csup\u003e1\u003c/sup\u003e, Jihoon Yang\u003csup\u003e2\u003c/sup\u003e** | [Paper](https://arxiv.org/pdf/2006.09679.pdf) | [Pretrained Models](#pretrained)\n\n\n1. Clova AI Research, NAVER Corp.\n2. Sogang University Machine Learning Lab.\n\n\n## Abstract\n\nINT8 quantization has become one of the standard techniques for deploying convolutional neural networks (CNNs) on edge devices to reduce the memory and computational resource usages. By analyzing quantized performances of existing mobile-target network architectures, we can raise an issue regarding the importance of network architecture for optimal INT8 quantization. In this paper, we present a new network architecture search (NAS) procedure to find a network that guarantees both full-precision (FLOAT32) and quantized (INT8) performances. We first propose critical but straightforward optimization method which enables quantization-aware training (QAT) : floating-point statistic assisting (StatAssist) and stochastic gradient boosting (GradBoost). By integrating the gradient-based NAS with StatAssist and GradBoost, we discovered a quantization-efficient network building block, Frost bottleneck. Furthermore, we used Frost bottleneck as the building block for hardware-aware NAS to obtain quantization-efficient networks, FrostNets, which show improved quantization performances compared to other mobile-target networks while maintaining competitive FLOAT32 performance. Our FrostNets achieve higher recognition accuracy than existing CNNs with comparable latency when quantized, due to higher latency reduction rate (average 65%).\n\n\n## Model performances\n### ImageNet classification results\n\n- Accuracy comparison with other state of the art lightweight models:\n\n  \u003cimg src=etc/acc_latency.png width=480 hspace=30\u003e\u003cbr\u003e\n  \u003cimg src=etc/classification.png width=720\u003e \n\n### COCO detection results\n- mAP scores comparison on MS COCO val split 2017 with RetinaNet and Faster-RCNN:\n\n  \u003cimg src=etc/detection_retina.png width=360 hspace=30\u003e \u003cimg src=etc/detection_faster.png width=360\u003e\n\n\n\u003ch2 id=\"pretrained\"\u003e Pretrained models \u003c/h2\u003e\n\n- We provide FrostNets' pretrained weights on ImageNet dataset. Note that all the models are trained and evaluated with 224x224 image size. [Google Drive](https://drive.google.com/file/d/196nKcns-6f1drrcl1mpD1MAIQxXCxyhF/view?usp=sharing)\n   \n## Getting Started\n\n\n### Training your own FrostNet\nWe trained FrostNets with one of the popular imagenet classification code, rwightman's [pytorch-image-models](https://github.com/rwightman/pytorch-image-models) for more efficient training. After including FrostNet's model file into the training code, one can train FrostNets with the command line in [training_confs](./training_commands.txt).\n\n### Post quantization examples\nWe also provide post-quantization supported version of rwightman's pytorch-image-models in [quanitzation-pytorch-image-models](https://github.com/tgisaturday/pytorch-image-models) for easier post-quantization with PyTorch.\n\n### Training object detection models with FrostNet backbones\nWe trained FrostNets with one of the popular object detection project, [mmdetection](https://github.com/rwightman/pytorch-image-models) for more efficient training. Include [frostnet_features.py](./frostnet_features.py) to mmdetection codes to train models. \n\n\n### StatAssist \u0026 Gradboost examples\n\n#### Supports\n\n- Classification (AlexNet, VGG, Resnet, ShuffleNetV2, Mobilenet V2 \u0026 V3) [(details)](./Classification/README.md)\n- Object Detection (TDSOD, SSDLITE-MobileNet V2) [(details)](./Object_Detection/README.md)\n- Semantic Segmentation (ESPNet V1 \u0026 V2, Mobilenet V2 \u0026 V3) [(details)](./Semantic_Segmentation/README.md)\n- Style Transfer (Pix2Pix, CycleGAN) [(details)](./Style_Transfer/README.md)\n\n#### Implementations\n\n- Our StatAssist implementations can be found in:\n  - Classification: line 149 - 164 in [here](./Classification/train.py).\n  - Object Detection: line 185 - 239 in [here](./Object_Detection/qtrainval.py).\n  - Semantic Segmentation: line 205 - 221 in [here](./Semantic_Segmentation/train.py).\n  - Style Transfer: line 42 - 64 in [here](./Style_Transfer/train.py).\n \n- Our GradBoost version of optimizers can be found [here](./optimizer.py). \n\n## Update\n- November 27th, 2020\n  - FrostNet, quantization-aware neural network architecture, updated. [(details)](./frostnet.py)\n- July 29th, 2020\n  - Quantized CPU latency results updated. [(details)](./Classification/README.md)\n  \n ## License\n\nThis project is distributed under MIT license.\n\n```\nCopyright (c) 2020-present NAVER Corp.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n\n## How to cite\n\n```\n@misc{kim2020frostnet,\n      title={FrostNet: Towards Quantization-Aware Network Architecture Search}, \n      author={Taehoon Kim and YoungJoon Yoo and Jihoon Yang},\n      year={2020},\n      eprint={2006.09679},\n      archivePrefix={arXiv},\n      primaryClass={cs.LG}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclovaai%2Ffrostnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclovaai%2Ffrostnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclovaai%2Ffrostnet/lists"}