Skip to content

Matching the datas generated by labelme and labelimg.

License

Notifications You must be signed in to change notification settings

AprilNEA/label-match

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

label-match

This is a script that will match the labels of labelimg and labelme of the same image one by one and output them together in another file.

Run

Prepare in advance

  1. An empty folder to hold your output files
  2. A folder full of labelme label datas

There are only one standard output format of labelme and you can get an example here.

  1. A folder full of labelimg label datas

You can get further information here

The label output format of labelimg is YOLO Darknet TXT, ex:

1 0.408 0.302 0.104 0.15
1 0.245 0.424 0.046 0.08
  1. A file containing a list of labelimg labels

You should separate your labels with spaces

1.Poetry(recommend)

poetry run python3 label-match.py \
--labelme_dir <your_labelme_path> \
--labelimg_dir <your_labelimg_path> \
--output_dir <your_output_path> \
--classes_file <your_classes_path>

*: poetry will help you install dependencies when you first run it.

2.Pip3

Install environment first:

pip3 install -r requirements.txt

Then run it:

python3 label-match.py \
--labelme_dir <your_labelme_path> \
--labelimg_dir <your_labelimg_path> \
--output_dir <your_output_path> \
--classes_file <your_classes_path>

Contribute

commit message guidelines

TODO lists

  • Add test module
  • Add log module
  • Use external label lists
  • better matching algorithm
  • Add conversion options
  • Async I/O