haltakov.eth ๐Ÿงฑ๐Ÿ”จ Profile picture
Apr 13, 2021 โ€ข 8 tweets โ€ข 3 min read โ€ข Read on X
How Does a Self-Driving Car Work? ๐Ÿ”ง ๐Ÿง  ๐Ÿš™

This is classical self-driving car software stack. Nowadays, all steps in the pipeline are dominated by machine learning.

Read below for details on each step ๐Ÿ‘‡
Sensors ๐ŸŽฅ

There are 3 main sensors for environment perception 360ยฐ around the car:
โ–ช๏ธ Cameras
โ–ช๏ธ Lidars
โ–ช๏ธ Radars

Each sensor has different advantages and disadvantages, so combining all 3 is the best strategy to achieve maximum robustness.
Perception ๐Ÿ–ผ๏ธ

The perception module processes all the sensor raw data to detect different objects, drivable space, lane boundaries, measure distance etc.

Fusing the information from different sensors usually increases the quality of the data significantly.
Localization ๐Ÿ—บ๏ธ

Most self-driving cars use a HD map. The map provides information about the geometry of the road, traffic rules and position of interesting objects (e.g. traffic lights).

Localization in the map is done using GPS and landmarks detected by the sensors.
Prediction ๐Ÿ”ฎ

The goal of this module is to predict the actions and trajectories of other traffic participants.

Will the car in front break?
Will the car cut in front of me?
Will the pedestrian cross the street?

This is crucial for the car to plan its own trajectory!
Planning ๐Ÿ”€

In this step the car plans its own trajectory and actions. It needs to consider all other traffic participants, their intentions and the surrounding infrastructure.

One of the main objectives when planning is to maximize safety, but also to drive naturally.
Control ๐Ÿš™

The final step is controlling the throttle, breaks and steering so that the car actually drives the planned trajectory.

Here, it is important to have a smooth and natural control and not a steering wheel that twitches all the time.
If you liked this thread and want to read more about self-driving cars and machine learning give me a follow! ๐Ÿ‘

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

โ€ข โ€ข โ€ข

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

Keep Current with haltakov.eth ๐Ÿงฑ๐Ÿ”จ

haltakov.eth ๐Ÿงฑ๐Ÿ”จ 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!

:(