segmentation / README.md
smerkd's picture
Duplicate from smerkd/labos-segmentation
4a4faae
metadata
license: mit

LabOS Segmentation Dataset

A curated instance segmentation dataset of laboratory equipment that foundation models (SAM,Gemini,YoloWorld,Grounded) consistently struggle with and used to cover their gaps — including vortex genies, eppendorf tubes, multi-tube racks, colored caps, and fine-grained sub-parts like rack holes, tube tops, and mixer plates.

Annotations are provided in both COCO JSON and YOLO polygon formats.


Why This Dataset?

General-purpose vision models fail on lab equipment for several reasons:

  • Repetitive, nearly-identical sub-objects — racks with dozens of uniform holes challenge, most foundation models have failed at, both detection and counting.
  • Transparent / translucent materials — eppendorf tubes and caps have subtle visual boundaries.
  • Fine-grained part segmentation — distinguishing a vortex genie top plate from its body, or an orange cap top from its barrel, requires part-level understanding that VLMs lack.
  • Domain specificity — lab bench imagery is severely underrepresented in web-scraped pre-training data.

Dataset Statistics

Split Summary

Split Images Annotations
Train 228 2,736
Validation 57 579
Total 285 3,315

Split ratio: ~80 / 20 (train / val).

Annotations per Category

Category Train Val Total
14ml rack hole 1,263 59 1,322
rack 50ml hole 506 258 764
50ml eppendorf tube 182 67 249
50Ml eppendorf orange cap 108 34 142
14ml round bottom tube top 172 7 179
50Ml eppendorf orange cap top 91 30 121
50Ml rack 66 31 97
Vortex Genie 2 72 21 93
Vortex Genie Top Plate 59 14 73
Vortex Genie Hole 54 14 68
50Ml eppendorf cap 47 3 50
50Ml eppendorf blue cap 26 22 48
50Ml eppendorf cap top 40 3 43
14ml rack 33 2 35
50Ml eppendorf blue cap top 17 14 31
Total 2,736 579 3,315

File Structure

dataset-2/
├── images/                    # 285 PNG images (1280×720)
├── labels/                    # polygon segmentation (.txt, one per image)
├── annotations.json           # COCO format — all images
├── annotations_train.json     # COCO format — training split
├── annotations_val.json       # COCO format — validation split
├── dataset.yaml               # dataset config
└── demo_imgs/                 # Annotated visualization examples

Annotation Format

COCO JSON — bounding boxes + polygon segmentation masks per instance.

YOLO TXT — one file per image, each line:

<class_id> x1 y1 x2 y2 ... xN yN

Coordinates are normalized to [0, 1]. Annotations were created and exported from CVAT.


Example Visualizations

Color Category
#ff4646 Red Vortex Genie 2
#ffa000 Orange Vortex Genie Hole
#d2c300 Yellow Vortex Genie Top Plate
#32c832 Green 50ml eppendorf tube
#3282ff Blue 50Ml eppendorf cap
#aa32ff Purple 50Ml rack
#32dcb4 Teal rack 50ml hole
#ffc864 Gold 14ml round bottom tube top
#64b4ff Light blue 14ml rack hole
#c864ff Violet 14ml rack
#ff8c1e Dark orange Orange cap / orange cap top
#1e8cff Dark blue Blue cap / blue cap top

Small scene — vortex hole present, 7 classes (8 instances)

demo 27

Full lab scene — vortex genie + 14ml rack + 50ml tubes (113 instances)

demo 280

Vortex genie + 14ml rack with holes and tube tops (44 instances)

demo 274

50ml rack — blue and orange caps, rack holes, no vortex (16 instances)

demo 7

Vortex top plate + orange caps + rack holes (36 instances)

demo 177

Dense 50ml rack — blue, orange & generic caps with rack holes (81 instances)

demo 29

Vortex genie + orange caps, no rack holes (27 instances)

demo 234

Blue caps focus — rack holes and tube bodies (42 instances)

demo 82

14ml rack + vortex genie — large annotation count (130 instances)

demo 285


Pre-trained Weights

segment-yolo-weights.pt — YOLO segmentation model trained on this dataset. Load with:

from ultralytics import YOLO
model = YOLO("segment-yolo-weights.pt")
results = model("images/1.png")

License

MIT — see license field above.