Home

Awesome

WeightNet

This repository provides MegEngine implementation for "WeightNet: Revisiting the Design Space of Weight Network".

<!-- ![introduce image](image/weightnet.png) --> <img width="863" height="274" src="figures/weightnet.png"/>

Requirement

Citation

If you use these models in your research, please cite:

@inproceedings{ma2020weightnet, 
            title={WeightNet: Revisiting the Design Space of Weight Networks},  
            author={Ma, Ningning and Zhang, Xiangyu and Huang, Jiawei and Sun, Jian},  
            booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},  
            year={2020} 
}

Usage

Train:

    python3 train.py --dataset-dir=/path/to/imagenet

Eval:

    python3 test.py --data=/path/to/imagenet --model /path/to/model --ngpus 1

Inference:

    python3 inference.py --model /path/to/model --image /path/to/image.jpg

Trained Models

Results

<!-- ![introduce image](image/result.png) --> <img width="926.5" height="329.5" src="figures/result.png"/>
Model#Params.FLOPsTop-1 err.
ShuffleNetV2 (0.5×)1.4M41M39.7
+ WeightNet (1×)1.5M41M36.7
ShuffleNetV2 (1.0×)2.2M138M30.9
+ WeightNet (1×)2.4M139M28.8
ShuffleNetV2 (1.5×)3.5M299M27.4
+ WeightNet (1×)3.9M301M25.6
ShuffleNetV2 (2.0×)5.5M557M25.5
+ WeightNet (1×)6.1M562M24.1
Model#Params.FLOPsTop-1 err.
ShuffleNetV2 (0.5×)1.4M41M39.7
+ WeightNet (8×)2.7M42M34.0
ShuffleNetV2 (1.0×)2.2M138M30.9
+ WeightNet (4×)5.1M141M27.6
ShuffleNetV2 (1.5×)3.5M299M27.4
+ WeightNet (4×)9.6M307M25.0
ShuffleNetV2 (2.0×)5.5M557M25.5
+ WeightNet (4×)18.1M573M23.5