DRNet dynamically adjusts the input resolution of each sample for efficient inference. To accurately find the required minimum resolution of each image, we introduce a resolution predictor which is embedded in front of the entire network. In practice, we set several different resolutions as candidates and feed the image into the resolution predictor to produce a probability distribution over candidate resolutions as the output. The network architecture of the resolution predictor is carefully designed with negligible computational complexity and trained jointly with classifier for recognition in an end-to-end fashion.
Paper: Mingjian Zhu, Kai Han, Enhua Wu, Qiulin Zhang, Ying Nie, Zhenzhong Lan, Yunhe Wang. Dynamic Resolution Network. NeurIPS 2021.
The framework of DRNet is shown below:
Dataset used: ImageNet
-
Dataset size: This dataset spans 1000 object classes and contains 1,281,167 training images, 50,000 validation images and 100,000 test images.
-
Data format: RGB images.
- Hardware(Ascend/GPU)
- Prepare hardware environment with Ascend or GPU.
- Framework
- For more information, please check the resources below.
DRNet
├── eval.py
├── readme.md
└── checkpoint
├── fig
│ └── DRNet.JPG
└── config
└── resnet50_imagenet2012_config.yaml
└── src
├── predictor.py
├── classifier.py
├── dataset.py
├── gumbelmodule.py
└── model_utils
└── config.py
After installing MindSpore via the official website, you can start evaluation as follows:
# infer example
GPU: python eval.py
checkpoint can be downloaded at https://mindspore.cn/resources/hub.
result: {'acc': 77.4} ckpt= ./checkpoint/classifier_net.ckpt ./checkpoint/predictor_net.ckpt
参数 | GPU |
---|---|
Model Version | DRNet_Resnet50 |
uploaded Date | 03/2022 |
Dataset | ImageNet-1k Val,50,000 images |
Resource | NV SMX2 V100-32G |
MindSpore Version | 1.5.0 |
Accuracy | top1:77.4% |
Inference Speed | 4.73 ms per frame |
Inference Time | 236s |
Please check the official homepage.