No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Image Classification API for Data Selfie

This is the code for the image classification API that is used by Data Selfie. Its main components are Yolo and Darknet, used via the pyyolo-wrapper for image classification and Gunicorn for reliable server functionality.

Build it yourself

Install pyyolo

Follow the installation instructions of pyyolo. To avoid unexcessary logging of the prediction times for each image, I got rid of this line before the install.

Download weight file

For Data Selfie, we are using weights from the makers of Darknet as described on this page.


Download this repo

Finally, clone this repo with

git clone

The folder structure should look like this:

├── data-selfie-image-classification
│   ├── ...
├── pyyolo
│   ├── ...
└── weights
    └── yolo.weights

A few more dependencies

Before running the server, we need to install pillow, flask, request, numpy

pip install pillow flask request numpy

and gunicorn, greenlet and gevent

pip install gunicorn greenlet gevent

Run the API

For Data Selfie we run the API like this, from the directory of this repo:

gunicorn --workers=2 --bind= -t 100 -k gevent wsgi

Good luck! File a issue in this repo, contact us or Leon Eckert if you have any questions.