Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Setogit/labelimg-data-converter

Converts labelimg meta data to yolo format. See https://github.com/tzutalin/labelImg
https://github.com/Setogit/labelimg-data-converter

Last synced: about 2 months ago
JSON representation

Converts labelimg meta data to yolo format. See https://github.com/tzutalin/labelImg

Awesome Lists containing this project

README

        

# labelimg-data-converter
Converts labelimg meta data to yolo format. See https://github.com/tzutalin/labelImg

```
$ python labelimg_data_converter.py -h
usage: python labelimg_data_converter.py such as "cat,dog,horse,pig"

Converts labelimg meta data to yolo meta data. The original image files
(*.jpg) and lalbelimg meta data XML files (*.xml) must exist in sub-
directories named "movie" where is an positive integer number. In
the sub-directories, the jpg and xml files must exist with file names as
"frame.jpg" and "frame.xml where is either 3- or 4-digit
number. For example, /movie1/frame001.xml or
/movie123456/frame1234.xml

positional arguments:
classes [REQUIRED] a comma delimited list of
class_name:class_id pairs. space characters are
preserved. e.g., "dog:1,cat:0,horse:3,peter rabbit:5"
is translated to {"cat": 0, "dog": 1, "horse": 3,
"peter rabbit": 5}

optional arguments:
-h, --help show this help message and exit
-s SRC, --source SRC directory where the original labelimg meta data XML
and image JPG files resides. default: "source"
-d DEST, --destination DEST
directory where the sanitized and converted yolo meta
data TXT and image JPG as well as the original
labelimg meta data XML will be stored. default:
"destination"
-b SUBDIR, --subdir SUBDIR
sub-directory where the generated files are stored
beneath the destination directory. default: "data"
-e HEADER, --header HEADER
string used as header of the generated yolo meta data
TXT file names. default: "sample"
-p {(0.0 .. 1.0) exclusive}, --percentage_test {(0.0 .. 1.0) exclusive}
float number between 0.0 and 1.0 exclusive to specify
the amount of labeled images to be used for validation
in training. default: 0.1, which means 10 percent.
```