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

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!

Step 2 — Trackers

Supervisely has two types of tracking algorithms:

  1. Predefined — our base tracking solutions

  2. Apps — custom tracking solutions

They become available when you select the annotated object. In this part, we will integrate our own tracker (Apps).

Step 3 — Creating the APP

1. Add session tag to config

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

Last updated