validate command checks annotation datasets for errors, warnings, and potential issues without performing a conversion.
Usage
Parameters
Path to the dataset to validate. Can be a file or directory depending on the format.
Input format to validate against.Supported values:
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-xmlTreat warnings as errors. When enabled, the command exits with a non-zero status if any warnings are found.Useful for CI/CD pipelines where you want to enforce strict dataset quality.
Output format for the validation report.Options:
text- Human-readable report with colors and formattingjson- Machine-readable JSON for programmatic use
Validation Checks
Panlabel performs comprehensive validation including:Error-Level Issues
- Missing required fields (image dimensions, file names, category IDs)
- Invalid bounding box coordinates (negative values, width/height)
- Referenced categories that don’t exist in the category list
- Duplicate image IDs or annotation IDs
- Malformed data structures
Warning-Level Issues
- Bounding boxes partially or fully outside image bounds
- Images with no annotations
- Unusual aspect ratios or dimensions
- Missing optional metadata
- Suspicious coordinate values
Examples
Basic Validation
Validate YOLO Dataset
Strict Mode for CI/CD
JSON Output for Automation
Validate VOC Dataset
Annotations/ and JPEGImages/ subdirectories.
Output Format
Text Report Example
JSON Report Example
Strict Mode Behavior
When--strict is enabled:
- All warnings are promoted to errors
- The command exits with code 1 if any warnings exist
- The report clearly indicates strict mode was active
- Useful for enforcing dataset quality in automated workflows
Example with Strict Mode
Exit Codes
0- Validation successful (no errors, or warnings only in non-strict mode)1- Validation failed (errors found, or warnings found in strict mode)
Integration Examples
Pre-Conversion Validation
CI/CD Pipeline
Batch Validation
See Also
Convert Command
Convert datasets (includes validation)
Stats Command
Analyze dataset statistics