/ Модель

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

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

rice-leaf-disease-efficientnet-b0

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

Классификатор EfficientNet-B0 определяет одно из 17 заболеваний и состояний риса по фотографии листа для предварительной сортировки.

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

Бенчмарки

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

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

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

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

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

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

Модель Huyt/rice-leaf-disease-efficientnet-b0 — классификатор изображений листьев риса, разработанный на базе EfficientNet-B0 и дообученный автором с использованием timm и ImageNet-предобучения. Она определяет одно из 17 состояний листа по цветной фотографии RGB. Модель принимает изображения, преобразованные к входному разрешению 224×224 пикселя, и выдаёт классы заболеваний и нарушений риса.

Модель предназначена для предварительной сортировки случаев заболеваний риса в образовательных и исследовательских сценариях. На отложенном тестовом наборе из 3984 изображений автор сообщает accuracy 0,9709 и macro-F1 0,9473; разделение выполнялось по группам листьев, чтобы изображения одного листа не попадали одновременно в обучение и тест. Для использования нужны библиотека timm и PyTorch; веса доступны в формате safetensors. Лицензия — Apache-2.0.

Результаты ограничены исходным набором данных: редкие классы представлены небольшим числом примеров, а лабораторные и полевые условия съёмки связаны с классами и могут влиять на предсказания. Внешняя проверка на независимых наборах не проводилась; модель не заменяет диагностику агронома, а предсказания для других культур и новых условий съёмки ненадёжны. Класс Leaf Smut исключён из обучения.

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

  • предварительная сортировка фотографий риса по заболеваниям листьев
  • распознавание бактериального ожога и бактериальной полосатости риса
  • классификация симптомов болезней риса в учебных материалах
  • исследовательское сравнение классов заболеваний риса по фото листьев

Ограничения

Редкие классы имеют мало обучающих и тестовых примеров, поэтому их показатели нестабильны; модель оценивалась только на одном датасете, где условия съёмки коррелируют с классами. Она не заменяет диагностику агронома и ненадёжна для других культур и новых полевых условий; Leaf Smut не входит в число классов.

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

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

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

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

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

Открыть на Hugging Face

Rice Leaf Disease Classification — efficientnet_b0

A efficientnet_b0 (4.0M params) fine-tuned to classify 17 rice leaf conditions from RGB leaf photographs.

Results (held-out test set, n=3984)

MetricScore
Accuracy0.9709
Macro-F10.9473

Macro-F1 is the primary metric: the data is long-tailed, so accuracy is dominated by the head classes and overstates real performance.

Measured with timm's canonical inference transform (224px, crop_pct=0.875, bicubic) — i.e. the exact preprocessing produced by the Usage snippet below, so these numbers are reproducible from a fresh hf-hub: load rather than tied to the training script.

Per-class F1

ClassPrecisionRecallF1Support
Bacterial Blight0.9810.9840.983579
Bacterial Streak0.8120.8670.83915
Bakanae1.0001.0001.00015
Brown Spot0.9720.9760.974632
False Smut1.0000.9330.96615
Grassy Stunt Virus0.9330.9330.93315
Healthy0.9420.9520.947442
Hispa0.9240.9130.918333
Leaf Blast0.9540.9610.957513
Leaf Scald0.9900.9920.991385
Narrow Brown Spot0.9890.9890.989269
Neck Blast1.0001.0001.000150
Ragged Stunt Virus0.9330.9330.93315
Sheath Blight1.0000.9570.97893
Sheath Rot1.0000.5330.69615
Stem Rot1.0001.0001.00015
Tungro1.0001.0001.000483

Intended use

Research and educational use for rice disease triage from leaf images. Not a substitute for agronomist diagnosis. Predictions on out-of-distribution imagery (other crops, other capture conditions) are unreliable.

Training data

Derived from the Rice Leaf Disease Images dataset (~29.4k images, 18 folders). The raw data needed substantial cleaning before it was usable:

  • Dropped the Leaf Smut class entirely. 1,460 of its 1,500 files were named BLAST*, derived from ~160 base images augmented 9x, and show blast lesions rather than smut. Several were byte-identical to files in Leaf Blast, so the two labels directly contradicted each other. Only 40 images looked like genuine leaf smut — too few to learn or evaluate. This leaves 17 classes.
  • Deduplicated. 1,839 exact-duplicate files (6.3% of the dataset) were collapsed to one representative each; 45 hash groups carried conflicting labels across classes.
  • Group-aware splitting. Many files are augmentations of a shared base image (BLAST1_074/BLAST5_074; brownspot_orig_001/brownspot_rotated_001). Splitting these at random would place augmented copies of the same leaf in both train and test. Images were grouped by base identity and split by group, so no leaf appears in more than one split. Final: 18601 train / 3984 val / 3984 test (70/15/15), verified zero group overlap.

These numbers therefore describe generalisation to unseen leaves, not to unseen crops of leaves already memorised. Note that accuracy stayed high (0.971) even after the leakage was removed, so the split cleanup alone does not explain the ~98% figures often quoted for this dataset — the head classes are simply easy, and the lab/field confound below is the more likely driver. Macro-F1 (0.947) is the more informative number.

Training

  • Backbone: efficientnet_b0 (ImageNet-pretrained, via timm)
  • Resolution: 224x224, images pre-resized to 256px short side
  • Optimiser: AdamW, OneCycle LR (max 3e-4), weight decay 0.05, 12 epochs, batch 64
  • Loss: cross-entropy, label smoothing 0.1, no class weighting (uniform) — see the ablation below
  • Augmentation: random resized crop (0.6-1.0), h/v flip, colour jitter, random erasing
  • Precision: bf16 autocast. Selection: best val macro-F1.

On class weighting

The data is long-tailed, so class-weighted loss is the obvious reflex. It did not help. Weights proportional to (1/freq)^alpha were ablated, selecting on validation macro-F1 (test was not consulted for this choice):

alphaval macro-F1test macro-F1test acc
0.0 (used)0.96090.94730.9709
0.50.95870.95360.9694
1.00.86830.86940.9443

Full inverse-frequency weighting (alpha=1) gives the rarest class ~60x the weight of the most common one. The model then over-predicts rare classes — recall near 1.0 at ~0.1 precision after one epoch — and macro-F1 drops sharply. Unweighted loss won on validation, so it is what ships.

Caveat: alpha=0.0 and alpha=0.5 are close, and the gap sits within the noise floor of the rare classes — with 14-15 test images each, a single image moves a class F1 by ~0.07. The alpha=1 result is the only clearly separated one. Read the 0.0-vs-0.5 ordering as a coin-flip, not a finding.

Usage

import timm, torch
from PIL import Image

model = timm.create_model("hf-hub:Huyt/rice-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):

['Bacterial Blight', 'Bacterial Streak', 'Bakanae', 'Brown Spot', 'False Smut', 'Grassy Stunt Virus', 'Healthy', 'Hispa', 'Leaf Blast', 'Leaf Scald', 'Narrow Brown Spot', 'Neck Blast', 'Ragged Stunt Virus', 'Sheath Blight', 'Sheath Rot', 'Stem Rot', 'Tungro']

Limitations

  • Rare classes are weakly supported. Several classes have ~60-70 training images (Bacterial Streak, Bakanae, False Smut, Grassy Stunt Virus, Ragged Stunt Virus, Sheath Rot, Stem Rot); their F1 is unstable and driven by a handful of test images each.
  • Lab/field mix. The source folders mix controlled-background and in-field imagery, and that correlates with class. Some of what the model learns is likely capture condition, not pathology.
  • Single-dataset evaluation. No external validation set, so the lab->field generalisation gap is unmeasured. Expect a drop on genuinely new field imagery.
  • Residual label noise. Leaf Smut was the clearest labelling failure, but the other classes were not audited image-by-image and may contain similar errors.

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

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

GPU в ailist

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

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

Подбираем GPU…

Ревизия весов
a12e09f

0 моделей