The image encoder and decoder might be making assumptions about image resizing that we don't want for all image sizes, but we can change these optimizations later.
With this, the image encoder runs at about 10x speed of the CPU encoder in https://github.com/developmentseed/sam-service/pull/1, with 1 second per image on an average GPU (my 1080 Ti). There's further gains to be made I think by compiling with ONNX (lower lift) or TensorRT (higher lift).
To test it out, follow the steps in the README, then run the
test_endpoint.ipynb
.This addresses: https://github.com/developmentseed/segment-anything-geo/issues/1
The image encoder and decoder might be making assumptions about image resizing that we don't want for all image sizes, but we can change these optimizations later.
With this, the image encoder runs at about 10x speed of the CPU encoder in https://github.com/developmentseed/sam-service/pull/1, with 1 second per image on an average GPU (my 1080 Ti). There's further gains to be made I think by compiling with ONNX (lower lift) or TensorRT (higher lift).
cc @geohacker @srmsoumya @batpad