Skip to content

VathsalaAchar/image-classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ONNX Model Inference with FastAPI

This is a small FastAPI application that has a /predict endpoint for classifiying images using the Resnet-18 ONNX model.

The model and the imagenet classes are downloaded when the server is started.

Run the Webserver locally

fastapi dev main.py

Test the API

curl -X POST "http://127.0.0.1:8000/predict" -F "file=@path/to/image.jpg"

Result:

{
  "predicted_class_index": 123
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages