All Projects → marcogdepinto → Deep-learning-model-deploy-with-django

marcogdepinto / Deep-learning-model-deploy-with-django

Licence: GPL-3.0 license
Serving a keras model (neural networks) in a website with the python Django-REST framework.

Programming Languages

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

Projects that are alternatives of or similar to Deep-learning-model-deploy-with-django

dl-relu
Deep Learning using Rectified Linear Units (ReLU)
Stars: ✭ 20 (-73.68%)
Mutual labels:  artificial-neural-networks, keras-models, keras-neural-networks, keras-tensorflow
Awesome Django
Repository mirror of GitLab: https://gitlab.com/rosarior/awesome-django This repository is not monitored for issues, use original at GitLab.
Stars: ✭ 8,527 (+11119.74%)
Mutual labels:  django-rest-framework, django-application, django-framework
pytorch2keras
PyTorch to Keras model convertor
Stars: ✭ 788 (+936.84%)
Mutual labels:  keras-models, keras-neural-networks, keras-tensorflow
GTAV-Self-driving-car
Self driving car in GTAV with Deep Learning
Stars: ✭ 15 (-80.26%)
Mutual labels:  keras-models, keras-neural-networks, keras-tensorflow
Thinkdiff
My open source project links, programming and software development related code and tutorials are in this repo. Content types: Python, JavaScript, Dart | Django, React, Flutter, React-Native etc.
Stars: ✭ 65 (-14.47%)
Mutual labels:  django-rest-framework, django-application, django-framework
Recurrent-Neural-Network-for-BitCoin-price-prediction
Recurrent Neural Network (LSTM) by using TensorFlow and Keras in Python for BitCoin price prediction
Stars: ✭ 53 (-30.26%)
Mutual labels:  prediction, keras-neural-networks, keras-tensorflow
python-neuron
Neuron class provides LNU, QNU, RBF, MLP, MLP-ELM neurons
Stars: ✭ 38 (-50%)
Mutual labels:  prediction, artificial-neural-networks
Xtreme-Vision
A High Level Python Library to empower students, developers to build applications and systems enabled with computer vision capabilities.
Stars: ✭ 77 (+1.32%)
Mutual labels:  artificial-neural-networks, keras-tensorflow
lets-quiz
A quiz website for organizing online quizzes and tests. It's build using Python/Django and Bootstrap4 frameworks. 🤖
Stars: ✭ 165 (+117.11%)
Mutual labels:  django-application, django-framework
Artificial-Neural-Networks-Visualizer
Visualizing Artificial Neural Networks (ANNs) with just One Line of Code
Stars: ✭ 21 (-72.37%)
Mutual labels:  artificial-neural-networks, keras-neural-networks
Machine-Learning-Notebooks
15+ Machine/Deep Learning Projects in Ipython Notebooks
Stars: ✭ 66 (-13.16%)
Mutual labels:  keras-neural-networks, keras-tensorflow
kasir
Cashier Management & Inventory Management System
Stars: ✭ 28 (-63.16%)
Mutual labels:  django-application, django-framework
Django Rest Registration
User-related REST API based on the awesome Django REST Framework
Stars: ✭ 240 (+215.79%)
Mutual labels:  django-rest-framework, django-application
Education Backend
Django backend for my info-business website
Stars: ✭ 79 (+3.95%)
Mutual labels:  django-rest-framework, django-application
Django-WebApp
This is a web-app created using Python, Django. By using this user can login, upload files and also can view and download files uploaded by other users.
Stars: ✭ 285 (+275%)
Mutual labels:  django-application, django-framework
babble-rnn
babble-rnn is a research project in the use of machine learning to generate new speech by modelling human speech audio, without any intermediate text or word representations. The idea is to learn to speak through imitation, much like a baby might.
Stars: ✭ 34 (-55.26%)
Mutual labels:  keras-models, keras-neural-networks
drf-addons
Some customised Django classes and functions that one can use in DJango. Collected from internet!
Stars: ✭ 20 (-73.68%)
Mutual labels:  django-rest-framework, django-application
Bistu
集成了 django-simpleui 作为 admin 管理主题,实现的一个小型的管理系统,并且有的 django-rest-framework 使用示例。此外有个 Bistu-Ant-Design-Pro 项目作为配套的前端使用。如果喜欢记得给个🌟star哦。
Stars: ✭ 51 (-32.89%)
Mutual labels:  django-rest-framework, django-application
Djangorestframework Book
Django REST framework 3 中文文档, API参考, 最佳实践指南
Stars: ✭ 28 (-63.16%)
Mutual labels:  django-rest-framework, django-application
Algo Phantoms Backend
💻 Algo-Phantoms-Backend is an Application that provides pathways and quizzes along with a code editor to help you towards your DSA journey.📰🔥 This repository contains the REST APIs of the application.✨
Stars: ✭ 36 (-52.63%)
Mutual labels:  django-rest-framework, django-application

