GithubHelp home page GithubHelp logo

lusinlu / bias-loss-skipblocknet Goto Github PK

View Code? Open in Web Editor NEW
35.0 3.0 6.0 20.26 MB

[ICCV 2021]Code for the the bias loss and evaluation of SkipblockNet model on ImageNet validation set

Python 100.00%
deep-learning loss-functions mobilenet mobile-networks machine-learning objective-functions pytorch pytorch-implementation

bias-loss-skipblocknet's Introduction

Bias Loss & SkipblockNet

report PWC

[ICCV 2021]Demo for the bias loss and SkipblockNet architecture presented in the paper "Bias Loss for Mobile Neural Networks".

Requirements

for installing required packages run pip install -r requirements.txt

Usage (SkipblockNet)

Pretrained SkipblockNet-m is available from Google Drive. For the testing please download and place the model in the same directory as the validation script.

python validate.py --data path/to/the/dataset

Usage (Bias loss)

Training and testing codes are available for DenseNet121, ShuffleNet V2 0.5x and ResNet18. To test the pretrained models please download corresponding model from the Google Drive and run the testing script in the bias loss directory

python test.py --checkpoint 'path to the checkpoint' --model 'name of the model' --data_path 'path to the cifar-100 dataset'

To train the models run the training script in the bias loss directory as follows:

python train.py --model 'name of the model to be trained' --data_path 'path to the cifar-100 dataset'

Introduction

"Bias Loss for Mobile Neural Networks"

By Lusine Abrahamyan, Valentin Ziatchin, Yiming Chen and Nikos Deligiannis.

Approach (SkipblockNet)

Performance (SkipblockNet)

SkipNet beats other SOTA lightweight CNNs such as MobileNetV3 and FBNet.

|

Approach (Bias loss)

The bias loss is a dynamically scaled cross-entropy loss, where the scale decays as the variance of data point decreases.

Performance (Bias loss)

Bellow is the results of the pretrained models that can be found in the Google Drive

Model Top-1 bias loss Top-1 CE
ResNet18 75.51% 74.33%
DenseNet121 77.83% 75.98%
ShuffleNet V2 0.5x 72.00% 71.55%

Citation

If you find the code useful for your research, please consider citing our works

@inproceedings{abrahamyan2021bias,
  title={Bias Loss for Mobile Neural Networks},
  author={Abrahamyan, Lusine and Ziatchin, Valentin and Chen, Yiming and Deligiannis, Nikos},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={6556--6566},
  year={2021}
}

Acknowledgement

Codes is heavily modified from pytorch-vision and pytorch-cifar100.

bias-loss-skipblocknet's People

Contributors

lusinlu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bias-loss-skipblocknet's Issues

Several questions about paper

Thanks for your great work. But I have some questions about paper.
In Eq1 v_i=\frac{\sum_{j=1}^n(t_j-\mu)^2}{n-1}, which means that the variance of all x_i in one batch are all the same according to this equ. How can this represent the diversity of feature of each data point x_i , or you just assume that all the data point in same one batch have same variance.
And another question for family of SkipNet models. The different parameters and FLOPs for different SkipNet model is just controlled by width_mult or another thing?
Thank you very much. I am really looking forward to your reply on my first question

Weights for bias loss

Maybe the way to calculate weights for bias loss in the code is different from Equation 6 in the paper?

Question about validating the model

Hi! Thank you for your great work.
I'm trying to test the pre-trained model on the Imagenet validation set. Can I run the current validate.py code now? Where should I put the pre-trained model in the directory? And how is the pre-trained model trained, is bias loss used? Thank you if you could answer the questions.

semantic segm

Thanks for great work! Has the performance improved on semantic segmentation?

some questions about paper

  1. High variance of fmaps indicates hard data?and have larger impact in loss?
  2. What is feature diversity for a sample? more feature diversity is the easier it is to be distinguished?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.