Dockerized FastAPI wrapper around the recognize-anything image recognition models
1.4K
Github: https://github.com/mnahkies/recognize-anything-api
Dockerized FastAPI wrapper around the impressive recognize-anything image recognition models.
Run the image:
docker run -it --rm --gpus all -p 8000:8000 mnahkies/recognize-anything-api
Note: this assumes you have
the nvidia container runtime
installed, but omitting --gpus all should still work fine running inference on the CPU.
Then make requests using your client of choice, eg:
curl --verbose -F file=@/path/to/image.jpg localhost:8000/
All model weights, etc are baked into the docker image rather than fetched at runtime.
This means it's possible to run this image without granting it internet access, and hopefully means it will continue to work in 6 months time. You can verify this by running the image with --net none and using docker exec trying:
curl --verbose -F file=@/opt/app/recognize_anything/images/demo/demo1.jpg localhost:8000/
Caveat, the image is huge (~20gb, of which ~13gb is weights, ~6gb pip dependencies) as a result - though it could probably be slimmed down a bit.
Content type
Image
Digest
sha256:9deca2d60…
Size
13.8 GB
Last updated
over 2 years ago
docker pull mnahkies/recognize-anything-api