efficientvit icon indicating copy to clipboard operation
efficientvit copied to clipboard

SAM box issue using mps (macos)

Open Chris-toe-pher opened this issue 9 months ago • 1 comments

There is an issue when running the SAM model on MacOS where boxes return a really poor output. This is using mps / metal acceleration with PYTORCH_ENABLE_MPS_FALLBACK=1 due to this op not being implemented:

The operator 'aten::upsample_bicubic2d.out' is not currently implemented for the MPS device.

I've tried some workarounds - running on cpu does indeed work as expected with very good box results but its very slow. With mps its very fast and the results with point selection are good.

Does anyone have an insight into why box selection is falling apart with the upsample_bicubic2d issue? It would be great if there was a way to workaround!

Many thanks, Chris

Chris-toe-pher avatar May 09 '24 13:05 Chris-toe-pher

How can I get a better result given the coordinates of the box

chenminupup avatar Jun 13 '24 13:06 chenminupup