/ Модель

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

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

sarox-plangton

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

Классификатор ONNX на базе MobileNetV3-Large определяет 15 классов здоровья и болезней листьев перца, картофеля и томата по фотографии.

3 112скачиваний за 30 дней2лайкавеса обновлены8 окт 2026

Бенчмарки

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

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

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

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

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

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

Sarox Plangton — классификатор изображений листьев для выявления болезней перца, картофеля и томата, разработанный как ML-компонент системы Jamee. Модель MobileNetV3-Large дообучена в два этапа на основе предобучения ImageNet и распространяется в формате ONNX для запуска на CPU через ONNX Runtime.

На вход подаётся RGB-фотография одного листа: изображение приводится к размеру 224 × 224 с масштабированием и центральным кадрированием. Модель выдаёт вероятности для 15 классов, включая здоровые листья и заболевания, а также top-3 предсказания и статус неопределённости при низкой уверенности. В README приведены результаты тестирования на отложенной выборке PlantVillage; качество на полевых фотографиях может быть ниже.

Модель подходит для предварительной классификации изображений листьев в приложениях для мониторинга сельскохозяйственных культур. Она ограничена тремя видами культур и классами из обучающего набора, не выявляет надёжно новые болезни и не рекомендует способы лечения. Лицензия — Apache-2.0.

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

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

Ограничения

Распознаёт только 15 классов для перца, картофеля и томата; другие культуры и болезни могут быть ошибочно отнесены к одному из известных классов или отмечены как неопределённые. На полевых фотографиях с несколькими листьями, размытием, сложным фоном или необычным освещением качество может снижаться, а высокая уверенность не гарантирует правильный диагноз.

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

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

Открыть на Hugging Face

Jamee Crop Disease Classifier

Image classifier that recognises 15 crop / disease classes (Pepper bell, Potato, Tomato) from a photo of a single leaf. It is the ML component of Jamee, an AI crop-disease detection system. It runs on CPU with ONNX Runtime; no GPU or PyTorch is needed.

ModelMobileNetV3-Large (ImageNet-pretrained, two-stage fine-tuning)
Input224 × 224 RGB image (any size accepted: shorter side resized to 256, centre-cropped to 224)
Outputtemperature-calibrated class probabilities, top-3, uncertain status below the confidence threshold
Number of classes15 (detected from the dataset folders)
Parameters4,221,247
ONNX model size16.4 MB
CPU latency9 ms per image (median, incl. preprocessing, measured on the training machine)
DatasetPlantVillage — Kaggle emmarex/plantdisease
TrainingGoogle Colab (Tesla T4)
DeploymentDownload from this repository and run on CPU with ONNX Runtime (see below)

Metrics (held-out test set, evaluated once)

MetricValue
Accuracy99.52%
Macro precision99.54%
Macro recall99.51%
Macro F199.52%
Weighted F199.52%
Top-3 accuracy99.97%
Calibration error (ECE) before → after temperature scaling0.003 → 0.002 (T = 1.210)
Confidence threshold0.99 → 95.4% of test images answered, 99.93% accuracy on those

20624 images after cleaning, split 14434 / 3095 / 3095 (train / validation / test; 70/15/15, stratified, duplicate-aware, made before augmentation). Best validation macro-F1: 99.67% (epoch 25).

Per-class test results

#Original class nameDisplay namePrecisionRecallF1Test images
0Pepper__bell___Bacterial_spotPepper bell — Bacterial spot1.0001.0001.000150
1Pepper__bell___healthyPepper bell — Healthy0.9961.0000.998222
2Potato___Early_blightPotato — Early blight1.0001.0001.000150
3Potato___Late_blightPotato — Late blight1.0001.0001.000150
4Potato___healthyPotato — Healthy1.0001.0001.00023
5Tomato_Bacterial_spotTomato — Bacterial spot0.9971.0000.998319
6Tomato_Early_blightTomato — Early blight0.9870.9930.990150
7Tomato_Late_blightTomato — Late blight1.0000.9890.995285
8Tomato_Leaf_MoldTomato — Leaf Mold1.0000.9930.996143
9Tomato_Septoria_leaf_spotTomato — Septoria leaf spot0.9931.0000.996266
10Tomato_Spider_mites_Two_spotted_spider_miteTomato — Spider mites Two spotted spider mite0.9960.9720.984251
11Tomato__Target_SpotTomato — Target Spot0.9681.0000.984211
12Tomato__Tomato_YellowLeaf__Curl_VirusTomato — Tomato YellowLeaf Curl Virus1.0000.9960.998481
13Tomato__Tomato_mosaic_virusTomato — Tomato mosaic virus1.0000.9820.99156
14Tomato_healthyTomato — Healthy0.9961.0000.998238

