Skip to content

Qt5 Based Annotation Tools for Mediam.ai including Stream Classification, Brand Recognition, Face Detection & Recognition, Ticker Detection & Recognition

License

Notifications You must be signed in to change notification settings

codeadeel/Annotation-Tool

Repository files navigation

Annotation Tool

The subject code is responsibe for handling Qt5 based annotation tool for following modules:

  • Stream Classification & Brand Recognition
  • Face Detection & Recognition
  • Ticker Detection & Recognition

Subject annotation tool can be used to perform basic and quick annotation of new data. Data handling in annotation tool is based on MongoDB. Dummy files are provided in Dummy_Files folder in repository.

MongoDB can be pulled from Docker Hub. It is recommended to use following command to pull MongoDB image from Docker Hub:

docker pull mongo@sha256:6743836d42756b2ae50549b2eb4585c688fce81a243cedd152b56266c2fb3d17

After downloading MongoDB image from Docker Hub, MongoDB can be started using the following command:

docker run -d -p 27017:27017 --name mongodb mongo@sha256:6743836d42756b2ae50549b2eb4585c688fce81a243cedd152b56266c2fb3d17

After MongoDB is up and running, Dummy_Files can be added to some single database, as individual collection in MongoDB for experimentation with subject annotation tool. Links to respective files for each module are provided below:

Database name needs to be hardcoded in annotation.py, as following:

annotation.py > Ui_Dialog > connect_pressed >

load_db_name = 'brs' # Target Database on MongoDB

Annotation tool can be built by Dockerfile. The build image contains all necessary libraries to develop, test and deploy annotation tool. By running the following command in current Dockerfile directory, we can easily build image:

docker build -t annotation_tool:basic .

After successful build, we can start annotation tool by running follwoing command in terminal:

xhost + # Only one time run
docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name annotation_instance annotation_tool:basic

Subject annotation tool has four tabs, named as following:

  • Connect
  • SCBR
  • Face Detection
  • Ticker Detection

The above tabs are discussed briefly below:

This tab is responsible for connecting annotation tool to database. In this tab, first we need IP address of database to connect to. Then we connect with database which was hardcoded in annotation bool build process. After successful connection, we can select collection to connect to and also respective channel to perform annotation for. An image as example is attached following:

Annotation Tool Connect Tab

In above given example, user would enter 172.17.0.3:27017 as IP address of the database to connect. Target collection and channel to annotate for is inference and HUM respectively. After starting annotation, user can proceed to respective annotation tool tab.

This tab is responsible for performing annotation for SCBR. In this tab, we are presented with image, and we are required to annotate it. Backend code for system feedback of brand recognition should be developed according to system architecture designed. Other than that, it can perform stream classification annotation and identify brands. An image as example is attached following:

Annotation Tool SCBR Tab

In above given example, user would annotate on the basis of per frame or iteratively using respective buttons. After being done with annotation, data can be directly saved to database.

This tab is responsible for performing annotation for Face Detection & Recognition. In this tab, we are presented with image, and we are required to draw boxes and annotate them respectively and iteratively. In other words, it can annotate face detection and respective annotation. An example image is attached following:

Annotation Tool Face Detection Tab

In above given example, user would annotate on the basis of per frame or iteratively using respective buttons. After being done with annotation, data can be directly saved to database.

This tab is responsible for performing annotation for Ticker Detection & Recognition. In this tab, we are presented with image, and we are required to draw boxes and annotate them respectively and iteratively. In other words, it can annotate ticker detection and respective annotation. An example image is attached following:

Annotation Tool Ticker Detection Tab

In above given example, user would annotate on the basis of per frame or iteratively using respective buttons. After being done with annotation, data can be directly saved to database.

Annotation tool can be further developed using Qt Designer. It is a part of build process in annotation tool build. Qt Designer can be accessed by running follwoing command in terminal:

xhost + # Only one time run
docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --name annotation_instance annotation_tool:basic qtchooser -run-tool=designer -qt=5

By running the above command, you will be presented with following screen:

Qt Designer Main Screen

After that, we need to open annotation_tool.ui file, available in /home directory in Qt Designer. An example image is attached following:

Qt Designer Example File

Just like above example, you can further develop annotation tool and can export boilerplate code to python by running following command in /home or respective directory:

pyuic5 ./annotation_tool.ui -o annotation_new.py

After generating new code, you can integrate your own backend code.

Subject annotation can be deployed on following platforms:

  • Virtual Machines
  • Containers
  • Native Host Machine Installation

Whatever the deployment method is, it is required for database to be accessible over network.

About

Qt5 Based Annotation Tools for Mediam.ai including Stream Classification, Brand Recognition, Face Detection & Recognition, Ticker Detection & Recognition

Topics

Resources

License

Stars

Watchers

Forks