What is LabelImg and why we use it?
Download Image annotation tool (LabelImg)
Once running this tool, you should get a GUI window of that tool like below.
Now click on "Open Dir" and select the directory where you have saved all the images in previous tutorial.
Now its time to begin annotate the images. To annotate images select "Create\RectBox" button. Draw bounding box around the interest of object (In our case its cavity) and add readable name and press "Ok / save" to save your first annotation. Repeat this process for all the images. Below are some short keys to perform above steps.
- w: To draw the bounding box
- ctrl+s: To save the annotate image.
Once you have annotate all the images, in result of annotation you have XML (automatically created) files for each images. For example if you have 100 images than in the result of image annotation you also have 100 XML files. The question is what is inside these XML files. These XML files contains the information of annotated images like (width, height, xmin, xmax, ymin, ymax). Below is sample of XML file.
<annotation> <folder>Images</folder> <filename>_Farha_25062018_102109.tif</filename> <path>C:\Users\Desktop\Images\_Farha_25062018_102109.tif</path> <source> <database>Unknown</database> </source> <size> <width>648</width> <height>587</height> <depth>1</depth> </size> <segmented>0</segmented> <object> <name>cavity</name> <pose>Unspecified</pose> <truncated>0</truncated> <difficult>0</difficult> <bndbox> <xmin>317</xmin> <ymin>260</ymin> <xmax>431</xmax> <ymax>375</ymax> </bndbox> </object> </annotation>
In our next tutorial we will create TFRecords using these images and xml files.
1 Comments
nice
ReplyDelete