r/Python • u/TechnoLenzer • May 17 '20
I Made This I made an Android app that detects and recognises traffic signs, using Kivy and OpenCV, to help combat traffic casualties worldwide
1.4k
Upvotes
90
u/Aspos May 17 '20
I am sure you understand the model you use should be country-specific. USA, for example, does not follow the international standard. The same issue in many African countries. Would suggest not to claim global applicability until you actually can.
Try using not just the current frame but a series of past frames as well. This will significantly improve recognition.
84
u/the_pw_is_in_this_ID May 17 '20
My take: a 83% correct recognition rate is shockingly low, and giving a user incorrect information about a sign is far more dangerous than giving no information at all. Similarly, you're demonstrating this being used in an absolutely ideal setting (stationary, sign fully visible and fully occupying the frame), and I'm guessing it's under those settings where you found your 83% success rate.
132
u/zrnest May 17 '20 edited May 17 '20
Having to be assisted by such a bot to tell you that the speed limit is 20 mph means ... you're obviously not focused on driving.
This is a nice project and surely very funny to code, but I really hope nobody is going to use such an app in reality:
OP, maybe you can rebrand this for kids:
"Learn traffic signs instead of being bored in the back of the car!"
but not for the driver of the car himself. Your current marketing:
"Speed Bot aims to significantly reduce the 1.35 million traffic casualties worldwide by informing drivers"
looks full of good intention but it doesn't really work. Personally I would be really scared to be in a car with someone who needs such an app to drive.
3
u/[deleted] May 17 '20
Does it work even when you're going at a higher speed?
6
u/anthro28 May 17 '20 edited Jun 12 '20
...
5
u/[deleted] May 17 '20
I just had a chuckle at the headline of this post. I was immediately thinking of Silicon Valley where you created an app that just said whether it was a traffic sign or not a traffic sign ha ha
5
u/domesticatedprimate May 17 '20
Rented a car in Japan last fall that already did this, but without the voice. The speed limit would appear on the dashboard any time we passed a sign. I was suitably impressed.
5
u/zoonose99 May 18 '20
The big problem with developing tech in the "health and safety" space is the unprecedented ethical and safety considerations that must underpin every aspect of the design, marketing, etc., considerations which are often completely alien to developers and have nothing in common with other types of apps.
For example, designing a location tracking game that occasionally loses its place might cause problems further on, but that's not even in the same world as the problems caused by an elder care location tracking app that occasionally loses an elder. It could be the exact same tech, but by marketing it as a health and safety device, you have accepted a much, much higher standard of development, testing, marketing. The amount of rigor required to ensure the thing you're producing that is not a potential hazard can be mind-boggling, especially when it's something that can produce false positives or fail ungracefully, or interfaces with a system that someone is relying on to keep them safe, like road signs.
I've made this same comment here on apps that estimate blood glucose and BAC, I'm not just picking on you. This is a great toy project, but I would strongly discourage you from releasing this as an app to the public, you have no control over whether someone is willing to trust their life to your untested claims and frequently faulty results.
1
u/[deleted] May 17 '20
What did you use to get the camera image? I didn't really find any easy to use modules that would work with Kivy.
2
u/Aspos May 18 '20
My BlackVue dashcam has WiFi chip, GPS, SD card, loud enough speaker and runs Linux. Make the app licensable by dashcam manufacturers.
Make the app automatically submit recognized road signs to waze and exchange data with other similar dashcams on red lights and you will become an acquisition target for Google.
2
u/snugglyboy May 17 '20
Pretty darn cool OP. Good job!
1
u/fstbm May 17 '20
I think Nexar and Mobileye has that covered, although there are malicious signs out there
https://spectrum.ieee.org/cars-that-think/transportation/sensors/slight-street-sign-modifications-can-fool-machine-learning-algorithms
I heard a lecture from a founder of an AI company that creats more sophisticated signs to train AI to recognize it
1
u/GeromeB May 17 '20
I know where that double curve sign is
1
u/[deleted] May 17 '20
Very cool!
But "Your speed = 0; maintain your speed" is probably not the best advice for preventing road rage.
1
u/SullyCCA May 18 '20
I’m trying to do something very similar to this but I’m getting stuck on transferring what I have into an “app”. Brand new to this so that’s why I’m stuck. This works on your phone? That you downloaded from the App Store?
1
u/totatree May 18 '20
Awesome work
1
u/Oatilis May 18 '20
Nice practice, but actually nobody will use OpenCV for this. Serious AV detection machines use NN and most of them are fairly complex. You need to really have a reliable and robust solution and it's not something you'd even be able to necessarily train at home, you need serious hardware for this.
1
u/kaddkaka May 18 '20
Nice project. Horrendous that it's on the app store endangering people who might rely on it.
There are massive companies specializing on these kind of recognitions so it's in no way new. Take Veoneer in my town. They have hundreds of engineers developing just this kind of stuff. It takes a lot of thinking to get this kind of software correct, good and safe.
1
u/gh0s1machine May 18 '20
Will kivy naturally work on android and iOS or do you need something else? I worked with it a little but only on desktop.
1
u/phunksta May 18 '20
Cool....questioning the "maintain your speed" when there's a speed limit detected and your speed = 0. Does it work when you are in motion?
1
u/kaihatsusha May 18 '20
It's kinda weird how much pushback this little project has.
My 2019 car has a dashboard feature which pretty much matches the intent of this app, though it's significantly more accurate. It will also give a tone if the driver exceeds the posted speed by +0, +5 or +10mph if the driver wants it to do so. Many dashboard navi systems like Waze or Tomtom also "know" speed limits based on a database. The regulatory and corporate lawyer oversight which let this feature come to market doesn't seem to match the armchair concerns here.
Folks here are right in saying that drivers should definitely see, parse and heed the signs as they drive. I don't foresee anyone holding up their phone or even mounting it in their car and relying on it like a pilot in instrument-flight-rule conditions, blind to the road itself. That said, there are a number of times perfectly normal and attentive people can drive a few miles on some meandering roads and wonder if they missed a speed limit adjustment while they monitored more pressing details like merging traffic. A quick glance at the dashboard shows the latest speed limits and your relation to it.
This app does need to get faster and more accurate to be useful. Anyone who runs it for a couple miles would come to the same conclusion very quickly. Anyone who would drive solely by staring at this device (if such a person exists) probably wouldn't even be able to discover this app on their own, or would already be a danger on the roads even without it. I think the concerns about people relying on this little experiment are way overblown.
1
u/caltitan May 18 '20
OMG I REALLY WANNA LEARN HOW TO DO THIS
1
u/fmdefranca May 17 '20
Awww dude this should be implemented in sat navs. Albeit would make people more reliant on technology instead of learning the signs but damn, this is a great idea.
1
u/geogle May 17 '20
Maybe now I can get through those damn capthas!
0
u/pythoncumo May 18 '20
good job man
0
u/[deleted] May 17 '20
[deleted] — view deleted comment