hkchengrex / Tracking-Anything-with-DEVA

[ICCV 2023] Tracking Anything with Decoupled Video Segmentation
https://hkchengrex.com/Tracking-Anything-with-DEVA/
Other
1.23k stars 128 forks source link

Get object features from inner layers for Object Tracking #102

Closed GuanghaoJin closed 3 months ago

GuanghaoJin commented 3 months ago

Hi, I'm pretty new to pytorch, i have been using TF and keras until now, but this model's results are very promising!

My question is: how can I get this 256 or 512 size feature vector for each detected object from the model without rewiting the whole model class.

Maybe something in class MaskDecoder?

Thanks in advance

hkchengrex commented 3 months ago

The feature p16 here might be a good choice https://github.com/hkchengrex/Tracking-Anything-with-DEVA/blob/b4387fe31519305fc35d209d022c82a687c6b4bd/deva/model/big_modules.py#L185