Skip to content

A basic machine learning object detection system for blind spots on vehicles. Made for the PA Pi Competition 2019

License

Notifications You must be signed in to change notification settings

nuast/rpiTensorflowBlindspot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Discontiuned

This project is discontiuned until further notice.

Raspberry Pi TensorFlow machine learning object detecting blind spot camera and warning system for vehicles

Made for the PA Pi Competition 2019

The need and function of this project

Cyclist Cyclists and pedestrians are 15 times more likely than drivers to be killed on UK roads. In a society where we’re trying to desperately to promote environmentally friendly modes of transport, we’re instead unwillingly discouraging them with the safety risks. The cyclist safety movement usually focuses on the cyclist, wearing high-visibility clothing and covering bikes with flashing lights. However, these methods are only effective when seen. Many cyclists get seriously injured or even killed in blind spots, especially when the vehicles are turning, hence for the need of our project; an object detecting blind spot camera that warns both drivers and those at risk in the blind spot.

When a bike or pedestrian enters the blindspot (both identified in code as a “person”), the driver will be notified through an audible tone and text-to-speech message*. The pedestrian or bike at risk will be warning through an 8x8 LED matrix hat attached to the Pi, placed in view of the vehicle’s blind spot that will flash a warning when detected, alerting the pedestrian or cyclist of the risk.

Read the full summary

*Text-to-speech features are not present in v1 due to compatibility issues

Videos

A video summary of this project

gpxdznTmUTI

Final Software Tweaks Stream in which this project is completed

okay epic

Video of this project working is coming soon.

Development Images

Development Editing the object detection code using nano. d2 Programming using Visual Studio Code.

Installation guide:

Requirements:

Raspberry Pi 3 (different models may work but not at a frame rate that would be considered effective or safe for this project)

A 32 GB+ SD card with respectable speed. We suggest SanDisk Extreme microSD cards for this project.

A USB webcam with at least 640x480 in resolution that has drivers capable of taking still frames

Speaker

Pimoroni Unicorn HAT - purchace

Time required: About 15 mins installation if flashing image provided. Over a day if you want to manually build and install TensorFlow.

WARNING: It is important that the Raspberry Pi is fitted with a heatsink or else it is highly likely that the Pi will overheat, perform poorly and power off (or even potentially damage your hardware)!

Recommended method: Flash pre-built image

First, download the latest system image from the Google Drive link on the latest release. Then, flash the SD card to your Pi using the tool of your choice, put the SD card into the Pi, plug it in and wait for the device to initialize (can take a few mins). Once initialized, the UnicornHat will scroll "Ready".

VERY ADVANCED AND TIME-CONSUMING: building and installing Tensorflow on the Pi

Follow this tutorial to install TensorFlow onto your Pi, along with all other requirements. Then run:

cd (YOUR TENSORFLOW DIRECTORY)/models/research/object_detection
sudo pip3 install unicornhat
sudo pip3 install bitarray
git clone https://github.com/topshed/UnicornHatScroll
git clone https://github.com/nuast/rpiTensorflowBlindspot
rm utils/visualization_utils.py
mv visualization_utils.py utils

Run the main script as superuser (i.e using sudo) and check for errors.

sudo Obj*.py --usbcam

Usage

When fully set up, plug in the Pi and it should boot into the Python script which will take one to two mins to initalise.

Who made this and when:

Project start: Friday 1st March

Installation and building of Tensorflow and object models: Wednesday 6th March - Saturday 10th March

Programming: Monday, March 10th - Saturday, March 16th

Deadline: Monday, March 18th

This project was programmed, tested, documented and completed in just over two weeks by @ed6767, @retroaspie and @DRagaven and is provided under the MIT Licence.

About

A basic machine learning object detection system for blind spots on vehicles. Made for the PA Pi Competition 2019

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages