All Projects → nature1995 → AI-Image-classifiers-on-Django-with-RESTAPI

nature1995 / AI-Image-classifiers-on-Django-with-RESTAPI

Licence: MIT license
A Keras deep learning image classifiers on Django server with REST API | Django 图片识别平台

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to AI-Image-classifiers-on-Django-with-RESTAPI

typescript-express-rest-api
This template will help you to build your own Node.js Express Mongodb API in TypeScript.
Stars: ✭ 42 (+50%)
Mutual labels:  restapi
pinipig
🚀 Performant webservice framework
Stars: ✭ 25 (-10.71%)
Mutual labels:  restapi
godzilla
a powerful go web framework
Stars: ✭ 22 (-21.43%)
Mutual labels:  restapi
rest-api-node-typescript
This is a simple REST API with node and express with typescript
Stars: ✭ 154 (+450%)
Mutual labels:  restapi
ontap-rest-python
This repository contains sample code illustrating how to access the ONTAP REST API using Python. This Repository also contains ONTAPI Usage reporting code that helps to identify ONTAPI usage in your environment using ONTAP REST APIs.
Stars: ✭ 41 (+46.43%)
Mutual labels:  restapi
CosmosDB
PowerShell Module for working with Azure Cosmos DB databases, collections, documents, attachments, offers, users, permissions, triggers, stored procedures and user defined functions.
Stars: ✭ 104 (+271.43%)
Mutual labels:  restapi
go-iris-mv
No description or website provided.
Stars: ✭ 21 (-25%)
Mutual labels:  restapi
nextjs-woocommerce-restapi
A React WooCommerce Project Example With REST API
Stars: ✭ 168 (+500%)
Mutual labels:  restapi
symfony5-jwt-restapi
API for Meeting app development
Stars: ✭ 21 (-25%)
Mutual labels:  restapi
Dockerized-Microservice-Template
Microservice with Docker, Flask, Postgres, Nginx
Stars: ✭ 22 (-21.43%)
Mutual labels:  restapi
mssql-restapi
A simple REST API for SQL Server, Azure SQL DB and Azure SQL DW using SMO on .NET Core 2.0
Stars: ✭ 33 (+17.86%)
Mutual labels:  restapi
REST-Api-with-Slim-PHP
REST API with PHP Slim Framework 3 and MySQL
Stars: ✭ 69 (+146.43%)
Mutual labels:  restapi
rest-query-parser
Query Parser for REST
Stars: ✭ 29 (+3.57%)
Mutual labels:  restapi
sandstone-edition
Build a Real-time RestApi.
Stars: ✭ 17 (-39.29%)
Mutual labels:  restapi
grapevine
Fast, unopinionated, embeddable, minimalist web framework for .NET
Stars: ✭ 72 (+157.14%)
Mutual labels:  restapi
nextjs-lesson-hp
Nextjs + Tailwind CSS + Django REST Framework で学ぶモダンReact開発 / Project 1 🚀
Stars: ✭ 30 (+7.14%)
Mutual labels:  restapi
SocketHook
Socket hook is an injector based on EasyHook (win only) which redirect the traffic to your local server.
Stars: ✭ 38 (+35.71%)
Mutual labels:  restapi
api
Free Rest Webservices
Stars: ✭ 20 (-28.57%)
Mutual labels:  restapi
NasdaqCloudDataService-SDK-Java
Nasdaq Data Link provides a modern and efficient method of delivery for real-time exchange data and other financial information. This repository provides a Java SDK for developing applications using Nasdaq Data Link's real-time data.
Stars: ✭ 70 (+150%)
Mutual labels:  restapi
Restful Api Design References
RESTful API 设计参考文献列表,可帮助你更加彻底的了解REST风格的接口设计。
Stars: ✭ 4,830 (+17150%)
Mutual labels:  restapi

AI Image classifiers on Django server with REST API


python3.5 python3.6 python3.6 django3.0.0 Build Status

Table of Contents

Introduction

A Keras deep learning image classifiers on Django server with REST API. It can help you quickly deploy and apply ML models.

Description

Machine Learning (ML) models are typically trained and test on benchmark data sets. However, such data sets may not represent the data in real applications. These ML models should be updated after tested on real data sets. Deployment of the models after each update may be time consuming. Therefore, automated deployment is needed to save time and effort. In this proposal, we describe our solution to integrate trained ML models into any application of interest. We use Django web-based platform to build REST API for model deployment. Jenkins is used for continuous integration and automated deployment of ML models into Django servers.

