GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - k2-gc/object-detection-format-converter: Object Detection Dataset Format Converter

BranchesTags
Open more actions menu

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
src/objdet_converter
src/objdet_converter
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
pyproject.toml
pyproject.toml
 
 
sample.py
sample.py
 
 

Repository files navigation

object-detection-format-converter

Dataset format converter for object detection

Overview

Deep learning field for image processing has many dataset format. For object detection task, MSCOCO, YOLO, PascalVOC and so on are frequently used and sometimes we have to convert our dataset annotation files to another. To deal with this, I creat dataset format converter for object detection. Supported dataset formats are below.

  • MSCOCO
  • YOLO
  • PascalVOC
  • KITTI

Prerequisites

  • Python >= 3.8

Installation

Install python>=3.8 and run commands below in your venv or something.

pip install -U pip setuptools build
python -m build
pip install dist/objdet_converter-1.2.0-py3-none-any.whl

Usage

CLI

objdet-conv convert --src-format 'SRC_FORMAT' --dst-format 'DST_FORMAT' --src-path 'PATH_TO_SRC' --dst-path 'PAST_TO_OUTPUT' --class-txt-path 'IF NEEDED'

Supported format strings:

  1. coco
  2. yolo
  3. pascalvoc
  4. kitti

Example

objdet-conv convert --src-format yolo --dst-format coco --src-path ./yolo_dir --dst-path ./output --class-txt-path ./yolo_dir/classes.txt

Call from Function

Call 'convert_format' function with some args.

Example

from objdet_converter.convert import convert_format

convert_format(
    src_format="coco",
    dst_format="yolo",
    src_path="./coco.json",
    dst_path="./yolo_output",
    class_txt_path="",
)

Sample code is available here. Detail descriptions are here

If args of 'class_txt_path' is empty, scan all annotation files and create class list automaticaly(alphabetical order).

Detail Description

Description of Each Data Format

  • MSCOCO
  • YOLO
  • PascalVOC
  • KITTI
  • Custom Dataset Implementation

About

Object Detection Dataset Format Converter

Topics

dataset-converterdeep-learningkittikitti-datasetmscocomscoco-datasetobject-detectionobject-detection-datasetspascal-vocpascal-voc-datasetpythonpython3yoloyolo-dataset

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.