foolwood / SiamMask

[CVPR2019] Fast Online Object Tracking and Segmentation: A Unifying Approach
http://www.robots.ox.ac.uk/~qwang/SiamMask
MIT License
3.47k stars 816 forks source link

Can anyone please explain how segmentaion during detection helps tracking of an object? #180

Open SamihaSara opened 3 years ago

SamihaSara commented 3 years ago

As SiamMask is a Tracking By Segmentation pipeline and this helps to keep a more accurate representation of the object across time. Here in the codes can someone please point out where is segmentation results are being integrated during tracking?

zosel260 commented 3 years ago

@SamihaSara
From tools/test.py, you can see codes like:

 if refine_enable:
            mask = net.track_refine((delta_y, delta_x)).to(device).sigmoid().squeeze().view(
                p.out_size, p.out_size).cpu().data.numpy()

in this codes, mask is the segmentation result obtained from the refinement module. The final rotated bbox is computed from this mask.

SamihaSara commented 3 years ago

@zosel260 If I want to use MinMax bounding Box by un-commenting the following line--> https://github.com/foolwood/SiamMask/blob/0eaac33050fdcda81c9a25aa307fffa74c182e36/tools/test.py#L293

I get the following error: location = state2[obj_id]['ploygon'].flatten() AttributeError: 'tuple' object has no attribute 'flatten'

Can you please suggest how to solve this issue?

ahmedosamaz commented 3 years ago

@zosel260 If I want to use MinMax bounding Box by un-commenting the following line-->

https://github.com/foolwood/SiamMask/blob/0eaac33050fdcda81c9a25aa307fffa74c182e36/tools/test.py#L293

I get the following error: location = state2[obj_id]['ploygon'].flatten() AttributeError: 'tuple' object has no attribute 'flatten'

Can you please suggest how to solve this issue?

could you solve this problem??

SamihaSara commented 3 years ago

@ahmedosamaz No, I have not. Still waiting for suggestions from others.