Skip to content

Image Annotation

BrunoGeorgevich edited this page Feb 1, 2022 · 4 revisions

Annotated objects

In this project, three classes of objects were annotated:

  1. Persons;
  2. Guns;
  3. Helmets.

Collecting images

We sought to find videos and images that contained the required objects, mainly in the context of security cameras. Thus, the images used in the project were collected from open-source datasets and videos found on the internet (Youtube, Twitter, Dailymotion, etc.). In the case of the videos, it was necessary to extract frames from each of them, and for that, we used a python code.

Datasets

Tools for annotation

Two tools were employed to annotate the images in YOLO format, EVA: Video Annotation Tool and LabelImg.

EVA is a web-based tool for efficient annotation of videos and image sequences. The annotation is done on a bounding box level, and it can be exported in YOLO or Pascal VOC format.

The big difference between this tool and others is its ability to track the same object in later images/frames. This feature can save a lot of time in the annotation process, but care is a must when using this trace for many objects, as this can cause the program’s overall performance to deteriorate.

LabelImg is a graphical image annotation tool. The annotation is done by drawing bounding boxes from a class of user-defined objects and can be saved as XML files in PASCAL VOC, as YOLO, or as CreateML format.

Compared to EVA, it performs slightly better and can zoom in on images. However, it cannot track objects.

Annotation format

In the entire process of annotating images in this project, we used the YOLO format. This format consists of a .txt file for each image, containing the class, x and y coordinates, height, and width of each object.

<object-class> <x> <y> <width> <height>

Thus, the YOLO format was chosen as the design standard due to its short, easy-to-read, and understandable text.

Annotation process

The image annotation process carried out in this project followed the following steps:

  1. Choose the preferred annotation program;
  2. Select the images to be annotated and set the annotation format to YOLO;
  3. Draw the bounding boxes for each person, weapons, and helmets in the images as accurately as possible;
  4. Check if all objects were annotated and if they were annotated with the correct classes;
  5. Export the images and annotations, checking if each has its corresponding annotation file.