Coder Social home page Coder Social logo

bobdeng1974 / deepparking Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deepparking/deepparking

0.0 0.0 0.0 59.98 MB

Find vacant parking spots in indoor and outdoor locations

JavaScript 5.06% TypeScript 41.11% HTML 16.72% CSS 4.86% Dockerfile 7.29% Python 21.36% Shell 3.61%

deepparking's Introduction

๐Ÿš˜ DeepParking

Find the closest vacant parking spot, every time.

DeepParking is an open-source solution for detecting vacant parking spots in indoor parking garages, and delivering real-time notifications to nearby drivers. Low-cost cameras are mounted throughout garages and mapped to locations of available parking spaces. State-of-the-art deep learning algorithms detect occupied spaces, and write the results to a Redis cache. As drivers enter the garage, they are routed to closest available free parking space.

With DeepParking, you'll never have to waste time hunting for a parking spot again!


๐Ÿ“– Technical Stack

DeepParking prides itself on being a 100% open-source solution, from algorithm to web application.

Web Application

Angular version 6.0.8.

Deep Learning: Object Detection

Leverages the state-of-the-art YOLO v3 real-time object detection system.

Backends

Written in Python 3.6.5 using Flask

Persistent Store

Redis - A blazing fast in-memory database with disk persistence.

Scalable Deployment

Docker, Kubernetes


๐Ÿ“น Hardware Configuration

For optimal results with DeepParking, we recommend using a camera configuration similar to the one shown below. No more than five parking spots should be visible for any single captured frame; a single camera with one degree of rotation can be used to monitor 10 parking spots. It is recommended that an image for each 5-space frame is captured every 15 to 20 seconds.

Estimated cost for 100-car garage: $150


Usage

DeepPark is made up of the following components:

  • Camera Gateway API - Receives images from cameras, performs vacant spot analysis on the images and pushes the results to Redis
  • Spots API - External facing API that is used by the Web App to provide vacant parking spots info
  • Web App - A web application for drivers that shows information about vacant parking spots
  • Redis - stores results about parking areas, cameras and vacant spots for realtime querying

In order to set-up an environment locally, edit the area.json file that contains metadata about the parking lot and start a local Redis instance.
Run the Python setup script:

$ python3 ./setup/setup_area.py --redis-host=localhost

The same script can be run on any accessible redis host to set-up the environment.

Running on Kubernetes

DeepPark runs natively on Kubernetes. To install DeepPark, simply run:

$ kubectl create -f ./setup/kubernetes

Thats it! Wait for the following deployments to appear as running:

  • camera-gateway-deployment
  • camera-tester-deployment
  • redis-deployment
  • spots-deployment

Setup the parking lot on Redis

Forward traffic from the Redis service:

$ kubectl port-forward svc/redis-svc 6379:6379

Edit the area.json to your liking and run the setup script:

$ python3 ./setup/setup_area.py --redis-host=localhost

Deploying the driver app

Grab the Spots API External IP:

$ kubectl get svc spots-api-svc

Take the Area ID you created earlier and edit the API_URL and AREA_ID env variables in setup/kubernetes/driver_app. Deploy the app:

$ kubectl create -f ./setup/kubernetes/driver_app

Wait for the External IP to show up:

$ kubectl get svc driverapp-svc

Point your mobile device browser to the IP address.

Running the Camera Tester

DeepPark allows you to mimic a camera by running a simple web app locally that sends images to the Camera Gateway API. Simply open camera_tester/index.html on a local device (or behind an SSL public internet endpoint) and input the following values in the UI:

  • Camera Gateway Address - The public ip of the Camera Gateway API
  • Area ID - The Area ID you created in setup/area.json
  • Camera ID - The ID of the camera you will be sending photos as, created in setup/area.json

Get the Camera Gateway External IP with:

$ kubectl get svc camera-gateway-svc

Note: The Camera Gateway API uses port 8080.

Done!


๐Ÿ‘ Project Team

  • Haishi Bai (Principal Software Engineer, Office of the Azure CTO)
  • Yaron Schneider (Senior Software Engineer, Office of the Azure CTO)
  • Paige Bailey (Senior Cloud Developer Advocate, Cloud+AI)

deepparking's People

Contributors

haishi2016 avatar yaron2 avatar

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.