https://github.com/saladtechnologies/image-segmentation-api
A lightweight inference API for Segment Anything
https://github.com/saladtechnologies/image-segmentation-api
Last synced: 8 months ago
JSON representation
A lightweight inference API for Segment Anything
- Host: GitHub
- URL: https://github.com/saladtechnologies/image-segmentation-api
- Owner: SaladTechnologies
- License: mit
- Created: 2024-01-12T14:58:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-12T17:18:27.000Z (over 1 year ago)
- Last Synced: 2025-02-16T16:58:58.676Z (8 months ago)
- Language: Python
- Size: 1.79 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# image-segmentation-api
A lightweight inference API for Segment Anything## Download the model
```shell
wget https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth -P models/
```## Example use
```bash
curl -X POST "http://localhost:7999/segment" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "file=@test.jpg;type=image/jpeg" \
-F "segment_request=@test.json;type=application/json"
``````bash
curl -X GET "http://localhost:7999/segment?url=https%3A%2F%2Fsalad-benchmark-assets.download%2Fcoco2017%2Ftrain2017%2F000000000143.jpg&multimask_output=true" \
-H "accept: application/json"
```