Skip to main content

Datasetsconverter

datasetsconverter is a Python package for converting object detection datasets between COCO, YOLO, and PASCAL VOC formats, making it easier to work with different annotation types in computer vision projects.

Installation

Install DatasetConverter using pip:

pip install datasetsconverter

Usage

Convert COCO to YOLO

Convert COCO-formatted annotations to YOLO format.

from datasetsconverter import coco_to_yolo

coco_to_yolo(
    coco_path="path/to/coco/annotations.json",
    output_dir="path/to/output/yolo",
    image_dir="path/to/coco/images"
)

Convert YOLO to COCO

Convert YOLO annotations into COCO format.

from datasetsconverter import yolo_to_coco

yolo_to_coco(
    yolo_dir="path/to/yolo/labels",
    output_file="path/to/output/coco/annotations.json",
    image_dir="path/to/yolo/images"
)

Convert YOLO to PASCAL VOC

Transform YOLO annotations into PASCAL VOC format.

from datasetsconverter import yolo_to_pascalvoc

yolo_to_pascalvoc(
    yolo_dir="path/to/yolo/labels",
    output_dir="path/to/output/pascalvoc",
    image_dir="path/to/yolo/images"
)

Convert PASCAL VOC to YOLO

Convert PASCAL VOC annotations into YOLO format.

from datasetsconverter import pascalvoc_to_yolo

pascalvoc_to_yolo(
    pascalvoc_dir="path/to/pascalvoc/annotations",
    output_dir="path/to/output/yolo",
    image_dir="path/to/pascalvoc/images"
)

Convert COCO to PASCAL VOC

Convert COCO annotations into PASCAL VOC format.

from datasetsconverter import coco_to_pascalvoc

coco_to_pascalvoc(
    coco_path="path/to/coco/annotations.json",
    output_dir="path/to/output/pascalvoc",
    image_dir="path/to/coco/images"
)

Convert PASCAL VOC to COCO

Convert PASCAL VOC annotations into COCO format.

from datasetsconverter import pascalvoc_to_coco

pascalvoc_to_coco(
    pascalvoc_dir="path/to/pascalvoc/annotations",
    output_file="path/to/output/coco/annotations.json",
    image_dir="path/to/pascalvoc/images"
)

Metadata

Release files for datasetsconverter 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datasetsconverter 0.0.1
File Size Uploaded
datasetsconverter-0.0.1.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for datasetsconverter 0.0.1
File Interpreter ABI Platform
datasetsconverter-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.1 kB

Release files / datasetsconverter-0.0.1.tar.gz

Download URL datasetsconverter-0.0.1.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1135af99c3a179fe4d50f1c2fcc988ae580ab260edbfd6326bc5088c9fc044f5
BLAKE2b-256 checksum
How to use checksums
f86bf717008642dd9a647748f6767ab873eb02a21f325524a8a14f1953f3ab0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / datasetsconverter-0.0.1-py3-none-any.whl

Download URL datasetsconverter-0.0.1-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40256e69a34300ea9b17760e970187b2eb97e6407f35f4a4b400c0b58f7ae043
BLAKE2b-256 checksum
How to use checksums
9ada1f450333df4992f120ae58048bb8c5e72a2c7f7c9725b0b78294d7e3af41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page