Brainy Pi

Available to select audience (currently beta)

Drowsiness detection on brainy pi
Drowsiness while driving is one of the leading causes of accidents on roads around the world. In order to tackle this issue, a team of developers has come up with a drowsiness detection system using the Brainy Pi board – as a Jetson nano alternative and a custom lightweight PyTorch model trained using YOLOv5 on Brainy Pi.
The model trained on a dataset containing 10 images of awake drivers and 10 images of drowsy drivers. It fine-tuned using YOLOv5 to improve the accuracy of detection.
To perform inference on the edge, the model  deployed on the Brainy Pi board. Users can simply run the command python3 eval.py in the terminal to initiate the drowsiness detection system. The model will then detect whether the driver is awake or drowsy in real-time.

Dependancies Installation

Pytorch: Reference

Deploying application with YOLOv5 on Brainy Pi

The YOLOv5 model used in this system is a popular object detection algorithm that is known for its speed and accuracy. By fine-tuning the model on a custom dataset of drowsy and awake drivers. The developers were able to train it to identify key features and patterns that distinguish between the two states. This allows the model to accurately detect drowsiness in real-time, providing an early warning to the driver to take a break or stop driving altogether.
The use of the Brainy Pi board offers an affordable and accessible solution for drowsiness detection. We can deploy it in a variety of vehicles, helping to reduce the number of accidents caused by driver fatigue.
Run the following command in the brainypi terminal
git clone https://github.com/brainypi/BrainyPi-AI-Examples.git
cd Pytorch/drowsiness-detection

Usage

python3 eval.py

Quality of work

The model trained for 400 epochs but the accuracy can further be improved by increasing the dataset, this can further ensure a driver’s safety

Inference of YOLOv5 on Brainy Pi

results (1)

results1

Conclusion

In conclusion, the drowsiness detection system developed by the team of developers using the Brainy Pi board and a custom lightweight PyTorch model trained using YOLOv5 is a promising solution to tackle the issue of drowsiness while driving. It is an affordable, accessible and effective solution that can save many lives on the roads.
 
0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*