Use it from Python

Install the runtime (tested on Python 3.12; onnxruntime 1.30 does not install on Python 3.10):

pip install huggingface_hub onnxruntime==1.30.0 numpy==2.4.4 pillow==12.3.0
import sys
from huggingface_hub import snapshot_download

MODEL_DIR = snapshot_download("sarang-sketch/sarox-plangton", local_dir="jamee_model")  # ~17 MB; unchanged files are not downloaded again
sys.path.insert(0, MODEL_DIR)
from inference import load_model, predict_image

model = load_model(MODEL_DIR)                    # load once, reuse for every image
result = predict_image("leaf.jpg", model=model)  # path, bytes or PIL image
print(result["status"], result.get("predicted_class"), result["confidence"])

For production, pin an exact model version with snapshot_download(..., revision="<commit id>"). If this repository is made private, set the HF_TOKEN environment variable on the machine that downloads it.

Successful prediction:

{"status": "success", "predicted_class": "Tomato_Early_blight", "display_name": "Tomato — Early blight",
 "crop": "Tomato", "condition": "Early blight", "is_healthy": false, "confidence": 0.995, "threshold": 0.99,
 "top_predictions": [{"class": "Tomato_Early_blight", "display_name": "Tomato — Early blight", "confidence": 0.995},
                     {"class": "Tomato_Late_blight", "display_name": "Tomato — Late blight", "confidence": 0.003},
                     {"class": "Tomato_Septoria_leaf_spot", "display_name": "Tomato — Septoria leaf spot", "confidence": 0.001}]}

Low confidence (top_predictions is still included for logging — do not present it as a diagnosis):

{"status": "uncertain", "predicted_class": null, "confidence": 0.42, "threshold": 0.99,
 "message": "Jamee could not confidently identify this image.", "top_predictions": ["..."]}

(The two JSON examples show the response format; their values are illustrative.)

Optional: FastAPI wrapper for the Jamee backend

# Run the download step above first, so MODEL_DIR is on sys.path.
from fastapi import FastAPI, File, HTTPException, UploadFile
from inference import InvalidImageError, load_model, predict_image

app = FastAPI()
model = load_model(MODEL_DIR)

@app.post("/predict")
async def predict(file: UploadFile = File(...)):
    try:
        return predict_image(await file.read(), model=model)
    except InvalidImageError as exc:
        raise HTTPException(status_code=400, detail=str(exc))

pip install fastapi uvicorn python-multipart, then uvicorn api:app --host 127.0.0.1 --port 8000. Add authentication and an upload-size limit before exposing it to the internet.

Try the demo locally

In the downloaded folder:

pip install gradio==6.29.1 -r requirements.txt
python app.py

The Gradio page is served at http://127.0.0.1:7860, reachable only from your own computer.

Configuration

  • config.json — confidence_threshold, temperature, preprocessing, class list (original + display names).
  • Environment variable JAMEE_CONFIDENCE_THRESHOLD overrides the threshold without editing files.

Limitations

  • The model only recognises the diseases represented in its training dataset (15 classes: Pepper bell, Potato, Tomato). Any other crop or disease is forced into one of these classes or reported as uncertain.
  • A high confidence score does not guarantee real-world correctness.
  • Images taken in uncontrolled field conditions (cluttered background, several leaves, blur, unusual light) may produce lower performance: PlantVillage photos are lab images of single leaves on plain backgrounds.
  • The confidence threshold is a basic rejection mechanism, not out-of-distribution detection. It and the temperature were fitted on PlantVillage validation images, so they may be optimistic for field photos.

Responsible use

The model returns a class label and probabilities only. It does not recommend pesticides, doses or treatments. Agricultural guidance must come from Jamee's separate knowledge layer and should be reviewed by experts.

Security

inference.py rejects files it cannot decode (InvalidImageError) and images larger than 40 megapixels. Any service that exposes the model on the internet still needs its own authentication, upload-size limit and rate limiting.

Files

FilePurpose
model.onnxfloat32 network, input input [batch, 3, 224, 224] → output logits
config.jsonpreprocessing, classes, threshold, temperature, training details
class_names.jsonindex → original class name
inference.pyload_model → load_image → preprocess_image → predict → format_prediction
app.pyoptional Gradio demo with a /predict API
requirements.txtpinned runtime dependencies for inference.py

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

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

GPU в ailist

Универсальный рантайм · onnx

Нельзя запустить

В репозитории нет весов в формате PyTorch/safetensors.

Ревизия весов
039a76b

0 моделей