Skip to content

MELSunny/ConvertCOCO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ConvertCOCO

Description

This project is the toolbox to convert your own dataset to COCO dataset.

Installation

Please install the environment by anaconda

conda install -c conda-forge opencv cython pylab matplotlib
git clone https://github.com/cocodataset/cocoapi.git
cd cocoapi/PythonAPI
python setup.py install

Usage

Configuration

Edit your settings.json to adapt your own dataset.

envs  //Basic environment
 DataPath  //Your own dataset path
 ImgFmt  //Your own dataset image format
 IgnoreSize  //ignore the small region which the size is below than IgnoreSize
category  //Your dataset category description
 id  //Category id
 name  //Category name
 supercategory  //Super Category. For example: For category: boy,girl,man,woman. Their super category is human.
info  //Just modify it whatever you like

Structure of dataset path

<DataPath>
 gt+<category name1>
  image1.<ImgFmt>
  image2.<ImgFmt>
  image3.<ImgFmt>
 gt+<category name2>
  image1.<ImgFmt>
  image2.<ImgFmt>
  image3.<ImgFmt>
 gt+<category name3>
  image1.<ImgFmt>
  image2.<ImgFmt>
  image3.<ImgFmt>
 SourceIMG
  image1.<ImgFmt>
  image2.<ImgFmt>
  image3.<ImgFmt>  

Generate gt.json

Please run gt2json.py, if anything above is done.

About

Convert your own dataset to COCO dataset.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages