How Tesla Uses Machine Learning to Power Self Driving Cars
Tesla is one of the leading brands in Automobile sector and being the leader in electric cars as well as self driving technology makes it stand apart from other companies. But to power self driving feature, it uses machine learning to help the car take the decision on it's own. But there are other brands too, some much older than Tesla having no problem with money but still they are behind Tesla and Tesla has a competitive advantage over all of them, How? Let's dive deeper into this.
How Machine Learning Works
Machine Learning is all about data. First of all, you need to know and be clear about what is your purpose and then you have to collect data for that purpose as much as you can. Data is the only thing which will decide how good and accurate your machine learning model will be. After collecting data, we apply some algorithms on it to find the missing pattern and then create a model out of it. This model is responsible for the decisions taken by the machine.
Machine learns through data and then becomes intelligent to take decision or predict the values which are not available or belongs to future which is in simple terms called Artificial Intelligence.
Humans are good in prediction and we have god gifted intelligence which keeps evolving with time and experience and computers are really good in computation so human like intelligence when combined with the computation power of a machine, it is capable of doing some next level automation. That is what works for self driving cars too.
Why Tesla is Leading?
We all know that there are many brands who manufacture cars and they have a really good experience of manufacturing cars with better build quality as compared to Tesla but in case of Self Driving feature, Tesla is the leader. It has competitive advantage over other brands due to many reasons. Let's discuss those reasons in detail below :-
Collecting Proper Data and Automation
To work on machine learning, we must have proper & enough data and data is really hard to obtain. Larger companies overtake the startups most of the time because they have a lot more data than the startups. Now, if you think that they can get data from some open source communities then other organizations also have access to that and if they start collecting data on their own, it takes time to build proper & enough data and other companies can also do that so there is no competitive advantage here for startups.
Now, talking about the larger organizations, sometimes they have all the data but they don't really know what to do with it or even if they know then at some point of collecting data, they didn't think about how exactly they are going to use this data which determines the overall success of our data.
Tesla is the one who was clear with their exact specific purpose of self driving cars and they are collecting data since 2012. They knew what data and in which format they need to collect to power their models. Tesla has made automated pipelines which automatically collects data from the cars and uploads that on their systems. Not only data acquisition, they have done automation for data cleaning and data transitioning too which is the most time consuming process and automating this means saving a lot of time and getting much ahead of other organizations as 80% to 90% time is consumed by data collection, data pre-processing and feature engineering only and automating this also means that they have eliminated their 80-90% of work. Results come out when we use that data to train the models and then tweaking it from there according to our requirements. So, using automation is a huge advantage for Tesla. Also, collecting data manually with the involvement of a person restricts you to scale to multiple data points but if you go for automation, it will be very easy to scale to multiple data collection points.
Now, when we provide data to the model, we also need to label it and validate the results that how much accuracy are we getting from our model. Drivers who are driving their cars keep providing the feedback to Tesla constantly since 2012 and for validating, they use additional sensors on their cars for acceleration, brakes etc. and then these sensors automatically validate what the machine is learning, the decision by the machine was right or not. This is how they have also automated data labelling and results validation.
Manufacturing Own AI Chips
Tesla manufactures it's own AI chips to solve the problem of computation which uses less memory and provides result in a fraction of seconds. These are specialized chips to process ML algorithms like Computer Vision which is powered by Deep Learning and Neural Networks by using very less resources. Even though we had GPU chips of NVIDIA etc. which are used for processing high end computer games but still these chips were also not specialized for machine learning algorithms.
Now we also have Tensorflow like technologies developed by MNCs or the Open Source communities which are specifically designed for processing algorithms of deep learning and neural networks. Google developed a unit called TPU (Tensor Processing Unit) which helps in processing these things much faster but TPUs are good in processing batch inputs and it has a minimum batch size of 256 objects which means that it will start working when you have minimum 256 objects loaded into the system before it starts processing.
But for self driving cars, we need to lower the latency as well as the response rate so that the car can take some action immediately whenever needed. So, for this reason Tesla has built it's own AI chips which has the batch size of only one which in turn lowers the latency to the minimum possible. Now this technology can not only power self driving cars but also any type of technology which requires real-time processing like computer vision. For example - drones, planes etc.
This is where Tesla has the competitive advantage as nowadays any type of software can be easily copied but it's not easy to create same kind of hardware as to what Tesla has built.
Making Use of Computer Vision
For collecting data, we must use least expensive things while collecting because we have to move to production environment and then we may find out that our machine won't work without that expensive thing we used to collect data and it may not seem economically feasible then. This is where Tesla started using lidar for data collection. Lidar is a type of radar system which builds 3-D map of the environment where you are driving the car using black coloured dots to solve the problem of proximity so that you don't end up crashing into something while using self driving cars. But lidar is not a good solution for using it in cars, because it is very expensive and it doesn't collect as much amount of data you can collect using the cameras. But for collecting data using cameras, we need to use computer vision as it can detect all the types of objects like bicycle, cat, plastic bag or anything and self driving car will make decision accordingly. Computer Vision (CV) can also solve the problem of proximity but it's complicated to solve that using CV and once it's solved, there won't be any need of lidar anymore.
Now, Tesla is using CV and cameras from the beginning when they started collecting data. But, they are also using radar system still in their cars to validate the data provided by CV that it's correct or not using cross reference. Using CV in production system seems practical as you don't have to spend money on that. Now we all know that they have already built their own chips for faster working of computer vision.
That's why I said that Tesla is the Leader in the field of self driving cars because of the methods they are following. If you liked this article, do share it with your colleagues and friends so that they also know this case study which will benefit them in future.