facebookresearch / facebookresearch/sam2

_C.get_connected_componnets decord collapse issue

Open
#298 1 comment 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.