CoolFace
Datasetpublic

hansaka01/crophelth_finetune_2nd_stage

CropHelth Round-2 Fine-Tune Dataset Author: Hansaka Rasanjana Project Context: First-year IoT group mini-project at the Sri Lanka Institute of Information Technology (SLIIT) 5,457 brand-new leaf images across 60 of the 112 crop-disease classes — zero overlap with the original 134,016-image crophelth training set. Put together to fine-tune our round-1 model (train_report.json: accuracy 0.9484, macro F1 0.8889), with per-class sampling weighted heavily toward our weak classes.… See the full description on the dataset page: https://huggingface.co/datasets/hansaka01/crophelth_finetune_2nd_stage.

sourceHugging Faceupdated 28d agoView on Hugging Face
0likes353downloads
Dataset Card

CropHelth Round-2 Fine-Tune Dataset

Author: Hansaka Rasanjana

Project Context: First-year IoT group mini-project at the Sri Lanka Institute of Information Technology (SLIIT)


5,457 brand-new leaf images across 60 of the 112 crop-disease classes — zero overlap with the original 134,016-image crophelth training set. Put together to fine-tune our round-1 model (train_report.json: accuracy 0.9484, macro F1 0.8889), with per-class sampling weighted heavily toward our weak classes.

Why we're fine-tuning on new images

Round 2 uses only images the model has never seen before:

  • —New public datasets (different farms, countries, camera conditions) + a small batch of verified web images for our weakest classes.
  • —Exact-MD5 dedupe run across the entire set (184 duplicates dropped).
  • —The 112-class label space stays identical: classes without new data simply aren't in round 2, so their learned weights are safely preserved (in Keras, class heads with no samples in a batch receive zero gradient).

Layout

images/<class_code>/NNNNNN.jpg      5,457 images, 60 classes
finetune_index.csv                  file,label,class_index,split   (stratified 90/10, seed 42)
class_weights.json                  Keras class_weight dict, derived from round-1 F1
                                    w = clamp(1/(0.2+f1), 0.5, 3.0)  -> weak classes weigh more
summary.json                        per-class kept/cap/round1-f1 + missing-class list

How classes were balanced (per class, from round-1 F1)

round-1 tiercap taken per class
weak (f1 < 0.5): chillileafspot, lemondeficiency, banana{iron,magnesium}deficiency, pepperbacterialspot, bananamanganesedeficiencyall available (cap 500)
mid (0.5 ≤ f1 < 0.8)up to 300
strong (f1 ≥ 0.8)up to 120 (anti-forgetting refresh)

New sources (all CC-BY / CC-BY-SA, properly attributed)

SourceRepoClasses contributed
BananaLSD (Bangladesh 2024 collection)data.mendeley.com/datasets/wfzpdmc5vxbananacordana, bananapestalotiopsis, bananasigatoka, bananahealthy
Coffee (Arabica + Robusta, Philippines)data.mendeley.com/datasets/tgv3zb82nd, t2r6rszp5ccoffeehealthy, coffeeunhealthy
Radish (Bangladesh 2024)data.mendeley.com/datasets/s973cz2jcdall 5 radish classes
Tomato Leaf Disease (2024)data.mendeley.com/datasets/zfv4jj7855all 10 tomato classes (incl. mosaic, target spot, TSSM, TYLCV)
Tomato/BD + Multi-crop (Corn/Potato/Rice/Tomato) 2025jttrv2w27r, z6jp232g5jtomato, cornhealthy, potatohealthy
Grape GVLiD + Grape Leaf 2024wkymf8bhcg, 378c69nwk5grapeblackrot, grapeesca, grapeisariopsisleafspot, grape_healthy
Orange HLB (Mexico 2025)jgkh2jxbwtorange_haunglongbing
Cauliflower (Pune 2025 + Bangladesh 2025)x26px3xnmy, x995snz7p3all 4 cauliflower classes
Peanut/Groundnut (West Bengal 2024)x6x5jkk873peanuthealthy, peanutlateleafspot, peanut_rust
Apple (Jammu & Kashmir 2024)9m2dcb5mmrapple_healthy
Citrus leaves (2019, Pakistan)3f83gxmv57lemoncitruscanker, lemon_greening
Tea + Hibiscus (Sylhet 2025)5bzy89brkvteaalgalleafspot, teabrownblight, teagrayblight, teahealthy, tearedleaf_spot
Web images (visually verified, 2026)various (extension/garden sources)bananamoko (4), bananapanama (3), pepperbacterialspot (2), chillileafcurl (2), lemondeficiency (5), maizen0 (1), chilliwhitefly (1), banana{magnesium,potassium,sulphur}deficiency (1 each)
Web-sourced multi-crop (2024, Zenodo 14051480)zenodo.org/records/14051480applerust/scab/healthy, corn 4, potatolate_blight, tomato 6
Chili Cercospora (2024, Zenodo 13272039)zenodo.org/records/13272039chilli_leafspot (484)

Classes without new public data (52) — staying at round-1 weights

Couldn't find clean, honest new public sources for these across Mendeley, Zenodo, GitHub, or general web searches: mostly lemon diseases (15), tea pests/blights (5), banana diseases and nutrient deficiencies (9: black sigatoka, yb sigatoka, fusarium wilt, bract mosaic, insect pest, boron/calcium/iron/manganese deficiencies), plus single-class crops like blueberry, cherry, peach, raspberry, soybean, squash, strawberry, and a couple of miscellaneous classes.

Their softmax heads are frozen in round 2 (no samples mean no gradient), so nothing gets lost—they remain completely functional. We'll need to grab our own field photos for these moving forward.

Usage (Keras)

python
import pandas as pd, json, tensorflow as tf
df = pd.read_csv("finetune_index.csv")
weights = json.load(open("class_weights.json"))
# build a tf.data pipeline from df[df.split=="train"] (same pattern as round 1),
# then:
model.compile(optimizer=tf.keras.optimizers.Adam(1e-5),
              loss=tf.keras.losses.SparseCategoricalCrossentropy(),
              metrics=["accuracy"])
model.fit(train_ds, validation_data=val_ds, epochs=3-5, class_weight=weights)

Recommended setup for round 2: Stick with the same EfficientNetB0/B2 architecture, drop down to a lower learning rate (1e-5, full model unfrozen or top-only), run for 3–5 epochs, and stop right at the first validation plateau. Treat this as a refresh, not a full re-train from scratch.

Suggested next steps

  1. 1.Fine-tune using class_weights.json for 3–5 epochs.
  2. 2.Re-evaluate against a held-out slice of our ORIGINAL 134k validation set (never train on this slice!) to confirm the weak classes actually improved and the strong ones didn't regress.
  3. 3.Keep snapping field photos for the 52 uncovered classes to fill out our dataset for future iterations.