/ Модель

Характеристики

Лицензия
CC BY 4.0
Библиотека
timm
Опубликована
17 июл 2026

arabica-coffee-leaf-disease-efficientnet-b0

Классификация изображенийИзображение → label3 профессии

Дообученная EfficientNet-B0 классифицирует крупные RGB-фрагменты листьев арабики по пяти состояниям, включая четыре заболевания и здоровый лист.

77скачиваний за 30 дней2лайкавеса обновлены17 июл 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Модель Huyt/arabica-coffee-leaf-disease-efficientnet-b0 — дообученная EfficientNet-B0 для классификации изображений заболеваний и состояния листьев арабики. Она принимает крупные RGB-фрагменты листа и относит их к одному из пяти классов: Cerscospora, Healthy, Leaf_rust, Miner или Phoma. Модель содержит около 4 млн параметров и предназначена для анализа близких кадров и фрагментов размером, сопоставимым с обучающими кропами, а не целых растений или полевых снимков.

Модель обучена на наборе Project-AgML/arabica_coffee_leaf_disease_classification. В карточке указано, что после удаления точных и группировки близких дубликатов осталось 2 891 независимое изображение; класс Healthy представлен всего 48 изображениями, поэтому его метрики ненадёжны. Модель опубликована под лицензией CC BY 4.0.

Сценарии применения

  • Классификация фрагмента листа арабики на наличие церкоспороза
  • Определение ржавчины на крупном плане листа кофе
  • Распознавание повреждений листа, отнесённых к классу Miner
  • Выявление признаков Phoma на фрагменте листа арабики
  • Предварительная проверка, относится ли фрагмент к здоровому листу

Ограничения

Модель рассчитана на близкие RGB-кропы листьев, а не на целые листья, растения или полевые снимки. Класс Healthy представлен лишь 48 независимыми изображениями, поэтому результаты его распознавания ненадёжны; датасет после дедупликации существенно меньше заявленного.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Arabica Coffee Leaf Disease Classification — efficientnet_b0

A efficientnet_b0 (4.0M params) fine-tuned to classify 5 arabica coffee leaf conditions from close-up RGB crops.

⚠️ Read this before comparing to published numbers

The source dataset lists 58,549 images. It contains 3,756 unique images — 93.6% of the rows are exact byte-for-byte duplicates. One Healthy image appears 520 times. After also grouping near-duplicate crops of the same leaf (perceptual hash, hamming <= 5), only 2,891 independent images remain.

Class counts collapse dramatically, and the balance inverts — Healthy is the largest class as listed and the smallest in reality:

ClassListed rowsByte-uniqueIndependent groups
Cerscospora7,681322317
Healthy18,9836248
Leaf_rust8,3361,042918
Miner16,9781,639923
Phoma6,571691685
TOTAL58,5493,7562,891

This model is trained and evaluated on the deduplicated, group-disjoint data, so no near-duplicate crop appears in more than one split.

The obvious expectation is that removing this much duplication should crater the score. It does not — and reporting that honestly matters more than a tidy story:

Split protocoln trainTest accuracyTest macro-F1
Naive random split over all 58,549 rows (leaky)40,9811.00001.0000
Group-aware split over 2,891 independent images (honest)2,6280.99110.9941

The leaky protocol buys only +0.0089 accuracy / +0.0059 macro-F1. So on this dataset the duplication inflates the apparent size (58,549 vs ~2,891 real images) far more than it inflates the score. These five classes are simply easy to separate: a model trained on 2,628 images with no duplicate leakage still reaches 99.11%.

Do not read this as "leakage is harmless" in general — it is a property of this dataset's easy class boundaries. Read it as: this dataset is ~20x smaller than its row count suggests, and its headline accuracies are not evidence of much.

Results (honest split, test n=564)

MetricScore
Accuracy0.9911
Macro-F10.9941

Measured with timm's canonical inference transform (224px, crop_pct=0.875, bicubic), i.e. exactly the preprocessing the Usage snippet produces.

Per-class

ClassPrecisionRecallF1Test supportTrain images
Cerscospora1.0001.0001.00048226
Healthy1.0001.0001.000943
Leaf_rust1.0000.9810.990156729
Miner0.9801.0000.9902461147
Phoma1.0000.9810.990105483

Intended use

Research and educational use only. Not a substitute for agronomist diagnosis. The Healthy class is supported by only 43 training images from 48 independent sources — treat its predictions with particular suspicion.

Training

  • Backbone: efficientnet_b0 (ImageNet-pretrained, via timm)
  • Data: 2628 train / 564 val / 564 test, split by near-duplicate group (70/15/15), verified zero group overlap
  • Resolution: 224x224 (source crops are mostly 128x128, so they are upscaled)
  • Optimiser: AdamW, OneCycle LR (max 3e-4), weight decay 0.05, 20 epochs, batch 64
  • Loss: cross-entropy, label smoothing 0.1, no class weighting (uniform)
  • Augmentation: random resized crop (0.6-1.0), h/v flip, colour jitter, random erasing
  • Precision: bf16 autocast. Selection: best val macro-F1.

Usage

import timm, torch
from PIL import Image

model = timm.create_model("hf-hub:Huyt/arabica-coffee-leaf-disease-efficientnet-b0", pretrained=True).eval()
cfg = timm.data.resolve_data_config({}, model=model)
tf = timm.data.create_transform(**cfg)

img = Image.open("leaf.jpg").convert("RGB")
with torch.no_grad():
    probs = model(tf(img).unsqueeze(0)).softmax(-1)[0]

idx = int(probs.argmax())
print(model.pretrained_cfg["label_names"][idx], float(probs[idx]))

Class order (index -> label):

['Cerscospora', 'Healthy', 'Leaf_rust', 'Miner', 'Phoma']

Limitations

  • The dataset is ~20x smaller than advertised. 2,891 independent images, not 58,549. Everything below follows from that.
  • Healthy is critically under-supported: 48 independent images total. Its metrics rest on 9 test images and are not trustworthy.
  • Crops, not leaves. Inputs are close-up patches (mostly 128x128), not whole leaves. The model expects similar close-ups; it is not a whole-plant or field classifier.
  • Near-duplicate grouping is a lower bound. Perceptual hashing at hamming <= 5 catches tight crops of the same lesion. Wider crops of the same leaf may survive as separate groups, so residual same-source optimism may remain even in the honest number. A nearest-neighbour probe (ImageNet embeddings, test vs train) found the honest split's residual-similarity signal to be no worse than a comparably-built rice split (+0.42 vs +0.52 excess over the same-class baseline), but that probe cannot cleanly separate leakage from a genuinely low-diversity dataset. Treat 99.11% as an upper bound on real-world performance.
  • The test set is small. 564 images; at 99.11% accuracy that is ~5 errors total. Per-class figures rest on tens of images and carry wide error bars.
  • Single-source dataset (JMuBEN / JMuBEN2, Kenya). No external validation; the lab->field gap is unmeasured.

Reproduction

coffee_dedup.py (hashing + grouping), coffee_split.py (both splits), coffee_train.py (training), coffee_eval_final.py (canonical-transform eval) are included in this repo.

Dataset citation

@article{jepkoech2021arabica,
  title={Arabica coffee leaf images dataset for coffee leaf disease detection and classification},
  author={Jepkoech, Jennifer and Mugo, David Muchangi and Kenduiywo, Benson K and Too, Edna Chebet},
  journal={Data in brief}, volume={36}, pages={107142}, year={2021}, publisher={Elsevier}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · timm · image-classification

Можно запустить

Подбираем GPU…

Ревизия весов
252d268

0 моделей