Skip to main content
Not all annotation formats carry the same information. When you convert between formats, some fields may not have an equivalent in the target format — that’s what Panlabel calls “lossiness.” Rather than silently dropping data, Panlabel tells you exactly what would be lost and asks you to opt in with --allow-lossy. Every convert command generates a report explaining what happened.

Lossiness Model

A conversion report issue has a severity:
  • warning: real information loss risk; conversion is blocked unless --allow-lossy is set
  • info: deterministic policy note; never blocks conversion

Format-Level Lossiness

Each format has a general lossiness classification relative to Panlabel’s intermediate representation (IR):
FormatLossinessDescription
ir-jsonLosslessCan represent everything in the IR (round-trip safe)
cocoConditionalMay lose some information depending on dataset content
cvatLossyAlways loses some IR information
label-studioLossyAlways loses some IR information
tfodLossyAlways loses some IR information
yoloLossyAlways loses some IR information
vocLossyAlways loses some IR information
The format-level class is a general capability signal. Conversions are actually blocked only when the report contains one or more warning issues.

JSON Report Format

With --report json, the output follows this shape:
{
  "from": "coco",
  "to": "yolo",
  "input": {"images": 10, "categories": 3, "annotations": 40},
  "output": {"images": 10, "categories": 3, "annotations": 40},
  "issues": [
    {"severity": "warning", "code": "drop_dataset_info", "message": "..."},
    {"severity": "info", "code": "yolo_writer_float_precision", "message": "..."}
  ]
}
The report includes:
  • from/to: source and target format names
  • input/output: counts of images, categories, and annotations before and after conversion
  • issues: list of warnings and info notes with stable codes

Stable Issue Codes

These codes are designed to be stable for programmatic use.

Warning Codes

CodeMeaning
drop_dataset_infoDataset-level metadata is dropped
drop_licensesLicense list is dropped
drop_image_metadataImage metadata fields (license/date) are dropped
drop_category_supercategoryCategory supercategory is dropped
drop_annotation_confidenceAnnotation confidence values are dropped
drop_annotation_attributesAnnotation attributes are dropped
drop_images_without_annotationsImages without annotations will not appear (TFOD behavior)
drop_dataset_info_nameinfo.name has no COCO equivalent
coco_attributes_may_not_be_preservedSome COCO-tool roundtrips may not preserve nonstandard attributes
label_studio_rotation_droppedRotated Label Studio boxes are flattened to axis-aligned envelopes; angle is kept as ls_rotation_deg attribute

Info Codes

CodeMeaning
tfod_reader_id_assignmentTFOD reader deterministic ID policy
tfod_writer_row_orderTFOD writer deterministic row order
yolo_reader_id_assignmentYOLO reader deterministic ID policy
yolo_reader_class_map_sourceYOLO class map precedence/source note
yolo_writer_class_orderYOLO writer class index assignment policy
yolo_writer_empty_label_filesYOLO writer creates empty label files for unannotated images
yolo_writer_float_precisionYOLO normalized float precision policy
voc_reader_id_assignmentVOC reader deterministic ID assignment policy
voc_reader_attribute_mappingVOC reader mapping of pose/truncated/difficult/occluded attributes
voc_reader_coordinate_policyVOC reader coordinate policy (no 0/1-based adjustment)
voc_reader_depth_handlingVOC reader depth metadata handling note
voc_writer_file_layoutVOC writer XML path/layout policy
voc_writer_no_image_copyVOC writer placeholder JPEGImages policy
voc_writer_bool_normalizationVOC writer boolean normalization policy
label_studio_reader_id_assignmentLabel Studio reader deterministic ID assignment policy
label_studio_reader_image_ref_policyLabel Studio reader image reference mapping policy
label_studio_writer_from_to_defaultsLabel Studio writer default from_name / to_name policy
cvat_reader_id_assignmentCVAT reader deterministic ID assignment policy
cvat_reader_attribute_policyCVAT reader coordinate + attribute mapping policy
cvat_writer_meta_defaultsCVAT writer minimal <meta> block policy

Examples of Lossy Conversions

COCO to YOLO

When converting from COCO to YOLO, several types of information are lost:
panlabel convert -f coco -t yolo -i dataset.json -o ./yolo_out --allow-lossy
This conversion will drop:
  • Dataset-level metadata (info fields)
  • License information
  • Image metadata (license_id, date_captured)
  • Category supercategories
  • Annotation confidence scores
  • Annotation attributes

TFOD Behavior

TFOD has a unique behavior: images without annotations will not appear in the output.
panlabel convert -f coco -t tfod -i dataset.json -o output.csv --allow-lossy
If your input has 100 images but only 80 have annotations, the output will contain only those 80 images.

VOC Attribute Preservation

VOC can preserve some annotation attributes but drops others:
panlabel convert -f coco -t voc -i dataset.json -o ./voc_out --allow-lossy
Preserved attributes:
  • pose
  • truncated
  • difficult
  • occluded
All other custom attributes will be dropped.

Practical Guidance

1

Check the conversion report

If conversion is blocked, run once with --report json to see exactly which warning codes triggered the block:
panlabel convert -f coco -t yolo -i input.json -o output --report json
2

Review what will be lost

Examine the issues array in the JSON report to understand what information will be dropped.
3

Opt in with --allow-lossy

Only use --allow-lossy when you accept those specific losses:
panlabel convert -f coco -t yolo -i input.json -o output --allow-lossy
Prefer explicit --allow-lossy only when you accept those specific losses. Never use it blindly without reviewing the conversion report first.

Understanding Conditional Lossiness

The COCO format is marked as “Conditional” because it may lose some information depending on your dataset content:
  • Dataset name (info.name): COCO has no equivalent field, so this is always lost
  • Custom attributes: COCO round-trips area and iscrowd via attributes, but other attributes may not be preserved by COCO tools
# Converting IR JSON to COCO may trigger warnings
panlabel convert -f ir-json -t coco -i dataset.json -o coco_output.json
If your IR dataset has a name field or custom attributes, you’ll see warnings about potential data loss.

Build docs developers (and LLMs) love