This repository holds an auxiliary script to convert coco annotations to labelme format.
This script allows the user to transform coco annotations to labelme format by simply specifying the coco.json file, the image folder and output folder.
Package requirements can be easilly installed via pip using the following command:
pip install -r requirements.txtEven though it can be installed in the global python environment, it is prefferable to install it in a virtual environment as follows:
-
Install
virtualenvif you don't already have it.pip install virtualenv -
Create a new virtual environment via the
virtualenvpackage.
virtualenv .venv
3.Install python packages requirements.
pip install -r requirements.txt
Make sure you are on the correct folder with the appropriate files in it, and that the correct virtualenv is active, then, type on terminal:
python coco2labelme.py <coco_json> <data_path> <output_dir>In order to run, please take notice of the three positional parameters.
- coco_json: coco.json file to be converted.
- data_path: Images data path, must match coco json filenames.
- output_dir: Output dir, must not previously exist.
For questions and sugestions, you can reach me on Zulip, or e-mail me.
Lucas Ceschini, Aug 29, 2022.