Image classification with Web API and UI.
It's is written in Django along with Tensorflow uing Google's Inception v3 model
The web interface is made using materializecss and jQuery
It is extension of this project.
To run the server on localhost:
$ pip3 install -r requirements.txt
$ python3 manage.py collectstatic
$ python3 manage.py runserver
The Web Interface can be found at http://tf-classify.herokuapp.com
You can classify using web API by sending a POST request at http://tf-classify.herokuapp.com/classify_image/classify/api/
Parameter | Type | Description |
---|---|---|
image | file | Image file that you want to classify. |
image64 | text | Image in base64 form that you want to classify. Currently supports JPEG images only |
k | text (optional, default=10) |
Return top-k categories of the results. Must me string in integer format. |
Note: you need to send either 'image' or 'image64'
Parameter | Type | Description |
---|---|---|
success | bool | Whether classification was sucessfuly or not |
confidence | category, float | pair of category and it's confidence |
Note: category is not paramater name but string of the category.
Example: {"success": true, "confidence": { "mongoose": 0.87896, "hare": 0.00123 }}
- Retrain the model using your images. Refer here.
- Fork this repo
- Replace the generated graph and label files in
/classify_image/inception_model/
- Deploy the Django project
I am just beginner. If you find any bugs or want to improve the project, fell free to do it uisng pull request.