Okra Segmentation Detector (YOLO11n-seg / YOLOv8n-seg)

Single-class okra instance-segmentation weights, fine-tuned for a humanoid robot (Unitree G1) okra-harvest perception pipeline. Two architectures trained under identical data/masks/hyperparameters for comparison:

File Base model Params Size
okra11n-seg.pt yolo11n-seg ~2.9M 5.7 MB
okra8n-seg.pt yolov8n-seg ~3.4M 6.5 MB

Results (validation: 440 images, 1011 okra instances)

Metric okra11n-seg okra8n-seg
Box mAP@50 0.906 0.901
Box mAP@50-95 0.824 0.818
Mask mAP@50 0.904 0.899
Mask mAP@50-95 0.790 0.786
Mask precision 0.950 0.921
Mask recall 0.826 0.835

The two are essentially on par; yolo11n-seg is marginally ahead on mAP and precision and is smaller, while yolov8n-seg has slightly higher recall. Note: mask labels were SAM-generated (see below), so mask mAP measures agreement with the SAM teacher masks rather than against hand-drawn ground-truth contours.

How it was made

  • Data: 2,923 okra images (112 real field photos + 2,811 Roboflow-augmented), single class okra. Annotations were bounding boxes; converted to polygon masks with SAM 2.1-large (ultralytics.data.converter.yolo_bbox2segment).
  • Split: 2,483 train / 440 val, grouped by source image (augmentation variants kept in the same split to avoid validation leakage), stratified real vs synthetic.
  • Training: ultralytics 8.4.14, 100 epochs, imgsz=640, batch=16, single A10G GPU, seed=0.

Usage

from ultralytics import YOLO

model = YOLO("okra11n-seg.pt")          # or okra8n-seg.pt
results = model.predict("field.jpg", conf=0.30, retina_masks=True)
for r in results:
    print(r.boxes.xyxy, r.boxes.conf)   # okra boxes + confidence
    print(r.masks.xy)                   # okra polygon masks

Recommended ultralytics version for inference: 8.4.14 (matches training).

Intended use & limitations

  • Built for okra detection/segmentation in greenhouse/field harvest scenes, including green-on-green (okra against foliage). Detects okra pods; flowers are intentionally not flagged.
  • Single class only (okra). Not validated for ripeness grading.
  • Mask supervision is SAM-derived, not human-traced.

License

Derived from Ultralytics YOLO pretrained weights — AGPL-3.0.

Downloads last month
80
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support