visionml / pytracking

Visual tracking library based on PyTorch.
GNU General Public License v3.0
3.23k stars 605 forks source link

Start tracking from specific frame of the video - ATOM #314

Closed manthan2305 closed 2 years ago

manthan2305 commented 2 years ago

Hello @martin-danelljan , I am experimenting with the ATOM tracker. Current setup for run_video.py takes --optional_box for the first frame.

Is it possible to pass or modify the main function, so that it can also take --frame_no as an input parameter to start tracking from that frame? Because my object is not visible in the first frame. And I want to pass the entire video to the tracker.

Ahsanr312 commented 2 years ago

You can modify it to anything you like, possible two solutions that I have tried are:

  1. Just select an arbitrary ROI in the first frame and press enter so that the tracker starts the tracking and when you encounter your object just press "r" and reselect the object and press enter than the tracker will start tracking your object.

  2. You can make changes to the run_video functional in class Tracker in tracker.py at evaluation folder so that it doesn't pause the video at the first frame but stop it when you press a key and than select your object and resume again.

I hope it helps.

martin-danelljan commented 2 years ago

Thanks @Ahsanr312 for the answers. Very appreciated! 🙂