pytorch-labs / segment-anything-fast

A batched offline inference oriented version of segment-anything
Apache License 2.0
1.21k stars 72 forks source link

May I ask if this project can be deployed and used through libtorch? #118

Open ZhaoDidididi opened 6 months ago

ZhaoDidididi commented 6 months ago

How do I convert the official weight of Sam to the. pt format that libtorch can use.

ZhaoDidididi commented 6 months ago

I tried to use torch.jit.trace(sam.mask_decoder, input_data) and torch.jit.script(sam.mask_decoder, input_data) to save the .pt file,but it failed.