AI tools, scored for your job
Get paid to train AI
🤝 You're in the Free & Open Source library — community-built tools you can use without paying. A different concept from our scored AI directory.
Home › Free & Open Source › Agriculture › Plants Disease Detection
✦ Free & open sourceAgriculture

Plants Disease Detection

PyTorch-based baseline and image classification pipeline for crop disease detection.

Crop Disease Detection in PyTorch

AI Challenger 2018 competition baseline upgraded for PyTorch 2.x with automated device switching and AMP.

Free forever · source-available · Licence not stated in the repository
✓ Light setup✓ Browser-based✓ Real-time collaboration
6.1
ZEKAI
Solid crop disease baseline
Free & open source · Agriculture
Ease of setup4
Usefulness7
Maintenance8.5
Community5
★ 342
GITHUB
Aug 2026
UPDATED
Licence not stated in the repository
LICENSE
🛠 Don't want to self-host? We can set it up →
⚡ Quick answer

This repository provides a complete PyTorch pipeline for classifying plant diseases from high-resolution leaf images. It suits machine learning practitioners and agricultural data scientists looking for a baseline model built on ResNet50.

Runs on
Cross-platform
Hosting
Self-host
Languages
Python
License
Licence not stated in the repository

What it is

It processes 650x650 crop images through a modified ResNet50 architecture, handles stratified dataset splitting, and supports both online data augmentations and optional offline preprocessing. The pipeline features automatic CPU/GPU switching, mixed precision training, and a corrected FocalLoss implementation for handling class imbalances.

Who it's for

It suits developers and researchers with PyTorch experience who need a structured baseline for agricultural image classification tasks. It does not suit non-technical agronomists looking for a ready-to-use mobile app or plug-and-play web interface.

Key features

ResNet50 Classification

Uses a pretrained ResNet50 network adapted with an adaptive average pooling layer and a 59-class classification head.

Mixed Precision AMP

Supports automatic mixed precision training on CUDA devices to reduce memory consumption and speed up execution.

Stratified Data Prep

Includes scripts to merge and split train-validation sets using stratified K-fold logic while handling anomalous classes.

Corrected Focal Loss

Provides a fixed FocalLoss implementation with proper per-sample modulation to replace standard cross-entropy.

How to start

Up and running in 3 steps

1
Clone the repository and install dependencies using pip install -r requirements.txt.
2
Download the dataset and organize images into directories using the provided move.py script.
3
Execute python main.py to start training, evaluation, and test set inference.
Real talk

Our honest verdict

What's great

  • Modernized for PyTorch 2.x with automated CPU and GPU fallback.
  • Includes preprocessing and label mapping scripts tailored to the AI Challenger dataset.
  • Configurable online data augmentations including random rotation, flips, and affine transforms.
  • Outputs standard JSON submission files matching competition evaluation formats.

Where it falls short

  • Requires manual downloading of external Baidu Netdisk dataset archives.
  • Large 650x650 image inputs demand significant GPU memory during training.
  • Requires writing and modifying configuration files in Python to adjust hyper-parameters.
Cost

Pricing & license

Free under its open-source nature, though the README does not specify a formal license. The only cost is running it yourself on your own hardware or cloud instance.

Paid work

Open remote AI-training roles

877 open remote AI-training roles, updated November 16, 2026; most pay $20–$175 an hour. Zekai lists them free; the application goes to the employer’s platform.

See all open roles →
Compare

Alternatives

🎁 Free & open-source alternatives

These reviewed AI tools do the same job instantly — from our scored directory.

Get more

Use it, or have us set it up

📄 Free PDF: Plants Disease Detection for Agriculture
A plain-language guide to getting your first result. Sent to your inbox.
🔔 64 people want a full video tutorial — add your vote
🛠 Don't want to set it up yourself?
We'll install, host & configure Plants Disease Detection for you — and train your team.
Get it done for you ↗
Questions

FAQ

What hardware do I need to run this tool?

A CUDA-compatible GPU with sufficient VRAM is recommended due to the 650x650 image size, though the code automatically falls back to CPU if no GPU is detected.

How are class label indices handled?

The preparation script removes specific anomalous classes and shifts indices, while the test pipeline automatically maps predictions back to original official identifiers.

Radar

Latest AI news

✉️ The weekly free toolkit
The best new free & open-source tools for Agriculture — one short email a week, in your language.
Free · 1 email/week · unsubscribe anytime
Get paid to train AI →

See Zekai first in Google