A backend service which implement segment anything
Python
:^3.11
poetry
:^1.x
Segment Anything Model
poetry
installation guide: https://python-poetry.org/docs/#installation
poetry install
.env
# COS config
COS_SECRET_ID=<your cos secret id>
COS_SECRET_KEY=<your cos secret key>
COS_REGION=<your cos region>
COS_BUCKET=<your cos bucket>
# SAM
SAM_MODEL_CHECKPOINT=./sam_vit_h_4b8939.pth
SAM_MODEL_TYPE=vit_h
- run with
python
python main.py
- run with
uvicorn
uvicorn main:app --reload
- run with
poetry
poetry run uvicorn main:app --reload