In this section, we will describe how to create an annotation file. There is one annotation file that corresponds to each image file. The annotation file is typically in .xml format. The steps to create the annotation file are described here:
- In this step, use labelImg to create an annotation file. This step has already been discussed in Chapter 7, Object Detection Using YOLO, but is repeated here again. Download labelImg using the terminal command pip install labelImg.
- After downloading it, just type labelImg in the terminal to open.
- Define your source (the .jpg file) and your destination (the .xml file) directory.
- Select each image and draw a rectangle around it. Define the class name and save it. ...