https://github.com/kagawagao/sa
A backend service which implement segment anything
https://github.com/kagawagao/sa
Last synced: 3 months ago
JSON representation
A backend service which implement segment anything
- Host: GitHub
- URL: https://github.com/kagawagao/sa
- Owner: kagawagao
- License: mit
- Created: 2023-12-06T01:19:44.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-03T15:53:01.000Z (about 1 year ago)
- Last Synced: 2025-01-22T10:14:03.580Z (5 months ago)
- Language: Python
- Homepage:
- Size: 729 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SA
> A backend service which implement [segment anything](https://github.com/facebookresearch/segment-anything)
## Requirement environment
- `Python`: `^3.11`
- `poetry`: `^1.x`
- [`Segment Anything Model`](https://github.com/facebookresearch/segment-anything?tab=readme-ov-file#model-checkpoints)> `poetry` installation guide: [https://python-poetry.org/docs/#installation](https://python-poetry.org/docs/#installation)
## Installation dependencies
```bash
poetry install
```## Configuration file
- `.env`
```properties
# COS config
COS_SECRET_ID=
COS_SECRET_KEY=
COS_REGION=
COS_BUCKET=# SAM
SAM_MODEL_CHECKPOINT=./sam_vit_h_4b8939.pth
SAM_MODEL_TYPE=vit_h
```## Start server
- run with `python`
```bash
python main.py
```- run with `uvicorn`
```bash
uvicorn main:app --reload
```- run with `poetry`
```bash
poetry run uvicorn main:app --reload
```