yolov7-segment-txt

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

Class 0, normalized center (0.15,0.4), size (0.2,0.4), confidence 0.8. Explicit settings: save_conf=True, no tracking, YOLOv5 save_format=0. On a 200 × 100 image this is pixel box [10,20,50,60]. YOLOv7 segmentation TXT contains boxes only.

Example

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

0 0.15 0.4 0.2 0.4 0.8

Convert to a standard format

Use Converter.convert with source="yolov7-segment-txt" and target="coco". Your application supplies the predictions and any required image context or producer settings. The adapter validates whether the output contains the information the target needs.

General conversion example and required context

Inspect the intermediate representation for this example

This developer example prints ISIR, the internal representation used between adapters. Run from the repository checkout; no model download is needed.

python3 examples/formats/to_isir.py yolov7-segment-txt

How to interpret it

Coordinates: Box center and size, divided by original image width/height respectively.

Columns: class, x_center, y_center, width, height, confidence (only with save_conf)

Confidence: Last column is present only when save_conf is enabled; disabled by default.

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

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

Source definitions