s6.app.data.convertΒΆ

Convert a structured annotation dataset into YOLO format.

Class labels correspond to vertex names (one bounding box per projected vertex). Reads annotation.jsonl and images from the input directory, generates train/val splits, copies images to images/{train,val}, writes YOLO label files, and creates data.yaml for Ultralytics YOLO training.

Examples

>>> python -m s6.app.data.convert -i ./dataset1 -o ./dataset1_yolo --val-ratio 0.2
s6.app.data.convert.parse_args()

Parse CLI options for dataset conversion to YOLO format.

s6.app.data.convert.load_annotations(ann_file)

Yield parsed InstrumentTrackingFrame entries from a JSONL file.

s6.app.data.convert.collect_classes(ann_file)

Collect ordered class names from vertex labels appearing in frames.

s6.app.data.convert.main()

Run the conversion and write YOLO dataset structure to output.