zlai0 / MAST

MAST: A Memory-Augmented Self-supervised Tracker (CVPR 2020)
https://zlai0.github.io/MAST/
273 stars 32 forks source link

test problem #15

Open upxinxin opened 3 years ago

upxinxin commented 3 years ago

Thanks for your great job ! I hava trained my model successfully. But when i try to test my model on benmark.py, i notice that a 22G GPU is needed. But i only have 2 GPUs which has 12G memory. I tried to set the cuda decive but it didn't work. Can you give me some advice on my problem? Looking forwad to your reply !

zlai0 commented 3 years ago

I would say the easiest thing to try first is to use CPU for inference.

Another possibility is to reduce the number of channels (i.e. the maximum number of object tracked at a single time). For example, only track one object at test time, and repeat for all objects in the video. You can modify this in MAST/mast.py (line 16).

Finally. Since the most memory consuming operation is the correlation matrices, you could find a way to divide and conquer these large matrices. You can't process memorised images one by one because of the softmax operation, but splitting the spatial dimension should be theoretically ok. For example, cut the feature maps into 4 pieces and recombine them together? Be careful you need some overlapping edges though.