A container with a small API serving this model: https://huggingface.co/jxtc/resnet-50-embeddings
1.7K
This is a simple container to get the embeddings of an image using a resnet50 model. The model is loaded from an onnx file from this project: https://huggingface.co/jxtc/resnet-50-embeddings
To run this container ensure that you publish the port. The default one is the 8000.
docker run -p 8000:8000 jmservera/resnet50-embeddings
You can change the port using the UVICORN_PORT environment variable.
Once the container is running you can test the container with something like this:
curl -F "file=@./island.jpeg" http://localhost:8000/embed
Or use some code like this:
import requests
url = "http://localhost:8000/embed"
files = {'file': open('image.jpg', 'rb')}
response = requests.post(url, files=files)
print(response.json())
Content type
Image
Digest
sha256:cb1b3bf98…
Size
3.4 GB
Last updated
over 1 year ago
docker pull jmservera/resnet50-embeddings