SysCV / sam-pt

SAM-PT: Extending SAM to zero-shot video segmentation with point-based tracking.
https://arxiv.org/abs/2307.01197
Apache License 2.0
950 stars 60 forks source link

want to get image mask, for use in bundlesdf project, just run demo line, #11

Closed wang-shuaikang closed 3 months ago

m43 commented 1 year ago

Hej, if you're looking to extract the mask logits from our demo, you can find the relevant line of code below. Is this what you were searching for?

https://github.com/SysCV/sam-pt/blob/228d7cd957d90cbb601b1b6c8ad885f71995a9f3/demo/demo.py#L134

2min77 commented 3 months ago

@m43 Hello Sir, after normal operation, should there be a mask in the form of pictures in the output folder? There is no mask picture in my output folder, thank you for your answer

m43 commented 3 months ago

For the demo unfortunately no, just the visualizations are created, but you can access the logits here. When running SAM-PT on VOS as documented here, the masks will automatically be saved to disk in the form of pictures as they are later needed for computing the VOS performance. You can see how in that case we process the logits here and save them to disk here.