Awesome
FastSAM Segment Anything
[📕Paper
] [🤗HuggingFace Demo
] [Colab demo
] [Replicate demo & API
] [Model Zoo
] [BibTeX
]
The Fast Segment Anything Model(FastSAM) is a CNN Segment Anything Model trained by only 2% of the SA-1B dataset published by SAM authors. The FastSAM achieve a comparable performance with the SAM method at 50× higher run-time speed.
🍇 Refer from
https://github.com/CASIA-IVA-Lab/FastSAM
[[Original
]((https://github.com/CASIA-IVA-Lab/FastSAM)]
Export ONNX to IR
mo --input_model FastSAM-s.onnx --framework onnx
Inference with Python
"cd FASTSAM_AWSOME_OPENVINO/src/Python"
# change to python dir"pip install -r requirements.txt"
# install the requirements"python FastSAM.py --model_path <model_path> --img_path <img_path>"
# Inference
Inference with cpp
Note:
"cd FASTSAM_AWSOME_OPENVINO/src/CPlusPlus"
- Set OpenVINO_DIR in this CMakeLists.txt to your own openvino installation directory
"mkdir build && cd build"
"cmake .. && make -j4"
Reference
https://github.com/ChuRuaNh0/FastSam_Awsome_TensorRT https://docs.openvino.ai/2023.1/home.html