visionml / pytracking

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

Tamos has many bugs #421

Closed setarekhosravi closed 7 months ago

setarekhosravi commented 7 months ago

when I run run_video or run_webcam for Tamos (both tamos_swin_base and tamos_resnet50), I face many errors and most of them are related to /pytracking/tracker/tamos/tamos.py, I think this initialize function from Tamos class is not executed. some of the errors: self.frame_num += 1 AttributeError: 'TaMOs' object has no attribute 'frame_num' or backbone_feat = self.net.extract_backbone(im_patches) AttributeError: 'TaMOs' object has no attribute 'net' or AttributeError: 'TaMOs' object has no attribute 'img_sample_sz'

Please help me to solve this.

note: There is no problem when I use run_video or run_webcam for running ToMP tracker on webcam or on my own video.

setarekhosravi commented 7 months ago

by checking the tracker.py in evaluation folder, I realized that when you select the region the initialize function won't be executed. I solved the problem, I should use --optional_box instead of select the region by mouse, or you can modify UIControl class (I did it too)

swrdZWJ commented 2 months ago

Hi, I meet the same question. I want to track multiple objects at the same time. How to give multiple target boxes in the first frame and track multiple objects at once through "run_video.py". Could you help me? Thanks very much :)

setarekhosravi commented 2 weeks ago

@swrdZWJ Hi, I didn't do the same, but recently I've been working on multiple object tracking, I tried some weaker trackers such as SiamFC and another transformer-based tracker named SMAT. For tracking multiple objects you need to initialize the tracker per object individually, then update the tracker for each. but you should pay attention, your total FPS will decrease as much as objects increase. your changes must be applied to tracker.py or write a new code.