Git Product home page Git Product logo

porus_server's Introduction

Porus Server

Introduction

Porus server is the server-side application for Porus App. It accepts the uploaded images from the client and runs the prediction script for recognizing the type of road.

The server application is based on Django. It can be deployed on local network for testing purposes. The prediction model applies a Inception V3 model. For more details, please refer to this page.

Setup

Prequisites

  1. Python, version >= 3.3
  2. Django[1]

Django is a framework for Web Apps. You can use the following command to install Django. I recommend the latest version of Django.

pip3 install django
  1. Pillow[2]

The image processing procedures in this project relies on PIL. You need to install the latest version of Pillow.

pip3 install pillow
  1. Keras[3]

Keras contains a set of APIs for Neural Networks. The Deep Learning script in Porus Server is dependent on Keras. To install Keras, you also need the latest version of NumPy and SciPy.

pip3 install numpy
pip3 install scipy
pip3 install keras

Deploy And Run

  1. Make sure your computer is connected to local network and have a valid IP address. Check your firewall settings so that the incoming network traffic is not blocked.

  2. In settings.py, add your IP address to ALLOWED_HOSTS. It should look like the following.

ALLOWED_HOSTS = ['192.168.xxx.xxx']
  1. Migrate Database

In Django, you need to migrate the database when you run this App for the first time. Open a command window, enter the project directory and run this command:

python manage.py migrate
  1. Server Configuration

You need to specify the IP address to 0.0.0.0 when you run the server. This allows the server to listen to all addresses.

python manage.py runserver 0.0.0.0:8080

This command runs the server on port 8080. You can also change another port, but please remember to change the port number on your client application.

Reference

  1. Django Website. https://docs.djangoproject.com/zh-hans/2.0/topics/install/
  2. Pillow Documentation. https://pillow.readthedocs.io/en/latest/
  3. Keras Documentation. https://keras.io

porus_server's People

Contributors

greystone avatar jerryljq avatar

Watchers

 avatar  avatar

Forkers

jerryljq

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.