Code Monkey home page Code Monkey logo

helmet-detection's Introduction

Helmet Detection App

Wearing a helmet is the single most effective way of reducing head injuries and fatalities resulting from motorcycle and bicycle crashes. Motorcyclists who do not wear helmets are at a much higher risk of sustaining head injuries and from dying from these injuries - WHO(World Health Organization).

Motorcycle rider with helmet

To better the safety of people riding motorcycles and bicycles, here is Helmet Detection App, an AI-powered Computer Vision application that helps in automatic detection of helmets on people riding motorcycles and bicycles.

Citations

Index

  1. Introduction
  2. Deepstream Setup
    1. Install System Dependencies
    2. Install Deepstream
  3. Running the Application
    1. Clone the repository
    2. Run with different input sources

Introduction

Helmet detection Application consists of an Intelligent Video Analytics Pipeline powered by Deepstream and NVIDIA Jetson Xavier NX

Jetson NX

This project is a proof-of-concept, trying to show surveillance of roads for the safety of motorcycle and bicycle riders can be done with a surveillance camera and an onboard Jetson platform.

Deepstream Setup

This post assumes you have a fully functional Jetson device. If not, you can refer the documentation here.

1. Install System Dependencies

sudo apt install \
libssl1.0.0 \
libgstreamer1.0-0 \
gstreamer1.0-tools \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
libgstrtspserver-1.0-0 \
libjansson4=2.11-1

2. Install Deepstream

Download the DeepStream 5.0.1 Jetson Debian package deepstream-5.0_5.0.1-1_arm64.deb, to the Jetson device from here. Then enter the command:

sudo apt-get install ./deepstream-5.0_5.0.1-1_arm64.deb

Running the Application

1. Clone the repository

This is a straightforward step, however, if you are new to git or git-lfs, I recommend glancing threw the steps.

First, install git and git-lfs

sudo apt install git git-lfs

Next, clone the repository

# Using HTTPS
git clone https://github.com/AdityaVarmaUddaraju/Helmet-Detection.git

#Using SSh
[email protected]:AdityaVarmaUddaraju/Helmet-Detection.git

Finally, enable lfs and pull the yolo weights

git lfs install
git lfs pull

2. Run with different input sources

The solution can be run on one or many input sources of multiple types, all powered using NVIDIA Deepstream.

First, build the application by running the following command:

make clean && make

This will generate the binary called helmet-detection-app. This is a one-time step and you need to do this only when you make source-code changes.

Next, create a file called inputsources.txt and paste the path of videos or rtsp url.

file:///home/user/Videos/input.mp4
<rtsp url>

Now, run the application by running the following command:

./helmet-detection-app

Finally, add the url in inputsources.txt and start ./helmet-detection-app.

Video demonstration of the App

Link to video demonstartion video_link

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.