Alternative detection logic - ideas to launch a discussion and sharing around

4 posts / 0 new
Last post
lalex44
lalex44's picture
Alternative detection logic - ideas to launch a discussion and sharing around

As everyone could see during last challenges, overtaking AND being fast is rather difficult.
As for me, i really wanted to see the results of my work on this theme of traffic detection and i decided to run very very slow (70 % speed).
I wanted to share what i did cause maybe others will do the same, and this would be interesting. We're in a competition, ok, but it's also for fun, isn't it ? :)

So what my code actually does is meshing the image in a portion between the top of the wall until the middle of the image, like this :

Then i mask the image in black with the cv2 function : cv2.inRange with these thresholds (actually) : boundariesBlack = [([0, 0, 0], [40, 80, 70])]
Then i count all black points in these squares with the cv2.countNonZero function and store them in a numpy array for further statistical treatments.

On the beginning i just computed all of the 4400 Arron images pack (again thanks a lot Arron for that treasure :) and produced a log that i "cooked" :) in excel, trying to tune the statistic rules aiming the minimum of false detections and maximum of positive one, of course.

The weak point is that latency of detection makes it very lately when running, so the overtake move has to be rather slow in order to avoid robots gently... Moreover some inevitable false detections (like spotlights, still haven't found how to get rid of them...) has the effect of engaging this mode and makes the robot slow down for no reason.

Actually i work on another detection mode which aims to detect robots much far than this one, which could be seen as an "emergency one" (can be useful in case you see the robot in front very late, for example just round a turn). This last detection would simply change a bit the current target lane with no effect on speed, in order to reduce the probability of the first one to occur and as a result, to improve time of all laps (hope so ! :))

Hope some others will share their point of view in overtaking capability, image processing tips for this tricky problem (and rather noisy one !).

And also (mostly ?) Hope you all spend good time for Christmas holidays, happy new year in advance to every one :))

Alex (aka Whacky Racer)

Images: 
dinotoo
Hi Whacky,

Hi Whacky,

For the 2 spots > Try to exclude them (add them to the black mask nor a white mask)

I have the same problem, static objects are detected too late for avoiding them (focus on the bottom), that why I prefer to talk about « override » and not « avoiding » 

Focus on the center part causes lot of problems with classics algorithms and for the moment the only answer I found is neuronal algorithms

If anyone had an other idea ...

lalex44
lalex44's picture
Filtering spots

hello dino,
I do agree with this point of view, whereas the idea of simply ignoring a lot of frames doesn't delight me much : nearly the whole long straight line and also all turn one... :((
But actually the statistical bias of lights reflections in the images is just too confusing to be treated "as is".
Probably, you're right, a neuronal way could improve a lot false detections of classical way.
Unfortunately, that's not for beginners like me !! (maybe, later, who knows).
For next race, i'll try to mix "overriding" (far detection) and "avoiding" (near one).
Also praying that all this together will work for the good frames (praying is rather important with code).
I also wonder if an alternative way could be to pretreat these images spoiled with spotlights in order to dynamically transform them as if there were not spots ? I'm not a guru of image processing, that's just an idea...
Let's wait for new year to come, i'm sure Arron and others could find tips to help, next year !
Cheers ! :))

PS : santé, Sylvain :)

dinotoo
Mistake, I was talking about

Mistake, I was talking about « overtake », not « override ».

Lights removal is easy, someone could send you a basic code.

For monster detection, you could try haar cascade classifier if you had spare time between Christmas and the 31. But I m not 100% sure that the required library for python is installed. And it s a little bit touchy to use.

If you don t want to create lot of code, you can focus on improving « close » overtake with tuning on brake speed and angle (I don t think that latency comes from computing, I think that we don t turn enough and don t reduce speed enough were there is something in front of the monster).

See you later.

Ps : Pas trop d abus quand même !!!

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Syntax highlight code surrounded by the <pre class="brush: lang">...</pre> tags, where lang is one of the following language brushes: bash, cpp, perl, python.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Comment Images
Files must be less than 10 MB.
Allowed file types: png gif jpg jpeg.
Comment Attachments
Files must be less than 10 MB.
Allowed file types: txt pdf nfo doc docx rtf jpg png gif bmp zip tar gz csv xls.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.