convert command transforms annotation datasets from one format to another using Panlabel’s intermediate representation (IR) as a conversion hub.
Usage
Parameters
Source format. Use
auto for automatic detection.Supported values: auto, ir-json, coco, cvat, label-studio, tfod, yolo, vocAliases: coco-json, cvat-xml, label-studio-json, ls, tfod-csv, ultralytics, yolov8, yolov5, pascal-voc, voc-xmlTarget format.Supported values:
ir-json, coco, cvat, label-studio, tfod, yolo, vocAliases: Same as --from (except auto is not available)Input path to the source dataset. Can be a file or directory depending on the format.Short form:
-iOutput path for the converted dataset.Short form:
-oTreat validation warnings as errors. If enabled, conversion will fail if the input dataset has any warnings.
Skip input validation entirely. Use this for faster conversions when you’re confident the input is valid.Warning: Skipping validation may result in unexpected output if the input has issues.
Allow conversions that drop information (e.g., metadata, images without annotations).By default, Panlabel blocks lossy conversions and shows a report of what would be lost. Use this flag to proceed anyway.
Output format for the conversion report.Options:
text- Human-readable reportjson- Machine-readable JSON (prints only JSON to stdout)
Auto-Detection Behavior
When using--from auto, Panlabel detects the input format based on file extension and content:
Directory-based Detection
- YOLO: Directory contains
labels/subdirectory with.txtfiles, or the path itself is namedlabels/ - VOC: Directory contains
Annotations/with.xmlfiles andJPEGImages/subdirectory - CVAT: Directory contains
annotations.xmlat the root
File-based Detection
.csvfiles: Detected astfod(TensorFlow Object Detection).xmlfiles: Root element<annotations>indicatescvatformat.jsonfiles:- Array-root with Label Studio task structure →
label-studio - Object-root with
annotations[0].bboxas array →coco - Object-root with
annotations[0].bboxas object →ir-json
- Array-root with Label Studio task structure →
If multiple format markers match (ambiguous), auto-detection fails. Use
--from to specify the format explicitly.Examples
Basic Conversion with Auto-Detection
COCO to YOLO Conversion
Strict Validation During Conversion
Allow Lossy Conversion
Skip Validation for Speed
JSON Report Output
Convert Label Studio to CVAT
Conversion Report
After conversion, Panlabel prints a report showing:- Number of images, annotations, and categories converted
- Any information that was lost or transformed
- Lossiness warnings (if applicable)
- Conversion issues or edge cases
Text Report Example
Lossy Conversion Example
Format-Specific Notes
YOLO Conversions
YOLO Conversions
- YOLO is directory-based: output path should be a directory
- Requires
classes.txtanddata.yamlfor category information - Bounding boxes are stored in normalized coordinates (0-1)
VOC Conversions
VOC Conversions
- VOC is directory-based with
Annotations/andJPEGImages/subdirectories - Each image has a separate XML annotation file
- Output path should be the parent directory containing both subdirectories
TFOD Conversions
TFOD Conversions
- TFOD uses a single CSV file with all annotations
- May lose information like metadata or segmentation masks
- Images without annotations are dropped by default
CVAT Conversions
CVAT Conversions
- Can be a single XML file or a directory export
- Preserves annotation attributes and metadata
- Supports both file and directory-based formats
Exit Codes
0- Conversion successful1- Validation failed (with--strictor on errors)1- Lossy conversion blocked (without--allow-lossy)1- Format detection failed1- I/O or parsing errors
See Also
Supported Formats
Learn about all supported annotation formats
Validate Command
Validate datasets before conversion
Sample Command
Sample and convert in one step