This post is part of Month to Master, a 12-month accelerated learning project. For May, my goal is to build the software part of a self-driving car.
Yesterday, I deconstructed a piece of code that identifies lanes lines in forward-facing images of the road.
Like this…
Perhaps more interestingly than the picture, this block of code generates the mathematical representations of the lane lines using only very basic mathematical operations (essentially a string of functions that find weighted averages):
Lane line 1 = Slope: -0.740605727717; Intercept: 664.075746144
Lane line 2 = Coef: -0.740605727717; Intercept: 664.075746144.
Going through this exercised helped me better intuit the underlying mechanics of a self-driving car, which don’t seem quite as mystical anymore.
Based on what I’ve experimented with so far, it seems like there are two main steps to creating self-driving car software:
Step 1: Manipulate the input image into a set of useful numeric representations of the driving environment (i.e. lane lines, other cars, traffic signs, pedestrians, etc.)
Step 2: Feed this numeric representation of the world into a function that, based on these inputs, computes the correct steering angle and acceleration.
I suspect as the function in Step 2 improves (as increasing amounts of computational power become available in the future), the pre-processing and object categorization in Step 1 become less and less important.
Thus, it seems I should shift my attention away from Step 1, which focuses largely on object recognition and digitization, and instead focus the majority of my attention on the function from Step 2, which maps inputs from the world into driving instructions. I’ll call this function the “Magic Function”.
This seems like a reasonable plan, especially because the image processing techniques I described yesterday were invented decades ago, where as the Magic Function seems to have only recently become feasible.
I’m not sure if this analysis is right, or this path is optimal, but this is my intuition right now based on what I’ve researched so far and on the exercise from the past few days.
Starting tomorrow, I will start exploring how a Magic Function might work and how I might be able to build it.
Read the next post. Read the previous post.