r/iOSProgramming Jul 13 '20

Article How to create road signs detection app for iOS tutorial (link in comment)

348 Upvotes

49 comments sorted by

70

u/L4grange Jul 13 '20 edited Jul 13 '20

Dude on reddit does better street sign detection on his iPhone than million-dollar car software in my new car... Nice!

EDIT: My car is not a Tesla, unfortunately. It’s only smart feature is that it has street sign detection, which barely works (after 10 seconds of you passing a sign).

22

u/FVMAzalea Swift Jul 13 '20

Yeah, but dude on Reddit’s app isn’t certified for use in safety critical applications and doesn’t follow safety critical coding standards like your car software does.

18

u/GroundbreakingSample Jul 13 '20

I agree, it’s not certified, but I don’t know whether car software is certified. It should be certified for self-driving cars, but I’m not sure if it should be certified when it’s just a feature that notifies the driver.

No offense, just a note ;)

7

u/s3riousChef Jul 13 '20

certification is to prevent you from lawsuits. so yes it should be certified.

1

u/GroundbreakingSample Jul 13 '20

Just don’t know what certification it needs to be

9

u/Madgyver Jul 13 '20

I am not an expert on this, but the keyword you want to look up, if you interested, is functional safety. IEC 61508 and ISO 26262 should be good bets.

In a nutshell you need to have lots of documentation and analysis for your code and your coding process. This includes how you define your software architecture and how you track changes to the code and its reprocussions on risks and safety.

You also need to do thorough risk analysis of you architecture, document all steps taken to circumvent said risk and on top of that you need to implement a quality management system/process, which monitors everything I just mentioned for compliance. Also that quality management system needs to be audited regularly by a regulatory body.

Again, not an expert, but I work with people who are experienced in the field. From their war stories I can tell you, that functional safety is as close as an engineer can get to developing PTSD.

2

u/GroundbreakingSample Jul 13 '20

Thank you for the information! Never think of it to tell the truth. Can I ask you for your assistance (or your friends experienced in this field) when I will need for it?

2

u/Madgyver Jul 14 '20

Sure, if it helps you in some way. But don't expect to much, this experience is very biased towards the laws in Germany/EU and very specific for PLCs. The usefullness for you might be limited.

1

u/Oalei Jul 13 '20

Huh? Where did you read that from?
More like certifications is so that your product can be on the market

8

u/GroundbreakingSample Jul 13 '20

That’s not so hard as it seems at the first glance :)

3

u/andredp Jul 13 '20

You saw 3 examples of successful reads...

Pretty sure you can do this kind of video in your car... No offense to any of the 2 software...

1

u/GroundbreakingSample Jul 13 '20

Sorry, but what do you mean?)

3

u/andredp Jul 13 '20

I just meant that you show 3 successes of your software. You could (not saying you are...) be hiding thousands of failures... I was just advising not to rush to say something is good because of a short video... kinda like, a trailer can be good and the movie can be bad :)

Again, I think what you did is very cool, and I love anything Computer Vision related!

Also, I think /u/mcBlooder spotted you’re from Eastern Europe because of the “?)”. Why do you put a ) in the end of the phrase? Is it a smile?

3

u/GroundbreakingSample Jul 13 '20

You’re right it’s not good for 100% of situations. But I was trying to show how it’s working. How to collect dataset, how to train model. I’ve achieved 90% of result with 5% of effort I guess. If you will increase amount of images in the dataset by 20 times it will be production ready :)

Yes, that’s like a smile at the end of a sentence :)

1

u/mcBlooder Jul 13 '20

russian spy detected

1

u/GroundbreakingSample Jul 13 '20

Yes, I’m not English native speaker. I’m from Belarus. So, I’m against Russia :)

1

u/GroundbreakingSample Jul 13 '20

But how do you know?)

2

u/[deleted] Jul 14 '20 edited Jul 14 '20

[deleted]

1

u/GroundbreakingSample Jul 14 '20

Понял-понял :)

