visionml / pytracking

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

Can tomp process multiple images at once as batches? #419

Closed ninono12345 closed 3 months ago

ninono12345 commented 7 months ago

Hello @martin-danelljan I want to ask you for advice, since you have been more active.

Is it possible so that for example if I'm tracking 4 objects at once, that I could send into track a tensor with 4 batches, instead, so tracking woud do all computations for all 4 objects at once, instead passing through neural networks 4 separate times?

I tried just to simulate 2 frame tracking to do torch.cat with 2 image tensors (the same frame to be tracked 2 times, next time I would use different ones), didn't work... Tried to torch.cat inside classify_target all variables that enter neural networks, also didn't work... Now I'm studying the algorithm, but I wanted to ask you in theory is this possible, or would it be too much work?

Thank you

2006pmach commented 3 months ago

Have a look at TaMOs our most recent tracker. It is designed to track multiple objects at the same time more efficiently.

ninono12345 commented 3 months ago

Sorry, didn't forgot to reply, already figured it out. I concatenate the input tensors and very slightly change predict_cls_bbreg_filters_parallel, and tomp.py classify target