Downloads · 30 days
37
22% of all-time downloads
Shaq2/chashibhai-brassica-disease-cls
chashibhai-brassica-disease-cls is a image classification model from Shaq2. Use it when you need a label for an image. It is set up for ultralytics. The card lists the license as mit.
Disease ID in ChashiBhAI always runs on-device. Gemini / KrishokChat generate advisory text only and never see the photo.
Downloads · 30 days
37
22% of all-time downloads
All-time downloads
169
Public
Repo size
60.4 MB
Likes
0
Public
Click a slice to open those files.
.tflite71.3 MB · 87%
From the Hugging Face model README
| Author | Shaq2 (Shakil Ahmed) |
| Crop | brassica (বাঁধাকপি / ফুলকপি) |
| Task | Image classification (leaf disease) |
| Architecture | YOLO26-cls → TFLite FP16 |
| Input | [1, 640, 640, 3] NHWC RGB /255.0 |
| Output | [1, 11] softmax probabilities (nms: false) |
| Status | production-demo |
| App | ChashiBhAI (Expo / React Native, on-device diagnosis) |
| Code | GitHub |
| Collection | ChashiBhAI on-device classifiers |
Disease ID in ChashiBhAI always runs on-device. Gemini / KrishokChat generate advisory text only and never see the photo.
| File | Role |
|---|---|
model.tflite | On-device graph used by the Android app (~10.95 MB) |
labels.json | Canonical class names and preprocess contract |
best.pt | Ultralytics source weights (export parent) |
| Label | English | Bangla |
|---|---|---|
Cabbage__Alternaria_Spot | Cabbage Alternaria Spot | বাঁধাকপি অল্টারনারিয়া |
Cabbage__Black_Rot | Cabbage Black Rot | কালো পচন |
Cabbage__Downy_Mildew | Cabbage Downy Mildew | ডাউনি মিলডিউ |
Cabbage__Healthy_Leaf | Cabbage Healthy | সুস্থ বাঁধাকপি |
Cauliflower__Alternaria_Disease | Cauliflower Alternaria | ফুলকপি অল্টারনারিয়া |
Cauliflower__Bacterial_Soft_Rot | Bacterial Soft Rot | ব্যাকটেরিয়া নরম পচন |
Cauliflower__Bacterial_Spot | Bacterial Spot | ব্যাকটেরিয়া দাগ |
Cauliflower__Black_Spot | Black Spot | কালো দাগ |
Cauliflower__Downy_Mildew | Cauliflower Downy Mildew | ফুলকপি ডাউনি মিলডিউ |
Cauliflower__Healthy | Cauliflower Healthy | সুস্থ ফুলকপি |
Cauliflower__Nutrient_Deficiency | Nutrient Deficiency | পুষ্টি ঘাটতি |
Do not letterbox. Letterbox disagreed with the .pt on non-square photos.
imgsz = 640, keep aspect ratio.640×640.float32 / 255.0.labels.json is the source of truth (preprocess: centercrop).
| Check | Result |
|---|---|
Preprocess verified vs .pt | yes (variant C; independent machine test pass) |
| FP16 vs FP32 top-1 agreement | 1.0 |
| FP16 vs FP32 max softmax diff | 0.00210267 |
| Independent machine test | pass (August 2026) |
| Bundled in APK | no — Model Manager download |
Independent test on a separate machine (August 2026) confirmed this TFLite export loads and classifies correctly with the variant-C contract in labels.json. Rice, brassica, and corn all passed the same check.
Out of scope: detection / bounding boxes, crop auto-routing, chemical dosage (handled by a separate advisory stack with a refuse gate).
Covers cabbage and cauliflower classes in one head. Downloaded on demand in the app (not bundled).
import json
from pathlib import Path
import numpy as np
from PIL import Image
import tensorflow as tf
def preprocess_centercrop(path: str, imgsz: int = 640) -> np.ndarray:
im = Image.open(path).convert("RGB")
w, h = im.size
scale = imgsz / min(w, h)
nw, nh = int(round(w * scale)), int(round(h * scale))
im = im.resize((nw, nh), Image.BILINEAR)
left, top = (nw - imgsz) // 2, (nh - imgsz) // 2
im = im.crop((left, top, left + imgsz, top + imgsz))
return (np.asarray(im, dtype=np.float32) / 255.0)[None, ...]
labels = json.loads(Path("labels.json").read_text(encoding="utf-8"))
it = tf.lite.Interpreter(model_path="model.tflite")
it.allocate_tensors()
inp, out = it.get_input_details()[0], it.get_output_details()[0]
it.set_tensor(inp["index"], preprocess_centercrop("leaf.jpg", labels["imgsz"]))
it.invoke()
p = it.get_tensor(out["index"])[0]
i = int(p.argmax())
print(labels["names"][i], float(p[i]))
KrishokChat Bengali advisory LLM / RAG is not this classifier. See RaiyanKhaan/KrishokChat-Advisory-System and arXiv:2606.29243 (Reza & Shahid).
@software{ahmed2026chashibhai_brassica_cls,
author = {Ahmed, Shakil},
title = {ChashiBhAI Brassica Disease Classifier},
year = {2026},
url = {https://huggingface.co/Shaq2/chashibhai-brassica-disease-cls}
}
MIT (see LICENSE). Ultralytics remains under its own license. This pack redistributes weights, not training images.