Cassava leaf disease classification using Deep neural network in Pytorch
Project description
Cassava leaf disease classification
The idea of this project is to build an image classifier to find out healthy and diseased cassava leaves.
There are 4 different classes of leaf diseases namely - Cassava Bacterial Blight (CBB),Cassava Brown Streak Disease (CBSD),Cassava Green Mottle (CGM) and Cassava Mosaic Disease (CMD)
.
-
Training data can be found on the Kaggle competition page
-
Streamlit app code can be found here.
Installation
pip install cassava-classifier
Inference example
import PIL import Image
from cassava.pretrained import get_model
image = Image.open("<insert your image path here>")
# Use cassava.list_models() to list of available trained models
model = get_model(name:str)
model.predict_as_json(image: np.array)
>> {"class_name":str, "confidence": np.float}
Try out the inference code on either google colab or kaggle.
Training pipeline
1.Model Architecture - Efficeientnet-B4 , Noisy Weights
2.Image Size - 512
3.Optimizer - Adam
4.Scheduler - GradualWarumUpScheduler
5.Loss - Focal Cosine Loss
6.Augmentations - Hard Augmentations
7.Epochs - 10
8.Early Stopping - No
9.Mixed Precision - Yes
Blog
[Medium link]
Acknowledgements
We would like to thank Kaggle community as a whole for providing an avenue to learn and discuss latest data science/machine learning advancements but a hat tip to whose code was used / who inspired us.
- Teranus
- Nakama
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file cassava_classifier-0.0.3.tar.gz
.
File metadata
- Download URL: cassava_classifier-0.0.3.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 003f169705bff8ac41729c674b396a8504907af93a813cddfe1254cb18ab4c07 |
|
MD5 | 5abb31a779b037a8461e2fe1c3240c67 |
|
BLAKE2b-256 | 40c488280465aca952c0e4052f4ae9911ec76debebc3903fa995ac469b045ad4 |