Skip to main content

A Python library for object detection format conversion

Project description

VisualFlow

VisualFlow is a Python library for object detection that provides conversion functions between Pascal VOC, YOLO, and COCO formats. It aims to simplify the process of converting annotated datasets between these popular object detection formats.

Installation

You can install VisualFlow using pip:

pip install visualflow

Usage

VisualFlow provides three main conversion functions: to_voc(), to_yolo(), and to_coco(). Here's how you can use them:

Conversion to YOLO Format

To convert from PASCAL VOC or COCO format to YOLO format, use the to_yolo() function.

For VOC to YOLO:

import visualflow as vf

vf.to_yolo(input_type='voc',
       image_folder='path/to/images',
       ann_folder='path/to/annotations',
       output_folder='path/to/output')

For COCO to YOLO:

import visualflow as vf

vf.to_yolo(input_type='coco',
       image_folder='path/to/images',
       output_folder='path/to/output',
       json_file='path/to/annotations.json')

Conversion to Pascal VOC Format

To convert from COCO or YOLO format to Pascal VOC format, use the to_voc() function.

For COCO to VOC:

import visualflow as vf

vf.to_voc(input_type='coco',
       image_folder='path/to/images',
       output_folder='path/to/output',
       json_file='path/to/annotations.json')

For YOLO to VOC:

import visualflow as vf

vf.to_voc(input_type='yolo',
       image_folder='path/to/images',
       ann_folder='path/to/annotations',
       class_file='path/to/classes.txt',
       output_folder='path/to/output')

Conversion to COCO Format

To convert from PASCAL VOC or YOLO format to COCO format, use the to_coco() function.

For VOC to COCO:

import visualflow as vf

vf.to_coco(input_type='voc',
       image_folder='path/to/images',
       ann_folder='path/to/annotations',
       class_file='path/to/classes.txt',
       output_file_path='path/to/output.json')

For YOLO to COCO:

import visualflow as vf

vf.to_coco(input_type='yolo',
       image_folder='path/to/images',
       ann_folder='path/to/annotations',
       class_file='path/to/classes.txt',
       output_file_path='path/to/output.json')

Make sure to replace 'path/to/images', 'path/to/annotations', 'path/to/classes.txt', and 'path/to/output' with the actual paths to your dataset files and folders.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on GitHub.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

VisualFlow-0.1.2.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

VisualFlow-0.1.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file VisualFlow-0.1.2.tar.gz.

File metadata

  • Download URL: VisualFlow-0.1.2.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for VisualFlow-0.1.2.tar.gz
Algorithm Hash digest
SHA256 32de0a9dfb1c8bf0c6131718bd708813f699e29eafc7beeb567522a7e3c1740e
MD5 f6f85c30c49a6bb9454846e44769f248
BLAKE2b-256 49f2e266448d40b882c66a18ebf5773c97d5c701d1860e386f00f3326b1e2efc

See more details on using hashes here.

File details

Details for the file VisualFlow-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: VisualFlow-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for VisualFlow-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bcbe4090b08e758c4d5380a57f2c9f083c5cd475576e386a4b49090519c50f0f
MD5 a59e4fb50fb205c9ee0da610d22da260
BLAKE2b-256 6f76495c27d360665fdcfe64a2cfef8a1e71696eab68f9742005071babbdac4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page