facebookresearch / facebookresearch/sam2
[Question]: How to get original size from sam2_video_predictor?
Open
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
Hi:
I have a question regarding the return dimensions of the masks in the `SAM2VideoPredictor` class versus the `SAM2ImagePredictor` class.
When I use the `predict` function in `SAM2ImagePredictor` I get my original image's dimensions, but when I use the `propagate_in_video` method in `SAM2VideoPredictor` the returned masks are of the shape expected in the config files, specifically, (1 x 1024 x 1024).
It seems if I convert this mask to a numpy image and use cv2 to resize, this works, but I'm curious if there is a more correct/standard way of doing this?
Contributor guide
Assessment
This issue has not been assessed yet.