Skip to content

Latest commit

 

History

History
 
 

SAM

SAM notebooks

This folder contains demo notebooks regarding Meta AI's SAM (segment anything model):

Check also the official Hugging Face notebooks for general usage and automatic mask generation.

ONNX export

Note that SAM can also be exported to ONNX using the 🤗 Optimum library:

optimum-cli export onnx --model path_to_your_checkpoint sam_onnx/

ONNX is useful when putting the model in production, as one can apply several quantization techniques to speed up inference. Note that there are also 2 custom flags, --point_batch_size and --nb_points_per_image. See this PR which added support for it.