ultralytics-segment-txt

All format examples · Machine-readable schema · Convert outputs to COCO

Class 0 followed by four normalized x/y vertices and confidence 0.8. Explicit settings: save_conf=True, no tracking. No box is serialized; the optional suffix settings must be known.

Example

Illustrative values, not predictions from a model. Unless stated otherwise, the image is 200 pixels wide and 100 pixels high.

0 0.05 0.2 0.25 0.2 0.25 0.6 0.05 0.6 0.8

Convert to a standard format

This format is documented, but a conversion adapter is not yet registered.

General conversion example and required context

How to interpret it

Coordinates: Results.masks.xyn: polygon coordinates normalized to original-image width/height.

Columns: class, x1, y1, ..., xn, yn, confidence (only with save_conf), track_id (only for tracking results)

Confidence: Confidence is included only with save_conf; a tracking ID, when present, follows it.

Classes: Zero-based model class index. Class meanings require the producing model class-name mapping, which is not embedded.

Tracking: Tracking appends an integer track_id after the optional confidence. A sixth detection column can therefore be confidence OR track_id; the producer options must be known.

Metadata: No image dimensions, image path or class names in each row. Keep source-image association externally.

Masks: Writes contour coordinates instead of box coordinates when masks are present; no binary mask or box is included. Contours with fewer than three points are omitted.

Source definitions