Features

  • Add Account management funtion
  • Add Login & Signup
  • Add Django Rest Framework
  • Optimize front-end interface, adapt to mobile and PC interface
  • Design front-end and back-end interactive interfaces
  • Add feature: Face comparison
  • Add feature: Bank card identification
  • Add feature: Gesture identification
  • Add feature: Image classify using following model:
    • ResNet50
    • Xception
    • MobileNet, MobileNetV2
    • InceptionV3, InceptionResNetV2
    • DenseNet121, DenseNet169, DenseNet201
    • VGG16, VGG19
    • NASNetMobile, NASNetLarge
  • Run each part of functions seperately in local and cloud server
  • Run all the functions in local server and cloud server
  • Design and using machine learning CI/CD Tools such as Git, Jenkins, Nginx, uwgsi for deployment.

Architicture

Result01.png

Usage

I assume you already have your own local virtual environment.

git clone https://github.com/nature1995/image-classify-django-server.git
pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrate
python manage.py collectstatic
python manage.py runserver 0.0.0.0:8000

Access the web page though this link: http://127.0.0.1:8000/

Name Description
Face comparison Extract and analyze facial features in pictures
Bank card identification Identify the field information above the bank card
Gesture identification Detect and return the meaning of the gesture in the picture.
Image classify Detects objects in the image, returns the detected object name, and the corresponding confidence.

Docker

You can use dockerfile to build this project easily.

# Follow any instruction to install the docker-ce, docker for OS X or PC in your device
docker build -t ai_image_classifiers .
docker run -it --rm -p 8000:8000 --name ai_image_classifiers_app ai_image_classifiers:latest

Result

Name Input Size API address
ResNet50 224x224 http://127.0.0.1:8000/predict/api/
Xception 299x299 http://127.0.0.1:8000/predict_Xception/api/
MobileNet 224x224 http://127.0.0.1:8000/predict_MobileNet/api/
MobileNetV2 224x224 http://127.0.0.1:8000/predict_MobileNetV2/api/
InceptionV3 299x299 http://127.0.0.1:8000/predict_InceptionV3/api/
InceptionResNetV2 224x224 http://127.0.0.1:8000/predict_InceptionResNetV2/api/
DenseNet121 224x224 http://127.0.0.1:8000/predict_DenseNet121/api/
DenseNet169 224x224 http://127.0.0.1:8000/predict_DenseNet169/api/
DenseNet201 224x224 http://127.0.0.1:8000/predict_DenseNet201/api/
VGG16 224x224 http://127.0.0.1:8000/predict_VGG16/api/
VGG19 224x224 http://127.0.0.1:8000/predict_VGG19/api/
NASNetLarge 331x331 http://127.0.0.1:8000/predict_NASNetLarge/api/
NASNetMobile 224x224 http://127.0.0.1:8000/predict_NASNetMobile/api/

Input

Parameter Type Description
image file Image file that you want to classify.
top text
(optional, default=6)
Return top-k categories of the results. Must me string in integer format.

Note: You can not send a very large size image.

Result

Parameter Type Description
success bool Whether classification was sucessfuly or not
predictions label, float pair of label and it's probability

Accuracy for individual models

Model Accuracy Top-6 Accuracy
Xception 0.780 0.955
VGG16 0.722 0.914
VGG19 0.723 0.910
ResNet50 0.748 0.931
InceptionV3 0.789 0.948
InceptionResNetV2 0.813 0.963
MobileNet 0.714 0.904
MobileNetV2 0.723 0.912
DenseNet121 0.761 0.934
DenseNet169 0.772 0.952
DenseNet201 0.783 0.945
NASNetMobile 0.752 0.920
NASNetLarge 0.837 0.959

Example

Using Postman to test the API:
POST http://127.0.0.1:8000/predict_VGG19/api/

Result

{
    "success": true,
    "predictions": [
        {
            "label": "red_fox",
            "probability": 0.8969062566757202
        },
        {
            "label": "kit_fox",
            "probability": 0.08841043710708618
        },
        {
            "label": "grey_fox",
            "probability": 0.012036639265716076
        },
        {
            "label": "Arctic_fox",
            "probability": 0.0022438077721744776
        },
        {
            "label": "coyote",
            "probability": 0.0002566342300269753
        },
        {
            "label": "white_wolf",
            "probability": 0.00005685776341124438
        }
    ]
}

Compatibility

Support to Django>=2.1.5 or Django==3.0.0 and Python 3.5, 3.6, 3.7.

Issue

If you have questions or issues, please feel free to tell us.

Contribution

Welcome to make pull request. If you have a related project/component/tool, add it with a pull request to add it!

Others

Admin Account

python manage.py createsuperuser

username: ranxiaolang
email: YOUR EMAIL  
password: ranxiaolang  

Access the web page though this link: http://127.0.0.1:8000/admin

Django Restframework

Access the web page though this link: http://127.0.0.1:8000/iot/

Contributors

@nature1995

@sergulaydore

License

MIT ©

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].