dinglufe/segment-anything-cpp-wrapper

What should I do if the input size of the modified image is 640x480, and the obtained mask cannot coincide with the original image?

Opened this issue · 3 comments

What should I do if the input size of the modified image is 640x480, and the obtained mask cannot coincide with the original image?

The simplest way is to resize the image to the size expected by the model (e.g., 1024x720). But a preferred method is to re-export a preprocessing model for 640x480. Export preprocessing model

The simplest way is to resize the image to the size expected by the model (e.g., 1024x720). But a preferred method is to re-export a preprocessing model for 640x480. Export preprocessing model

The second method currently doesn't work. #41

The general issue is that using the longest side 1024 means you have to conduct a bunch of extra computation. So getting a mask is extremely slow.

I need to use image sizes of 128x128, since more it's a waste of compute. Anyone has any ideas?

The only option i see is to retrain the model and have costume encoder size.