Vlad Profile picture
Apr 21, 2021 β€’ 11 tweets β€’ 4 min read β€’ Read on X
Computer vision for self-driving cars 🧠 πŸš™

There are different computer vision problems you need to solve in a self-driving car.

β–ͺ️ Object detection
β–ͺ️ Lane detection
β–ͺ️ Drivable space detection
β–ͺ️ Semantic segmentation
β–ͺ️ Depth estimation
β–ͺ️ Visual odometry

Details πŸ‘‡
Object Detection πŸš—πŸšΆβ€β™‚οΈπŸš¦πŸ›‘

One of the most fundamental tasks - we need to know where other cars and people are, what signs, traffic lights and road markings need to be considered. Objects are identified by 2D or 3D bounding boxes.

Relevant methods: R-CNN, Fast(er) R-CNN, YOLO
Distance Estimation πŸ“

After you know what objects are present and where they are in the image, you need to know where they are in the 3D world.

Since the camera is a 2D sensor you need to first estimate the distance to the objects.

Relevant methods: Kalman Filter, Deep SORT
Lane Detection πŸ›£οΈ

Another critical information the car needs to know is where the lane boundaries are. You need to detect not only lane markings, but also curbs, grass edges etc.

There are different methods to do that - from traditional edge detection based methods to CNNs.
Driving Path Prediction ‴️

An alternative is to train a neural network that will directly output the trajectory that the car needs to drive. This can be used as a substitute to centering between the lane markings if they are not visible for example.
Drivable Space Detection ⭕️

The goal here is to detect which parts of the image represent the space where the car can physically drive onto.

The methods here are usually very similar to the semantic segmentation methods (see below).
Semantic Segmentation 🎨

Not all parts of the image can be described by a bounding box or a lane model, e.g. trees, buildings, the sky. Semantic segmentation methods classify each pixel in the image.

Relevant methods: Fully Convolutional NN, UNet, PSPNet
Depth Estimation πŸ“

The goal is to estimate the distance to every pixel in the image, in order to have a better 3D model of the surrounding.

Methods like stereo and structure-from-motion are now being replaces by self-supervised deep learning models working on single images.
Visual Odometry πŸŽ₯

While we know the movement of the car from the wheel sensors and IMU, determining the actual movement in the camera can be more accurate to get the pitch angle for example.

The visual odometry estimates the 6 DoF movement of the camera between two frames.
Summary 🏁

There are of course many other computer vision problems that may be helpful, but this thread will give you an overview of the most important ones.

As you see, nowadays, deep learning methods (and especially CNNs) dominate all aspects of computer vision...
If you liked this thread and want to read more about self-driving cars and machine learning follow me @haltakov!

I have many more threads like this planned πŸ˜ƒ

β€’ β€’ β€’

Missing some Tweet in this thread? You can try to force a refresh
γ€€

Keep Current with Vlad

Vlad Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @haltakov

Jul 5, 2022
Zero-Knowledge Proofs 0οΈβƒ£πŸ“˜

How can I prove to you that I know a secret, without revealing any information about the secret itself?

This is called a zero-knowledge proof and it is a super interesting area of cryptography! But how does it work?

Thread 🧡
Let's start with an example

Peggie and Victor travel between cities A and B. There are two paths - a long path and a short path. The problem is that there is a gate on the short path for which you need a password.

Peggie knows the password, but Victor doesn't.

πŸ‘‡
Victor wants to buy the password from Peggie so he can use the short path.

But what if Victor pays Peggie, but she lied and she didn't know the password? How can Peggie prove to Victor she knows the password, without actually revealing it?

They use a zero-knowledge proof πŸ‘‡
Read 20 tweets
Mar 30, 2022
Launching a charity project for Ukraine πŸ‡ΊπŸ‡¦

Me and @ianbydesign teamed up to build @RescueToadz - an NFT collection raising funds for humanitarian aid via @Unchainfund. Many thanks to @cryptoadzNFT for the support!

