Training object detection on custom dataset
Credits: github
Use this tool (conveneint) https://github.com/tzutalin/labelImg
Make sure you save it in PASCAL (.xml file) format
voc_labels
in utils.py
according to your new labels.
Store the labels in "anotations" folder (or any other folder, just change the path in annotation.py
). Also change the path of images path
in annotation.py
for all images.
python annotation.py
Creates "TEST_images.json" , "TEST_objects.json" , "TRAIN_images.json" , "TRAIN_objects.json"
format: Train/Test_images.json
: [list of files names]
format: Train/Test_objects.json
: [{"boxes": [[..], [...], [...]], "labels": "boxes": [[..], [...], [...]]} , {...}, {...} ... ]
python verify.py
(check verify/
folder)
python modified_train.py
(check verify/
)
if you want to load pretrained weights : gdrive