facebookresearch / facebookresearch/segment-anything

Segmentation error on MPS device

Open
#458 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
54.9k
Forks
6.4k
PR merge metrics
No merged PRs in 30d

Description

Hi, I was doing some tests with CT images and while using the vit_h model on mps in my macbook pro it gives me the following strange result.
![mps](https://github.com/facebookresearch/segment-anything/assets/57805630/5399492a-9f2b-42a4-9e82-b3bdc9f0ae71)

On the same macbook I tested on cpu and it gave a very different and more meaningful result, the same result that I had on my desktop with cuda.
![cpu](https://github.com/facebookresearch/segment-anything/assets/57805630/ca1dce4f-10e8-4e97-b167-67b7752b9f85)

Is there some problem with pytorch on MPS?

Contributor guide

Open the contributing guide

Research direction

The report names CT images, the vit_h model, and MPS, CPU, and CUDA execution but no source file or test. Reproduce the inference on MPS and compare it with CPU output, then investigate whether the discrepancy is in Segment Anything or PyTorch's MPS support; done means a documented cause or a minimal reproducible finding.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, macos
Domain
computer-vision, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.