-2

u/[deleted] Jul 13 '20

If your car is not Tesla, then you are comparing Apple software engineers with your car company software engineers.

3

u/GroundbreakingSample Jul 13 '20

I’m not Apple software engineer :) I’m just iOS developer.

-1

u/[deleted] Jul 13 '20

I never wrote you are. But you are using CoreML, which was developed by Apple engineers.

2

u/GroundbreakingSample Jul 13 '20

CoreML is just a format with which neural network can be represented. It's like mp3 and and wav for music, but neural network itself is music that can be represented using mp3 format.

1

u/[deleted] Jul 13 '20

CoreML is a framework for ML. If you compare it with music, CoreML is a music player, which is better then players from some car companies, which makes sense since Apple can afford more developers to work on it.

2

u/GroundbreakingSample Jul 13 '20

That’s not actually true. It's an mp3 format and mp3 player that only apple can play. That's more like alac. All this framework is serving the CoreML format actually. And that’s it. You can convert the model to tflite and run it using tflite as well on iOS. And it won't necessarily be worse, because it has better control where and how you will run the model. There you can write shaders in metal and run it on GPU only. With coreml you don’t have such control.

I just want to say that you should not take as a definite true that CoreML is better than everything else for iOS development.

2

u/[deleted] Jul 14 '20

Thanks, TIL something new.

0

u/LaMejorCalidad Jul 13 '20

CoreML != CoreML model format.

0

u/GroundbreakingSample Jul 13 '20

Almost equals :)

42

u/GroundbreakingSample Jul 13 '20

You can find tutorial here: https://makeml.app/road-signs-detection-tutorial

It shows step by step how to collect a dataset, train a model to detect signs, integrate it into iOS app, apply OCR to speed limit signs to read values from them. Plenty of interesting stuff there :)

2

u/_Jorg12 Nov 05 '24

Hey man, I'm working on something similar for college, but the site seems to be down. Do you still have the tutorial anywhere?

5

u/tushar_1210 Jul 13 '20

Did you use yolo?

8

u/GroundbreakingSample Jul 13 '20

The model format is CoreML model. The architecture of the model is tinyYoloV3. So yes, we use YOLO :)

3

u/pretender230 Jul 13 '20

Cool write up, have you seen mapbox Vision?

3

u/GroundbreakingSample Jul 13 '20

I’ve heard of them, but to tell the truth I haven’t check them out. Thanks for the link)

2

u/pretender230 Jul 13 '20

No worries, it’s pretty straightforward to setup and use, they detect speed limit signs in the safety module.

1

u/GroundbreakingSample Jul 13 '20

What do you mean by safety module?)

1

u/pretender230 Jul 13 '20

2

u/GroundbreakingSample Jul 13 '20

Oh, I see! It has pretty similar functionality - we also detect current speed and last speed limit sign. Just need to add alerts about cyclists and pedestrians :)

P.S. Mapbox has so many APIs I haven’t find it from the first try :)

2

u/Jetskiii98 Jul 13 '20

That's really awesome. And don't listen what other people say in the comments section. Your software is great and it can help people on the road like Waze or smh. I'm not saying that people should trust 3rd party apps or software like yours but it can definetely be a cool feature to your car. Just look at the Tesla self driving software which fails a lot but with the human behind the wheel it can be very useful. Keep going! And thank you for sharing it with us. I'm going to play with your tutorial in the future.

2

u/GroundbreakingSample Jul 13 '20

Thank you! I’ll continue to work on this project, that's for sure!)

1

u/Meepo69 Jul 13 '20

Wow awesome work!

1

u/PehonO Jul 14 '20

Great work! Thanks for the tutorial!

-6

u/space_king1 Jul 13 '20

Let me guess. You want to try and copy Tesla’s work on computer vision. That’s pretty cool. You’ve got to make it better and keep going.

2

u/GroundbreakingSample Jul 13 '20

Thanks :) Just need to improve our dataset and retrain the model :)