Skip to content

usmanzahidi/MaskToCOCOJson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mask Image To COCO Json

Converts annotation mask images to COCO json

Requirements

python3 numpy opencv-python

Installation

git clone https://github.com/usmanzahidi/MaskToCOCOJson.git

Usage

usage: main.py [-i PATH] [-m PATH] [-f JSONFILE] 
-i rgb image folder path
-m annotation mask images folder
-f json output file name

define mask image's class names, ids and respective colours in class_definition.json

Example:

python main.py -i ./images/ -m ./annotations/ -f ./annotations/annotations.json

Test:

Once json file is generated, annotations can be tested by using Coco-viewer from https://github.com/trsvchn/coco-viewer

About

Convert mask annotation images to COCO Json

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages