samexporter icon indicating copy to clipboard operation
samexporter copied to clipboard

Is there any plan to add support for SAM2.1

Open Anivie opened this issue 1 year ago • 2 comments

Any plan to add support for SAM2.1?

Anivie avatar Nov 03 '24 09:11 Anivie

You can export SAM 2.1 ONNX models for image prediction using export_onnx.py in sam-cpp-macos repository.

Install Segment Anything Model 2 and download checkpoints.

checkpoints

Copy yaml files in sam2/configs/sam2.1 to sam2.

configs

Put export_onnx.py and david-tomaseti-Vw2HZQ1FGjU-unsplash.jpg to the root folder.

export

To export an ONNX model.

python export_onnx.py --mode export

To check how the ONNX model works.

python export_onnx.py --mode import

You can download exported SAM 2.1 ONNX models.

ryouchinsa avatar Dec 01 '24 16:12 ryouchinsa

@ryouchinsa Thank you. It works well.

GzuPark avatar Dec 17 '24 02:12 GzuPark