Skip to main content
The list-formats command displays a comprehensive table of all annotation formats supported by Panlabel, including their read/write capabilities and lossiness characteristics.

Usage

panlabel list-formats
No arguments or options are required.

Output

The command displays a formatted table showing:
  • FORMAT - The canonical format name
  • READ - Whether Panlabel can read this format
  • WRITE - Whether Panlabel can write this format
  • LOSSINESS - How much information is preserved relative to Panlabel’s IR
  • DESCRIPTION - Brief description of the format

Example Output

Supported formats:

  FORMAT       READ   WRITE  LOSSINESS    DESCRIPTION
  ------       ----   -----  ---------    -----------
  ir-json      yes    yes    lossless     Panlabel's intermediate representation (JSON)
  coco         yes    yes    lossless     COCO object detection format (JSON)
  cvat         yes    yes    conditional  CVAT for images XML annotation export
  label-studio yes    yes    conditional  Label Studio task export (JSON)
  tfod         yes    yes    lossy        TensorFlow Object Detection format (CSV)
  yolo         yes    yes    lossless     Ultralytics YOLO .txt (directory-based)
  voc          yes    yes    lossless     Pascal VOC XML (directory-based)

Lossiness key:
  lossless    - Format preserves all IR information
  conditional - Format may lose info depending on dataset content
  lossy       - Format always loses some IR information

Tip: Use '--from auto' with 'convert' for automatic format detection.

Lossiness Categories

Formats are classified into three lossiness categories:

Lossless

Formats that preserve all information from Panlabel’s intermediate representation:
  • ir-json - Panlabel’s native format (by definition lossless)
  • coco - COCO JSON preserves images, annotations, categories, and metadata
  • yolo - YOLO with data.yaml preserves all required information
  • voc - Pascal VOC XML preserves bounding boxes and metadata

Conditional

Formats that may lose information depending on dataset content:
  • cvat - Conditionally lossy based on:
    • Presence of annotation attributes not supported by CVAT
    • Dataset-level metadata that CVAT doesn’t represent
    • Images without annotations (may be handled differently)
  • label-studio - Conditionally lossy based on:
    • Task-level metadata structure
    • Annotation attributes specific to Label Studio’s schema
    • Image hosting and reference method
Conditional lossiness means the conversion report will indicate exactly what (if anything) is lost for your specific dataset.

Lossy

Formats that always lose some information:
  • tfod (TensorFlow Object Detection CSV) - Always lossy because:
    • No support for dataset-level metadata
    • Images without annotations are dropped
    • Limited category metadata (only ID and name)
    • No support for annotation attributes
    • No bounding box attributes beyond coordinates
When converting to a lossy format, use --allow-lossy or Panlabel will block the conversion and show what would be lost.

Format Details

ir-json

Panlabel’s intermediate representation (JSON)
  • Canonical internal format
  • Preserves all information
  • Human-readable JSON structure
  • Use as a universal interchange format

coco

COCO object detection format (JSON)
  • Industry-standard format
  • Single JSON file with all annotations
  • Widely supported by ML frameworks
  • Aliases: coco-json

cvat

CVAT for images XML annotation export
  • XML-based format from CVAT annotation tool
  • Can be single file or directory export
  • Supports rich annotation attributes
  • Aliases: cvat-xml

label-studio

Label Studio task export (JSON)
  • JSON format from Label Studio annotation platform
  • Array of task objects
  • Includes annotation metadata and provenance
  • Aliases: label-studio-json, ls

tfod

TensorFlow Object Detection format (CSV)
  • Simple CSV format
  • One row per annotation
  • Limited metadata support
  • Aliases: tfod-csv

yolo

Ultralytics YOLO .txt (directory-based)
  • Directory structure with labels/ subdirectory
  • One .txt file per image with normalized coordinates
  • Requires classes.txt and data.yaml for category info
  • Aliases: ultralytics, yolov8, yolov5

voc

Pascal VOC XML (directory-based)
  • XML format from Pascal VOC challenge
  • Directory structure with Annotations/ and JPEGImages/
  • One XML file per image
  • Aliases: pascal-voc, voc-xml

Using with Other Commands

The format names displayed by list-formats can be used directly with other Panlabel commands:

Convert Command

# Use format names from list-formats
panlabel convert --from coco --to yolo -i input.json -o ./output/

Validate Command

panlabel validate dataset.xml --format cvat

Stats Command

panlabel stats dataset/ --format yolo

Sample Command

panlabel sample -i input.json -o output.json --from label-studio --to coco

Checking Format Compatibility

Use list-formats to quickly check:
  1. Which formats support your use case: All listed formats support both read and write
  2. Potential information loss: Check the lossiness column before converting
  3. Available aliases: Use shorter names like ls instead of label-studio-json

Planning Conversions

# Check lossiness before converting
panlabel list-formats | grep tfod
# Output: tfod ... lossy ...

# Convert with awareness of potential loss
panlabel convert -f coco -t tfod -i input.json -o output.csv --allow-lossy

Integration Examples

Scripted Format Discovery

#!/bin/bash
# Get all supported formats programmatically
panlabel list-formats | tail -n +4 | head -n -5 | awk '{print $1}'

CI/CD Format Validation

# Verify a format is supported before processing
FORMAT="yolo"
if panlabel list-formats | grep -q "^  $FORMAT "; then
  echo "Format $FORMAT is supported"
else
  echo "Format $FORMAT is not supported"
  exit 1
fi

Tips

Use --from auto with the convert command to let Panlabel detect the format automatically. This works for most common format structures.
For lossless round-trip conversions, prefer formats marked as “lossless” in the output.
When working with multiple formats, convert to ir-json first as an intermediate step to ensure no information is lost.

See Also

Supported Formats

Detailed format specifications and examples

Convert Command

Convert between formats

CLI Overview

Overview of all CLI commands

Build docs developers (and LLMs) love