Official trained weights, NCNN/ONNX edge exports, and benchmarks for the Semi-Autonomous 8-Direction Weeding Rover (Raspberry Pi 4 + Sipeed MaixSense-A075V 3D ToF Depth Camera + ESP32 motor/turret controller).
design branch): BayazidHabibSiddikee/Semi-Autonomous-Weeding-Robotyolo26_kaggle_trained/)Trained on a unified, deduplicated 4,020-image bounding-box dataset (train: 3,407 · val: 365 · test: 248) with 2 classes:
0: crop1: weedimgsz=640)| Model | Precision | Recall | mAP50 | mAP50-95 | Crop mAP50 | Weed Recall | Weed mAP50 |
|---|---|---|---|---|---|---|---|
yolo26n (Pi 4 provisional default) |
0.7163 | 0.7829 | 0.8049 | 0.4790 | 0.8364 | 0.7459 | 0.7734 |
yolo26s (higher precision) |
0.7568 | 0.7958 | 0.8244 | 0.4705 | 0.8791 | 0.7384 | 0.7698 |
640×640, conf=0.30, same test images on x86_64 CPU)| Artifact | Runtime | Mean (ms) | Median (ms) | P95 (ms) | FPS | Avg Detections |
|---|---|---|---|---|---|---|
yolo26n_best.onnx |
ONNX Runtime | 84.5 | 76.8 | 114.9 | 11.83 | 5.73 |
weed_detector_ncnn_model/ (yolo26n) |
NCNN (FP16) | 255.6 | 245.5 | 296.7 | 3.91 | 5.73 |
yolo26s_best.onnx |
ONNX Runtime | 229.1 | 220.0 | 273.9 | 4.37 | 6.80 |
yolo26s_ncnn_model/ (yolo26s) |
NCNN (FP16) | 593.5 | 643.5 | 702.2 | 1.69 | 6.27 |
Why
yolo26nis the provisional Pi 4 default: It achieves higher weed recall (0.7459vs0.7384) andmAP50-95(0.4790vs0.4705) thanyolo26swhile running ~2.3–2.7× faster. Both NCNN (ARM NEON) and ONNX should be benchmarked directly on the target Raspberry Pi 4.
| File | Architecture | Input Dim | Classes |
|---|---|---|---|
best.onnx |
YOLOv8s ONNX | 256×320 | 9 Agricultural Classes (Maize, Sugar beet, Soy, Sunflower, Potato, Pea, Bean, Pumpkin, Weed) |
best.pt |
PyTorch YOLOv8s | 640×640 | 9 Agricultural Classes |
smartweeder_best.pt |
PyTorch YOLOv8n | 640×640 | 2 Classes (crop, weed) |
Weed_Detection)from ultralytics import YOLO
# Load YOLO26n NCNN (or yolo26n_best.onnx)
model = YOLO("yolo26_kaggle_trained/weed_detector_ncnn_model", task="detect")
results = model("field_sample.jpg", imgsz=640, conf=0.30)
for box in results[0].boxes:
cls_name = results[0].names[int(box.cls)]
conf = float(box.conf)
print(cls_name, conf, box.xyxy[0].tolist())
yolo26n vs yolo26s)Evaluated on real field footage (848x478 @ 30.08 FPS, 1,383 frames / 45.98s, conf=0.25, imgsz=640):
| Model | Mean Latency (CPU) | Effective FPS | Crop Detections | Weed Detections | Frames w/ Weed | Mean Weed Conf | Proof Video |
|---|---|---|---|---|---|---|---|
yolo26n_best.pt (Pi Default) |
134.63 ms | 7.43 FPS | 163 (137 frames) | 262 | 261 | 0.457 | yolo26n_proof.mp4 |
yolo26s_best.pt (Higher Model) |
421.46 ms | 2.37 FPS | 166 (138 frames) | 438 (+67%) | 394 | 0.386 | yolo26s_proof.mp4 |
best.onnx 45 MByolo26_kaggle_trained/yolo26s_best.onnx 38 MBbest.pt 23 MBsmartweeder_best.pt 23 MByolo26_kaggle_trained/yolo26s_best.pt 20 MByolo26_kaggle_trained/yolo26s_ncnn_model/model.ncnn.bin 19 MByolo26_kaggle_trained/yolo26n_best.onnx 10 MByolo26_kaggle_trained/yolo26n_best.pt 5 MByolo26_kaggle_trained/weed_detector_ncnn_model/model.ncnn.bin 5 MB