facebookresearch / facebookresearch/sam2
_C.get_connected_componnets decord collapse issue
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to build an interactive app using sam2. However, when I call _C.get_connected_components(), the process terminates without any error. I checked for compilation issues, but there are none.
I noticed that the issue occurs when importing sam2._C after importing decord.
Here is my test code:
```
import torch
from decord import VideoReader
from sam2 import _C
mask = torch.ones((2, 1, 64, 64)).to('cuda')
res = _C.get_connected_components(mask.to(torch.uint8).contiguous())
print(res)
```
If I import decord after importing sam2._C, the code works normally. I tried both decord==0.5.2 and 0.6.0, but the issue persists. Is there any other solution?
Contributor guide
Assessment
This issue has not been assessed yet.