pip3 install -r requirements.txt
- Save some photos with your custom object(s), ideally with
jpgextension to./data/rawdirectory. (If your objects are simple like ones come with this repo, 20 images can be enough.) - Resize those photo to uniformed size.
python resize_images.py --raw-dir ./data/raw --save-dir ./data/images --ext jpg
Resized images locate in ./data/images/
-
Train/test split those files into two directories,
./data/images/trainand./data/images/test -
Annotate resized images with labelImg, generate
xmlfiles inside./data/images/trainand./data/images/testfolders.
Tips: use shortcuts (w: draw box, d: next file, a: previous file, etc.) to accelerate the annotation.
I already uploaded notebook in my file system https://colab.research.google.com/github/mmm84766/Oblect_Detection-with-custom_data/blob/master/Quality_Inspection.ipynb