GitHub - KBH00/Semantic-Fast-SAM: SSA + FastSAM/Semantic Fast Segment Anything , or Fast Semantic Segment Anything (original) (raw)

Semantic-Fast-SAM

SSA + FastSAM

Installation

To install the required dependencies, run the following command:

git clone https://github.com/KBH00/Semantic-Fast-SAM.git

conda env create -f environment.yaml
python -m spacy download en_core_web_sm

You need to download Fast-SAM model checkpoint in here
Put FastSAM.pt in weights directory, mabye you should change the file name FastSAM-x.pt to FastSAM.pt

Inference

python scripts/main_ssa_engine.py --data_dir=data/<The name of your image> --out_dir=output --world_size=<choose GPU number>

Or, you can just run main_ssa_engine.py

Examples

Description of Image

Description of Image

References

Fast Segment Anythinghttps://github.com/CASIA-IVA-Lab/FastSAM

Semantic Segment Anythinghttps://github.com/fudan-zvg/Semantic-Segment-Anything