What are annotations?
Annotations represent detailed information about a specific image that can be used in the training process.
Annotations can specify a category assigned to the entire image (for classification training) or the position of 0 or more objects along with their categories (for detection training).
Annotations can be represented by files that are compatible with different formats. Our portal currently supports two annotation formats:
Annotation files can be imported into the portal when uploading images, as long as they are saved in one of the supported formats and meet the requirements outlined below. Similarly, when downloading, we can specify the format in which we would like to export our annotations.
For Pascal VOC, the annotation file in .xml format must be structured as below:
<annotation> <filename>image.jpg</filename> <path>image.jpg</path> <source/> <size> <width>716</width> <height>716</height> <depth>3</depth> </size> <segmented>0</segmented> <object> <name>FLASHLIGHT</name> <pose>Unspecified</pose> <truncated>0</truncated> <difficult>0</difficult> <occluded>0</occluded> <bndbox> <xmin>290</xmin> <xmax>580</xmax> <ymin>169</ymin> <ymax>557</ymax> </bndbox> </object> </annotation>
For Darknet TXT, the annotation file with the .txt extension must have a structure shown below:
2 0.6075418994413407 0.5069832402234636 0.40502793296089384 0.5418994413407822
USB_ADAPTER SQUISHY_TOY FLASHLIGHT
The file in which all category names are listed must be named
labels.txt. Otherwise, the annotations will not be read correctly by the portal. The first number in a line in the annotation file indicates the category index from the
labels.txt file, numbered from zero upward.