You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ResNet (Residual Network) is a convolutional neural network that democratized the concepts of residual learning and skip connections. This is a BentoML example project, demonstrating how to build an image classification inference API server with a ResNet model (ResNet-50 v1.5) and BentoML.
See here for a full list of BentoML example projects.
This repo demonstrates pulling the the model weights from Hugging Face and storing them in the BentoML model store. It allows you to gain full control over the model weights and leverage model loading acceleration during a container cold start. To download and store the model weights in the BentoML model store, run the import_model.py script.
python import_model.py
We have defined a BentoML Service in service.py. Run bentoml serve in your project directory to start the Service.
bentoml serve .
2024-01-08T09:07:28+0000 [INFO] [cli] Prometheus metrics for HTTP BentoServer from "service:Resnet" can be accessed at https://localhost:3000/metrics.
2024-01-08T09:07:28+0000 [INFO] [cli] Starting production HTTP BentoServer from "service:Resnet" listening on https://localhost:3000 (Press CTRL+C to quit)
Model resnet loaded device: cuda
The Service is accessible at https://localhost:3000. You can interact with it using the Swagger UI or in other different ways:
CURL
curl -s \
-X POST \
-F 'images=@cat1.jpg' \
https://localhost:3000/classify
After the Service is ready, you can deploy the application to BentoCloud for better management and scalability. Sign up if you haven't got a BentoCloud account.