GithubHelp home page GithubHelp logo

joaopauloschuler / two-branch-plant-disease Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 4.0 755.87 MB

Source code for the paper "Color-aware two-branch DCNN for efficient plant disease classification".

License: GNU General Public License v3.0

Jupyter Notebook 100.00%
keras-model keras-models keras-neural keras-neural-network keras-neural-networks cie-lab cielab cielab-space keras-classification-models keras-cnn

two-branch-plant-disease's Introduction

Color-aware two-branch DCNN for efficient plant disease classification

This repository contains the source code for the paper Color-aware two-branch DCNN for efficient plant disease classification by Joao Paulo Schwarz Schuler, Santiago Romani, Mohamed Abdel-Nasser, Hatem Rashwan and Domenec Puig.

Abstract

Deep convolutional neural networks (DCNNs) have been successfully applied to plant disease detection. Unlike most existing studies, we propose feeding a DCNN CIE Lab instead of RGB color coordinates. We modified an Inception V3 architecture to include one branch specific for achromatic data (L channel) and another branch specific for chromatic data (AB channels). This modification takes advantage of the decoupling of chromatic and achromatic information. Besides, splitting branches reduces the number of trainable parameters and computation load by up to 50% of the original figures using modified layers. We achieved a state-of-the-art classification accuracy of 99.48% on the Plant Village dataset and 76.91% on the Cropped-PlantDoc dataset.

3 Minutes Intro Video

Watch the video

The Raw Experiment Files

The source code for the experiments described in the paper can be found at the raw folder:

Results

Raw notebook files with source code for tables 3, 4 and 5 are available.

Create Your Own L+AB Model

You'll need to import the K-CAI Neural API. Then, you can create a 20%L+80%AB Inception V3 model with 6 mixed layers as per example:

import os

if not os.path.isdir('k'):
  !git clone https://github.com/joaopauloschuler/k-neural-api.git k
else:
  !cd k && git pull

!cd k && pip install .

l_ratio = 0.2

model = cai.models.compiled_two_path_inception_v3(
  input_shape=(224,224,3),
  classes=38, 
  two_paths_first_block=True,
  two_paths_second_block=False,
  l_ratio=l_ratio,
  ab_ratio=(1-l_ratio),
  max_mix_idx=5, 
  model_name='two_path_inception_v3'
)

Further Reading

You may be interested in our other paper about making plant disease classification noise resistant. You may also be interested at optimizing deeper layers of a DCNN: V1 and V2.

Running the Code

Due to library updates, the code used for the paper doesn't run on current tensorflow/keras. As of the writting of this readme file, the current version of tensorflow is 2.8. An updated version of the code was done after the paper publication. This version is now compatible with tensorflow 2.8:

Give this Project a Star

This project is an open source project. If you like what you see, please give it a star on github.

Citing this Paper

@article{Schuler_2022_2branches,
  title={Color-Aware Two-Branch DCNN for Efficient Plant Disease Classification}, 
  volume={28}, 
  url={https://mendel-journal.org/index.php/mendel/article/view/176},
  DOI={10.13164/mendel.2022.1.055},
  number={1},
  journal={MENDEL},
  author={Schwarz Schuler, Joao Paulo and Romani, Santiago and Abdel-Nasser, Mohamed and Rashwan, Hatem and Puig, Domenec},
  year={2022},
  month={Jun.},
  pages={55-62}
}

two-branch-plant-disease's People

Contributors

joaopauloschuler avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

two-branch-plant-disease's Issues

How can I predict?

Dear, Joao. Good morning!
Here we are in our search in your paper, yet.
As we can see in next image:
image

Doesn't matter the image loaded, always show the 6th index in "1", btwn 38 possible classes. Did I make any mistake?, please let me know how fix this, and a other doubt:
Do you know how show the name of every class for every index?
Please, we'd appreciate your help.

Thank you for your attention!

Problems in imports section

Hi, Joao!
Thank you for your contribution. I was trying run this code, but I spent a lot of time in the imports section, precisely regard to: ModuleNotFoundError: No module named 'keras_applications'

Screenshot from 2022-12-13 01-12-35

Have you any tip?

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.