Deep learning model deploy with Django

made-with-python

Executive Summary

This project is a Django-REST API that offers the consumption of a deep learning model using a simple front end. The model adopted in this work is the previous version of an Emotion Classifier trained with audio files of the RAVDESS dataset. To know more, see this repository.

How does this work?

User Journey

The user journey starts on the index page at /index/ where it is possible to choose if

  1. Upload a new file on the server;
  2. Delete a file from the server (WIP);
  3. Make a prediction on a file already on the server;

Picture1

Choosing Upload your audio file the user will be redirected to a modified home page. The user will be asked to pick a file from his computer. The UI will confirm if the operation has been successful.

Picture2

Choosing Make your prediction the user will be redirected to a modified home page. In this page, it will be possible to see a list of the files already on the server. Following the path media/{filename} it will be also possible to listen to the audio file.

Picture3

After clicking on Submit, the user will be redirected to a modified home page that will include the prediction made by the Keras model for the file selected.

Picture4

See the App in action!

The current version of the application is deployed on Heroku: https://emotion-classification-ravdess.herokuapp.com/index/ . Please note the performances are not good as the machine used is a free tier.

Developers stuff

DB creation

PostgreSQL needs to be installed. To facilitate the configuration, I suggest to use a Db manager with UI, like pgAdmin.

After the installation of PostgreSQL, it is possible to use pgAdmin to create a django-emotion-classification database and a App_filemodel table.

The App_filemodel table can be created with the following script:

CREATE DATABASE django-emotion-classification;

CREATE USER marco WITH PASSWORD 'test';

CREATE TABLE App_filemodel (
   id INT PRIMARY KEY NOT NULL,
   file TEXT NOT NULL,
   timestamp DATE NOT NULL,
   path TEXT NOT NULL
);

GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA django-emotion-classification TO marco;

ALTER USER marco CREATEDB; -- This is to run the automatic tests, otherwise you will get an "unable to create database" error when running python manage.py test

Please note the above script is made with the data available in the settings.py, but it is possible to change it if needed.

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'django-emotion-classification',
        'USER': 'marco',
        'PASSWORD': 'test',
        'HOST': 'localhost',
        'PORT': '',
        'OPTIONS': {'sslmode': 'disable'},
    }
}

How to start the server and try it

  1. git clone https://github.com/marcogdepinto/Django-Emotion-Classification-Ravdess-API.git
  2. $ pip install -r requirements.txt
  3. Open a terminal window, cd into the project folder and run python manage.py runserver.

How to run the tests

python manage.py test

Other important topics

The Keras model is stored in the models folder.

gitmedia folder includes the pictures used for this README.

media folder includes the audio files loaded using the server.

It is possible to have an overview of the application even without knowing how Django works by looking at the App/views.py file.

User Stories

https://github.com/marcogdepinto/Django-Emotion-Classification-Ravdess-API/projects/2

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].