Giter Club home page Giter Club logo

cassava_leaf_disease_kaggle's Introduction

Cassava_leaf_disease_kaggle

Repo for the Cassave Leaf disease detection kaggle competition. Total List of experiments and their results are tabulated in the Model_versioning.xlsx sheet

Competition results

  • Final solution got 914 on Private LB. The solution consisted of ensemble of 5 models weighted by confusion matrix values and 4xTTA

  • The same solution without TTA would have got 440 on Private LB, unfortunately the solution wasn't selected for final submission

Final solution description

  • Only 2020 competition data was used, created an npy format dataset instead of jpg files to boost loading time, but con is it consumes ~10 times more space

  • CV consists of Stratified 5-fold and average of 5folds was taken as cv score

  • Final solution consists of ensemble of 5 models - 2 se_resnext50 models, 1 ViT, 1 tf_efficientnet_b3_ns and tf_efficientnet_b4_ns model

  • Predictions of 5fold of each model was averaged. TTA may or may not be applied.

  • Each Models prediction was scaled by confusion matrix. model_prediction = np.matmul(confusion_matrix * avg_prediction)

  • Output of above step was averaged

Loss functions

  • nn.CrossEntropy, Bi-tempered logistic loss with labelsmoothing and labelsmoothingCE loss functions were used

Optimizer & LR schedulers

  • Adam optimizer with weight decay was used

  • Cosine annealing w or w/o restarts, 1cycle LR and cyclic LR schedulers were tried

Augumentations used

  • Standard augumentations - Resized to 512 x 512, Flips, rotation, HSV, shiftscale rotate, Gaussian noise, median and Gaussian blurs, Finally normalized by imagenet means and std

  • fmix and cutmix augumentation were applied

Other learnings

  • AMP, Automatic mixed precision was used

  • custom lr_find function (based on lr range test) was used to set the initial LR

  • Learnt to setup TPU with pytorch on kaggle platform in a ViT based model

  • Meta Learning (learning Ensembling weights) using OOF prediction of each model, didnt work out correctly due to incorrect OOF Dataset

Things not tried

  • Stacking / other methods of learning ensembling weights

  • Pseudo labelling / distillation learing

  • Hyperparameter optimization - took lot of time experimenting, need to find smarter ways to experiment

  • Using GradCAM for error improvement, Visualising attention maps of ViT etc

cassava_leaf_disease_kaggle's People

Contributors

suryajayaraman 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.