Skip to content

About

Service for image classification with pytorch, flask and redis

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

Classification service

Service for image classification with PyTorch, Flask, Redis and Gunicorn.

Classifier uses the Resnet18, trained on ImageNet (1000 classes).

Run

  1. Install Docker.
  2. Install Docker Compose.
  3. Build and run services docker-compose up --build.

How to use

The service provides an asynchronous API.

  1. Send POST request for classification
    curl "http://0.0.0.0:8000/classify" -F "file=@my_image.jpg"
    If the file is successfully read by the system, you will receive a response in which there is a uuid key.

  2. Send GET request for checking result
    curl "http://0.0.0.0:8000/classify?uuid=<your_uuid>"
    Use uuid obtained on previous step, e.g. curl "http://0.0.0.0:8000/classify?uuid=b48b2506-962c-4592-a480-ed7756b88dde". You will receive the result of the prediction, or the status of the request processing.

About

Service for image classification with pytorch, flask and redis

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages