facebookresearch / facebookresearch/sam2
Can I use SAM2 for video segmentation on a CPU ?
- Dominant language
- Jupyter Notebook
- Stars
- 19.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
Can I use SAM2 for video segmentation on a CPU with an Apple computer?When I run the program with CPU, this issue occurs. Can I use CPU for video segmentation?
Using device: cpu
frame loading (JPEG): 100%|██████████| 513/513 [00:10<00:00, 50.70it/s]
/Users/Desktop/segment-anything-2/sam2/sam2_video_predictor.py:787: UserWarning: cannot import name '_C' from 'sam2' (/Users/Desktop/segment-anything-2/sam2/__init__.py)
Skipping the post-processing step due to the error above. You can still use SAM 2 and it's OK to ignore the error above, although some post-processing functionality may be limited (which doesn't affect the results in most cases; see https://github.com/facebookresearch/sam2/blob/main/INSTALL.md).
pred_masks_gpu = fill_holes_in_mask_scores(
Contributor guide
Research direction
Read INSTALL.md and the warning site in sam2/sam2_video_predictor.py around line 787, then reproduce the reported CPU run on an Apple computer. Determine whether CPU video segmentation is supported and whether the missing _C import affects results; done means the supported behavior and any required setup are clearly documented or the warning is corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100