← 返回
效率工具 中文

Annotation Format Converter

Convert annotation files between COCO, YOLO, VOC, and LabelMe formats with auto-detection and support for batch processing of folders.
在COCO、YOLO、VOC和LabelMe格式之间转换标注文件,支持自动格式检测及文件夹批量处理。
mingo-318
效率工具 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 564
下载
💾 9
安装
1
版本
#latest

概述

Annotation Format Converter

Convert annotation formats between COCO, YOLO, VOC, and LabelMe. Use when user needs to convert annotation files between different formats for computer vision tasks.

Features

  • COCO → YOLO: Convert COCO JSON to YOLO txt format
  • YOLO → COCO: Convert YOLO txt to COCO JSON
  • VOC → COCO: Convert Pascal VOC XML to COCO JSON
  • LabelMe → COCO: Convert LabelMe JSON to COCO JSON
  • Auto-detect: Automatically detect input format
  • Batch Convert: Convert entire folders

Usage

# Convert COCO JSON to YOLO
python scripts/converter.py coco2yolo input.json output_dir/

# Convert YOLO txt to COCO
python scripts/converter.py yolo2coco input_dir/ output.json

# Convert VOC XML to COCO
python scripts/converter.py voc2coco input_dir/ output.json

# Auto-detect and convert
python scripts/converter.py convert input.json output.json --from coco --to yolo

# List supported formats
python scripts/converter.py formats

Supported Formats

FormatExtensionDescription
--------------------------------
COCO.jsonCOCO JSON annotation
YOLO.txtYOLO darknet format
VOC.xmlPascal VOC XML
LabelMe.jsonLabelMe JSON

Examples

COCO to YOLO

$ python scripts/converter.py coco2yolo annotations.json yolo_labels/

Converting COCO to YOLO...
✓ Converted 150 annotations to yolo_labels/

YOLO to COCO

$ python scripts/converter.py yolo2coco labels/ output.json --image-dir images/

Converting YOLO to COCO...
✓ Converted 150 annotations to output.json

Installation

pip install pillow tqdm

Requirements

  • Python 3.8+
  • Pillow (for image dimensions)
  • tqdm (for progress bar)

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 16:52 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 446 📥 226,454
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 440 📥 148,113
content-creation

Batch Rename

mingo-318
支持自定义模式、前缀、后缀及序列编号对图像数据集和标注文件进行重命名,并提供预览和撤销功能。
★ 0 📥 756