CobotSort YOLO11n — colored-cube detector trained only on synthetic images

YOLO11n fine-tuned to find colored cubes (and purple "defect" cubes) seen from the top camera of a simulated collaborative-robot sorting cell. Every training image was rendered in MuJoCo and labeled automatically from segmentation renders, with domain randomization of lighting, colors, camera pose and distractors. No real photo was used, and the model was never tested on a real camera.

It is the perception module (module V) of CobotSort AI, a simulated cobot sorting cell with a safety layer and an LLM operator agent.

CobotSort demo: the agent sorts the cubes by color

Português: detector YOLO11n treinado só com imagens sintéticas (MuJoCo, randomização de domínio) para achar cubos coloridos numa célula robótica simulada. Avaliado contra um baseline clássico (HSV) num conjunto com iluminação nunca vista. Nunca foi testado com câmera real.

Classes

0 red_cube · 1 green_cube · 2 blue_cube · 3 defect (purple cube that goes to the reject bin)

Usage

pip install ultralytics huggingface_hub

from huggingface_hub import hf_hub_download
from ultralytics import YOLO

pesos = hf_hub_download("VictorGoncalves/cobotsort-yolo11n-cubes", "cobotsort_yolo11n.pt")
modelo = YOLO(pesos)

# 640x480 top-camera image of the cell (try one from the dataset repo)
resultado = modelo.predict("imagem.png", conf=0.6)[0]   # 0.6 is the cell's operating threshold
for cls, conf, box in zip(resultado.boxes.cls, resultado.boxes.conf, resultado.boxes.xyxy):
    print(modelo.names[int(cls)], round(float(conf), 2), box.tolist())

In the cell, each box center goes through a pinhole camera model (pixel_to_world, cube center at z = 2 cm) to become a pick position for the robot.

Results

From cobotsort eval-vision (results/perception.md). mAP, precision and recall are computed by the project's own code for both detectors, so YOLO and the HSV baseline are scored the same way. Precision and recall are at the cell's operating point (confidence ≥ 0.6, IoU ≥ 0.5). Localization error is the distance between pixel_to_world(box center) and the true cube center. CPU time on the author's desktop CPU (Intel, 14 threads), first 3 frames excluded.

Detector Set Images Boxes Precision Recall mAP@50 mAP@50-95 CPU ms/frame Loc. error mean / p95 (mm)
HSV (classical) synthetic test 120 901 1.000 0.977 0.992 — 2.1 1.64 / 3.93
HSV (classical) hard lighting, never seen 150 1126 0.989 0.927 0.942 — 2.1 1.97 / 5.42
YOLO11n (this model) synthetic test 120 901 1.000 0.998 1.000 0.986 22.1 1.45 / 1.65
YOLO11n (this model) hard lighting, never seen 150 1126 0.989 0.978 0.991 0.950 21.8 1.38 / 2.37

The hard set tilts the light up to 60°, varies diffuse light from 0.08 to 1.3 and ambient light from 0.02 to 0.7, and tints the light color per channel by up to ±0.25, beyond anything in the training images.

Ultralytics' own validator, run on the synthetic test split with this file, gives mAP@50 = 0.995 (its AP interpolation differs from the project's).

In the cell (20 automatic episodes, 176 cubes, fixed lighting and camera), the detector's localization error measured at every scan is 0.91 mm, and cubes end 0.91 mm (mean) from their bin slot centers, with 0% in the wrong bin (results/benchmark.md). The gripper carries the detection error into the bin, which is why the two numbers match.

Training curves

Confusion matrix

Training

Item Value
Base YOLO11n pretrained on COCO (Ultralytics)
Data 560 train / 120 val synthetic images, 640×480, 6,018 boxes in the whole synthetic set, classes balanced
Schedule 40 epochs, image size 640, batch 16, seed 0, Ultralytics default augmentation (mosaic off for the last 10 epochs)
Time 336 s on an RTX 3060
Code cobotsort dataset → cobotsort train → cobotsort eval-vision

Limitations

  • Simulation only. Trained and tested on MuJoCo renders. Real cameras add blur, noise, lens distortion and reflections that the renders do not have; expect a drop on real images.
  • One scene. Cubes about 25–30 px across on the cell's table, seen from above. Other objects, backgrounds or viewpoints are out of scope.
  • Small objects are a known weakness of one-stage detectors; a two-stage detector is a planned comparison.

License

AGPL-3.0, the license of Ultralytics YOLO11, which this model is fine-tuned from. The CobotSort code is also AGPL-3.0-or-later.

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

Model tree for VictorGoncalves/cobotsort-yolo11n-cubes

Finetuned
(217)
this model

Dataset used to train VictorGoncalves/cobotsort-yolo11n-cubes