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.
- An empty folder to hold your output files
- A folder full of labelme label datas
There are only one standard output format of labelme and you can get an example here.
- 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
- A file containing a list of labelimg labels
You should separate your labels with spaces
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.
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>
- Add test module
- Add log module
- Use external label lists
- better matching algorithm
- Add conversion options
- Async I/O