Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.56 KB

README.md

File metadata and controls

43 lines (29 loc) · 1.56 KB

FastSAM Segment Anything

[📕Paper] [🤗HuggingFace Demo] [Colab demo] [Replicate demo & API] [Model Zoo] [BibTeX]

FastSAM Speed

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.

FastSAM design

🍇 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

  1. "cd FASTSAM_AWSOME_OPENVINO/src/Python" # change to python dir
  2. "pip install -r requirements.txt" # install the requirements
  3. "python FastSAM.py --model_path <model_path> --img_path <img_path>" # Inference

Inference with cpp

Note:

  1. "cd FASTSAM_AWSOME_OPENVINO/src/CPlusPlus"
  2. Set OpenVINO_DIR in this CMakeLists.txt to your own openvino installation directory
  3. "mkdir build && cd build"
  4. "cmake .. && make -j4"

cat coco

Reference

https://github.com/ChuRuaNh0/FastSam_Awsome_TensorRT https://docs.openvino.ai/2023.1/home.html