Links

Part 5 — Integrate custom tracker into Videos Annotator tool [OpenCV Tracker]

In this part, we will learn how to integrate any tracker into Videos Annotator.

Table of contents

  1. 2.
    Trackers
  2. 4.
    Results

Step 1 — Videos Annotator?

Ok. This is the video annotation tool available in Supervisely. To launch the Videos Annotator, click on the videos dataset. Done!
Videos Project
Videos Annotation Tool

Step 2 — Trackers

Supervisely has two types of tracking algorithms:
  1. 1.
    Predefined — our base tracking solutions
  2. 2.
    Apps — custom tracking solutions
They become available when you select the annotated object. In this part, we will integrate our own tracker (Apps).
Track Settings

Step 3 — Creating the APP

1. Add session tag to config
In order for the Videos Annotator to see our application, we link it through the sessions tags space.
Only through the sly_video_tracking tag will Videos Annotator see our application. So:
config.json (partially)
"session_tags": [
"sly_video_tracking"
]
2. Handle track command
How to handle commands — see here. The most important thing is to write a handler for the track command.
src/main.py (partially)
@g.my_app.callback("track")
@sly.timeit
@send_error_data
def track(api: sly.Api, task_id, context, state, app_logger):
tracker = TrackerContainer(context)
tracker.track()
The OpenCV tracker logic is described here. You can replace it with your own code (your own tracker).

Step 4 — Results

Integrate custom tracker into Videos Annotation tool