Giter Site home page Giter Site logo

tea-dataset's Introduction

Tea-Dataset

Instructions

The code in this repository was run on Google Colaboratory. The code has been split into modules. The Colab file has been shared as well and can be run as is provided that:

  1. The Tea Leaf Disease Dataset is uploaded to the users Google Drive
  2. The 'root' argument used by the main function is reset to the path to the dataset in the user's Drive.

Note on Architecture

I first went through the existing literature on the leaf disease problem. I chose to use a CNN as CNNs are better at feature extraction. I particularly wanted a model that fulfilled two criterea:

  1. Could generalise over multiple tasks (as pre-trained models cannot be used)
  2. Was small, so that training, and therefore debuggging did not take time.

ResNet18 fulfilled these two criterea. It has been used on numerous tasks and has only 11M trainable parameters. Further, LeafNet, an architecture for the particular problem of leaf disease detection, uses ResNet50 as its backbone -- further reason to consider a ResNet variant.

Note of Hyperparameters

I set the initial learning rate to 0.0001 with weight decay of 0.003 and momentum 0.9. The learning rate was decreased by a factor of 10 at the 14th, 20th, and 25th epochs. The model was trained for 30 epochs. After each epoch, the model tested on the validation set. At the end of training, the model's performance was evaluated on the test set.

Note on Datasplit

I use the 80/10/10 split to divide the images into train, validation, and test sets. As a result, the train set has 709 images, the test set has 88 images, and the validation set has 88 images.

Note on 10-fold Cross Validation

As the dataset is small, K-Fold Cross Validation is a good method to ensure that the model is able to generalise well. I chose 10 folds (a design choice). Thus each fold is the test set once, and the validation set once.

Results

The best accuracies obtained were as follows:
Train Set: 92.23
Validation Set: 89.989
Test Set: 77.2727

Confusion matrix

output

tea-dataset's People

Contributors

sridharsola avatar

Stargazers

 avatar

Watchers

 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.