Coder Social home page Coder Social logo

potatospudowski / cactinet Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 0.0 31.92 MB

Pytorch Implementation of a CNN similar to Google Brain's new EfficientNet from scratch to identify images of cactus🌵

Jupyter Notebook 100.00%
pytorch-implementation efficientnet cactus

cactinet's Introduction

CactiNet

Cactinet

Google recently published both a very exciting paper and source code for a newly designed CNN (convolutional neural network) called EfficientNet, that set new records for both accuracy and computational efficiency.

[1] Mingxing Tan and Quoc V. Le. EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. ICML 2019. Arxiv link: https://arxiv.org/abs/1905.11946.

CactiNet in a CNN modeled after EfficentNet with changes in no of 'mobile inverted bottleneck convolutional' layers and parameter values to identify aerial images of columnar cactus.

EfficientNet

EfficientNets are a family of image classification models, which achieve state-of-the-art accuracy, yet being an order-of-magnitude smaller and faster than previous models.

EfficientNets were developed based on AutoML and Compound Scaling. In particular, first use AutoML Mobile framework to develop a mobile-size baseline network, named as EfficientNet-B0; Then, use the compound scaling method to scale up this baseline to obtain EfficientNet-B1 to B7.

Effnet

EfficientNets achieve state-of-the-art accuracy on ImageNet with an order of magnitude better efficiency.

Summary of the paper

  • They learned that CNN’s must be scaled up in multiple dimensions. Scaling CNN’s only in one direction (eg depth only) will result in rapidly deteriorating gains relative to the computational increase needed. As shown in the image below.

them_gains

  • In order to scale up efficiently, all dimensions of depth, width and resolution have to be scaled together, and there is an optimal balance for each dimension relative to the others.

Data used

Data used to build the model were aerial images of cactus obtained by kaggle.

yes

no

CactiNet modeling

For the complete notebook related to modeling CactiNet check https://github.com/PotatoSpudowski/CactiNet/blob/master/Building_EfficientNet_model_using_Pytorch.ipynb

Visualizing CactiNet weights

Visualizing the weights of the first conv layer

conv

Saliency Map

The idea proposed by https://arxiv.org/abs/1312.6034 is to back-prop the output of the network with respect to a target class until the input and plot the computed gradient. This will highligh the part of the image responsible for that class.

sal

Using Transfer learning on EfficientNet B1, B2 and B3.

Fitting data on Google's EfficientNet models https://github.com/PotatoSpudowski/CactiNet/blob/master/Aerial_Cactus_Identification_using_transfer_learning.ipynb

Important Links

cactinet's People

Contributors

potatospudowski avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

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.