What is LabelImg and why we use it?





Download Image annotation tool (LabelImg)





w: To draw the bounding box ctrl+s: To save the annotate image.

<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>

Welcome to the TensorFlow Object Detection API tutorial part 2. There are wide number of labelling tool but in this tutorial we will use LabelImg tool to annotate our downloaded images in the previous tutorial using "Google Images" and "Bing".To perform labelling task for image classification or image segmentation we use LabelImg tool. Its very easy for anyone to get started with LabelImg. There are many tools for labelling but in this tutorial we are going to use LabelImg. LabelImg tool is used to draw the bounding box around the interested object from an image in object detection. For example from an image of radio graphic teeth we need to draw a bounding box around the cavity (object of interest), to perform this activity we need labelling tool (In our case it would be ""). These tools are allow us to put boxes around object(s).There are two links to download LabelImg tool, the first one is from github (if you use this than you need to download or clone the file and extract it to use that tool.) And the another is direct download (just download and use).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 "" 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.Once you have annotate all the images, in result of annotation you have(automatically created) files for each images. For example if you have 100 images than in the result of image annotation you also have 100files. The question is what is inside thesefiles. Thesefiles contains the information of annotated images like (width, height, xmin, xmax, ymin, ymax). Below is sample of XML file.In our next tutorial we will create TFRecords using these images and xml files.