Advancing Road Safety with AI-Powered Pothole Detection: Performance Enhancements for AI Vision Developers and Engineers
Are you tired of driving over potholes and wrecking your vehicle? To help protect drivers, we have put together a Pothole Detection Application that uses advanced AI technology to detect road hazards in real-time. In this article, we will discuss the features of our application, the AI technology used, and how we took advantage of NetsPresso® to enhance its performance on different hardware platforms.
Application Overview
Our Pothole Detection Application is built for the Android platform, specifically targeting the popular Galaxy A30 smartphone. Leveraging advanced Object Detection AI technology, the application actively monitors the road for potholes and alerts drivers instantly, enabling them to take necessary precautions. The primary goal is to enhance road safety and minimize potential accidents caused by potholes.
To achieve this, we have utilized a deep learning model in the form of TFLite, which is a compiled format that is suitable for Android and capable of running on ARM CPUs in mobile devices. The application is available for download on GitHub, where you can find the Android app and the corresponding AI model. The development and distribution of the app were spearheaded by YoonJae Yang, while Hyungjun Lee took charge of AI model development and lightweighting.
Key features
Monitoring and immediate warning of potholes on the road to support safe driving
AI task used
Object detection
Application platform (support version)
OS: Android(Lollipop~)
AI model: TFLite
Target hardware: Galaxy A30 (SM-A305)
Github: https://github.com/nota-github/np_app_model_zoo/tree/main/1.pothole_detection
Contributors
Android app and model deployment: YoonJae Yang
AI model development and lightweighting: Hyungjun Lee
Enhancing Performance with NetsPresso®
We faced the challenge of attaining high detection accuracy while minimizing latency. It was important to detect potholes as quickly as possible to ensure warnings are given to the drivers in time. To solve this, we used NetsPresso®, Nota AI™’s hardware-aware AI model optimization platform. NetsPresso® is a powerful optimization framework for AI models.
Scenario 1: Improving latency while maintaining performance
Using NetsPresso®, we considerably increased the app's speed while maintaining its performance. Here are the results we achieved:
We started with the YOLOv5-nano model, which had a latency of 542.2ms. But after employing NetsPresso®'s lightweighting techniques, we reduced the latency to 144.6ms with a similar mAP score. This improvement provides drivers with timely warnings to enhance safety.
Scenario 2: Lightweight Model for Affordable Android Devices
We also wanted our Pothole Detection Application to be accessible to users with affordable Android devices. NetsPresso® came to the rescue once again, enabling us to run the detection model efficiently on low-performance hardware. Here are the results we obtained:
In this case, we started with the YOLOv5-M model, which proved to be too demanding for low-end devices, resulting in performance issues and app instability. However, with NetsPresso®'s lightweighting techniques, we were able to reduce the GFLOPs count to 2.7 while maintaining an acceptable mAP score. This optimization drastically improved the app's performance on affordable Android devices, ensuring a smooth and reliable user experience.
Demonstrating the Results
To comprehend the effect of NetsPresso®'s optimization, we have made videos displaying the performance of the original and lightweight models. These videos illustrate the real-time detection capabilities of our application and the improvements achieved through NetsPresso®.
Original Model Video
Lighweight Model Video
In the original model video, you can observe the delayed bounding boxes due to poor real-time detection. However, in the lightweight model video, the real-time detection is significantly improved, providing accurate and timely warnings to drivers.
Conclusion
Our Pothole Detection Application, powered by advanced AI technology and optimized with NetsPresso®, brings significant improvements to road safety. By monitoring the road for potholes and alerting drivers in real-time, we aim to reduce accidents and vehicle damage caused by these road hazards. Whether you're driving a high-end smartphone or an affordable Android device, our application ensures reliable performance without compromising detection accuracy.
To learn more about our Pothole Detection Application and explore the codebase, visit our GitHub repository. We are continuously working on enhancements and welcome contributions from the community to make our roads safer for everyone.
Join us in our mission to revolutionize road safety with AI-powered pothole detection!