Giter VIP home page Giter VIP logo

phase-sense-openvino's Introduction

Phase-Sense

Team Pineapple Logo

Table of Contents:

Description

The purpose of this project is to create a flexible, non-invasive way of getting the current traffic light statuses of intersections. This would allow further connectivity in future plans for smart cities, as well as be beneficial for self-driving cards and other autonomous vehicles. This was done by training a machine learning model to detect traffic lights from a video feed in near real-time, and then sending the detected traffic light statuses to a server. We also developed a website for displaying the active lights for users to see visually rather than just the string of bytes that are transmitted. The transmitted data follows the NTCIP format so that it should be indistinguishable from other traffic light systems that are already being used in several areas.

This project repository contains all four parts of the project, detailed below.

Component Purpose
SignalSenseBox The service that Nodes connect to
UI This is the demo UI for signalsense.link
AWS Service This is the centralized AWS service
Database This is the database that runs on AWS and SignalSenseBox

Installation

Important Note

Both SignalSenseBox and backend require environmental variables to deploy the services. These are stored in a .env file that is not included in this repo for security concerns as requested by our client. To obtain the .env file, please contact Harsh Verma [email protected]. Once obtained, save the file to SignalSenseBox/.env and backend/.env respectively.

Deploying Front End

This service is deployed automatically when a commit is merged to the Phase-Sense repository.

Database Setup

For additional information on the docker image, please see the SignalSenseBox directory.

Each SignalSenseBox pulls down a prebuilt database from Docker. To rebuild you must first have Docker Desktop installed on your PC. Make sure to login by running Docker login from a terminal. In that same terminal run the following command: docker buildx build --platform linux/arm64/v8,linux/amd64 -t <Your Docker Username>/signal-db:latest --push . from the database\dockerImage directory. The scripts under sql-scripts/ and the my.cnf file will be used to create the image, and the user and schema is created when the image is pulled onto the new SignalSenseBox. These attributes are provided in the SignalSenseBox .env file. After pushing the new version be sure to update the SignalSenseBox/docker-compose.yaml file so that the new database is pulled.

services: 
  mysqldb:
    image: <Your repo name>/signal-db:latest # <- update database image tag here
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    pull_policy: always
    environment:
      MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
      MYSQL_USER: $MYSQL_USER
      MYSQL_PASSWORD: $MYSQL_PASS
    ports:
      - $MYSQL_DOCKER_PORT:3306
    cap_add:
      - SYS_NICE  # CAP_SYS_NICE

Node Setup

  1. Clone the repository
  2. Navigate to Phase-Sense/model_files/Yolo Files/
  3. Run git clone https://github.com/ultralytics/yolov5 to install the ML model
  4. Run pip install -r requirements.txt to install the required packages, followed by pip install -r yolov5/requirements.txt to install any updated model requirements

The model should now be fully set up and ready for detection. Please refer to the User Guide for more information on running detection with preconfigured scripts, or https://github.com/ultralytics/yolov5 for more information on the model itself.

The trained model is stored in the model_files/Yolo Files/exp4/weights/best.pt file.

To run the node, follow the additional steps below.

  1. Naviage to the Phase-Sense/model_files/Yolo Files/ directory.
  2. Configure the test_model.py file as described in the User Guide.
  3. Edit the data_transform.py file as needed (only needed if locations of ML model output are changed).
  4. Open a terminal and run python test_model.py to begin detection.
  5. In a separate terminal, run python data_transform.py to begin sending the detections to the database.
    1. The data pipeline takes the most recent files from the ML model output, so timing for running this is not important as long as the model has at least 5 frames detected.

Contributors

Name Area of Focus
Jose Ramirez Team Lead, On-Device Code
Michael Ingrum Backend Dev, On-Device Code
Alec Resha AI/ML, Data Pipeline
Chloe Hendrix API/Connectivity
Justin Henley Databases Dev
Lan Nguyen Front End Dev
Dang Hoang Front End Dev

Documentation

User Guide - Instructions on how to run the model and how to use the website. Maintenance Manual - Instructions on how to maintain the project.

phase-sense-openvino's People

Contributors

michaelingrum avatar joseramirez98 avatar justinhenley avatar cohduh avatar reaganhoang avatar lanthenguyen1993 avatar finestnothing avatar phasesense 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.