Giter Club home page Giter Club logo

self-supervised-learning-for-fine-grained-image-classification's Introduction

Self Supervised Learning for Fine grained Image Classification

As part of our project we have worked on using self supervised learning for fine grained classification of cassava leaves diseases. We've explored 3 different methods for applying self supervised learning -

The features learnt during the pretext task are fine tuned for downstream classification. The code (implemented in Pytorch) is separated into these 3 folders.

Our Baseline is a supervised fine grained classification model Fine-Grained Visual Classification via Progressive Multi-Granularity Training of Jigsaw Patches.

Do give a read at the paper for more details and analysis!

Dataset

We have used the cassava leaves fine grained diseases dataset from Kaggle. The dataset has ~12K unlabelled images (extraimages.zip) and ~6K labelled images (train.zip). The dataset can be downloaded from here and here. It has 5 disease classes as shown in the following order - cbb,cbsd,cgm,cmd,healthy

cbb   cbsd   cgm   cmd   healthy

For the pretext task training, we've used the extra images (unlabelled). For the downstream task training, we've used the train images (labelled).

General dependencies

python >= 3.6
torch
PIL
torchvision : conda install -c pytorch torchvision 
Opencv : pip install python-opencv
numpy : pip install numpy
scikit-learn : pip install -U numpy scipy scikit-learn
scipy : pip install scipy

To run

We've included the code in the form of Jupyter notebooks to make it easy to visualize and run each cell. Further instructions have been provided in the README files of each folder.

Credits

We are thankful to the authors of these projects for open sourcing their code

SRGAN
Grad-CAM
SimCLR
Jigsaw pretext
PMG

Citation

If you find this project useful, consider starring the repo and citing us in your work:

@misc{breiki2021selfsupervised,
      title={Self-Supervised Learning for Fine-Grained Image Classification}, 
      author={Farha Al Breiki and Muhammad Ridzuan and Rushali Grandhe},
      year={2021},
      eprint={2107.13973},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

self-supervised-learning-for-fine-grained-image-classification's People

Contributors

mfarnas avatar rush2406 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

Watchers

 avatar  avatar  avatar  avatar

self-supervised-learning-for-fine-grained-image-classification's Issues

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.