rescuetoadz.xyz

It's unlike any other NFT, thoughπŸ‘‡
@ianbydesign @RescueToadz @Unchainfund @cryptoadzNFT Trustless

Rescue Toadz looks like a regular NFT collection at first - you can mint a toad and you get an NFT in your wallet.

100% of the mint fee is directly sent to @Unchainfund - an organization that provides humanitarian aid to Ukraine and that has already raised $9M!

πŸ‘‡ Image
@ianbydesign @RescueToadz @Unchainfund @cryptoadzNFT The process is completely trustless and automatic! All the logic is coded in the smart contract which cannot be changed and which everybody can inspect.

You trust the code, not us! We have no way to steal the funds even if we wanted (we don't πŸ˜€).

etherscan.io/address/0x5760…

πŸ‘‡ Image
Read 6 tweets
Mar 25, 2022
Dealing with imbalanced datasets 🐁 βš–οΈ 🐘

Real world datasets are often imbalanced - some of the classes appear much more often than others.

The problem? You ML model will likely learn to only predict the dominant classes.

What can you do about it? πŸ€”

Thread 🧡 #RepostFriday
Example 🚦

We will be dealing with an ML model to detect traffic lights for a self-driving car πŸ€–πŸš—

Traffic lights are small so you will have much more parts of the image that are not traffic lights.

Furthermore, yellow lights 🟑 are much rarer than green 🟒 or red πŸ”΄.
The problem ⚑

Imagine we train a model to classify the color of the traffic light. A typical distribution will be:
πŸ”΄ - 56%
🟑 - 3%
🟒 - 41%

So, your model can get to 97% accuracy just by learning to distinguish red from green.

How can we deal with this?
Read 14 tweets
Mar 22, 2022
Machine Learning Explained πŸ‘¨β€πŸ«

PCA

Principal Component Analysis is a commonly used method for dimensionality reduction.

It's a good example of how fairly complex math can have an intuitive explanation and be easy to use in practice.

Let's start from the application of PCA πŸ‘‡ Image
Dimensionality Reduction

This is one of the common uses of PCA in machine learning.

Imagine you want to predict house prices. You get a large table of many houses and different features for them like size, number of rooms, location, age, etc.

Some features seem correlated πŸ‘‡
Correlated features

For example, the size of the house is correlated with the number of rooms. Bigger houses tend to have more rooms.

Another example could be the age and the year the house was built - they give us pretty much the same information.

We don't want that πŸ‘‡
Read 16 tweets
Mar 18, 2022
s this formula difficult? πŸ€”

This is the formula for Gradient Descent with Momentum as presented in Wikipedia.

It may look intimidating at first, but I promise you that by the end of this thread it will be easy to understand!

Thread πŸ‘‡

#RepostFriday
The Basis ◻️

Let's break it down! The basis is this simple formula describing an iterative optimization method.

We have some weights (parameters) and we iteratively update them in some way to reach a goal

Iterative methods are used when we cannot compute the solution directly
Gradient Decent Update πŸ“‰

We define a loss function describing how good our model is. We want to find the weights that minimize the loss (make the model better).

We compute the gradient of the loss and update the weights by a small amount (learning rate) against the gradient.
Read 8 tweets
Mar 16, 2022
Machine Learning Formulas Explained πŸ‘¨β€πŸ«

For regression problems you can use one of several loss functions:
β–ͺ️ MSE
β–ͺ️ MAE
β–ͺ️ Huber loss

But which one is best? When should you prefer one instead of the other?

Thread 🧡 Image
Let's first quickly recap what each of the loss functions does. After that, we can compare them and see the differences based on some examples.

πŸ‘‡
Mean Square Error (MSE)

For every sample, MSE takes the difference between the ground truth and the model's prediction and computes its square. Then, the average over all samples is computed.

For details, check out this thread:


πŸ‘‡
Read 20 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(