Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
(ECCV'2020 Oral)EagleEye: Fast Sub-net Evaluation for Efficient Neural Network Pruning
| Date | Stars |
|---|---|
| 2026-07-31 | 308 |
| 2026-08-06 | 308 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# EagleEye: Fast Sub-net Evaluation for Efficient Neural Network Pruning


PyTorch implementation for *[EagleEye: Fast Sub-net Evaluation for Efficient Neural Network Pruning](https://arxiv.org/abs/2007.02491)*
[Bailin Li,](https://github.com/bezorro) [Bowen Wu](https://github.com/Bowenwu1), Jiang Su, [Guangrun Wang](https://wanggrun.github.io/projects/zw), [Liang Lin](http://www.linliang.net/)
Presented at [ECCV 2020 (Oral)](https://eccv2020.eu/accepted-papers/)
Check [slides](https://dmmo.dm-ai.cn/eagle_eye/dmai_eagleeye_jiqizhixin202008.pdf) about EagleEye: “High-performance AI on the Edge: from perspectives of model compression and hardware architecture design“, DMAI HiPerAIR, Aug. 2020.

## Citation
If you use EagleEye in your research, please consider citing:
```
@misc{li2020eagleeye,
title={EagleEye: Fast Sub-net Evaluation for Efficient Neural Network Pruning},
author={Bailin Li and Bowen Wu and Jiang Su and Guangrun Wang and Liang Lin},
year={2020},
eprint={2007.02491},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
```
## Update
* 2021-11-03 We uploaded `Dockerfile` for the convenience of setup.
* 2021-03-03: We updated the pretrained baseline ResNet50 of ImageNet in [Google Drive](<https://drive.google.com/drive/folders/1ENq4RuFey3J2iL-Lu1BZ9ToTYILpV9bC>). Before that, incorrect pretrained model cause lower experimental results.
## Adaptive-BN-based Candidate Evaluation
For the ease of your own implementation, here we present the key code for proposed Adaptive-BN-based Candidate Evaluation. The official implementation will be released soon.
```python
def eval_pruning_strategy(model, pruning_strategy, dataloader_train):
# Apply filter pruning to trained model
pruned_model = prune(model, pruning_strategy)
# Adaptive-BN
pruned_model.train()
max_iter = 100
with torch.no_grad():
for iter_in_epoch, sample in enumerate(dataloader_train):
pruned_model.forward(sample)
if iter_in_epoch > max_iter:
break
# Eval top-1 accuracy for pruned model
acc = pruned_model.get_val_acc()
return acc
```
## Baseline Model Training
The code used for training baseline models(MobileNetV1, ResNet50) will be released at [CNNResearchToolkit](https://github.com/Bowenwu1/CNNResearchToolkit). Welcome everyone to follow!
## Setup
1. **Prepare Data**
Download `ILSVRC2012` dataset from http://image-net.org/challenges/LSVRC/2012/index#introduction
2. **Download Pretrained Models**
We provide pretrained baseline models and reported pruned models in [Google Drive](<https://drive.google.com/drive/folders/1ENq4RuFey3J2iL-Lu1BZ9ToTYILpV9bC>). Please put the downloaded models in the dir of `models/ckpt/`.
3. **Prepare Runtime Environment**
**Via pip/conda**
```shell
pip install -r requirements.txt
```
**Via Docker**
```shell
# Build Image
docker build docker/ -t eagleeye:[tag]
# launch docker container
docker run -it --rm \
-v [PATH-TO-EAGLEEYE]:/workspace/EagleEye \
-v [PATH-TO-IMAGENET]:/data/imagenet \
--ipc=host \
eagleeye:[tag]
```
## Usage
Our proposed EagleEye contains 3 steps:
1. Adaptive-BN-based Searching for Pruning Strategy
2. Candidate Selection
3. Fine-tuning of Pruned Model
### 1. Adaptive-BN-based Searching for Pruning Strategy
On this step, pruning strategies are randomly generated. Then, Adaptive-BN-based evaluation are performed among these pruning strategies. Pruning strategies and their eval scores will be saved to `search_results/pruning_strategies.txt`.
If you do not want to perform searching by yourself, the provided search result could be found in `search_results/`.
Parameters involved in this steps:
|Name|Description|
|----|-----------|
|`--flops_target`|The remaining ratio ofExcerpt of 7,547 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:23eff4c5e63a8ad8, llm:Repository description: "EagleEye: Fast Sub-net Evaluation for Efficient Neural Network Pruning" (ECCV 2020 oral).
matched fp:23eff4c5e63a8ad8, llm:Repository description: "EagleEye: Fast Sub-net Evaluation for Efficient Neural Network Pruning" (ECCV 2020 oral).
matched fp:23eff4c5e63a8ad8, llm:Repository description: "EagleEye: Fast Sub-net Evaluation for Efficient Neural Network Pruning" (ECCV 2020 oral).