How AI Powers Self-Driving Tesla with Elon Musk and Andrej Karpathy

Andrej Karpathy, Tesla's head of AI, explains how the company trains self-driving neural networks on real fleet data. Tesla's advantage is scale, variety, and real-world footage from millions of vehicles. The system learns from failure cases, automatically labels events like cut-ins, and infers 3D depth from cameras alone without LiDAR.
Chapters
Just, so, can you please talk about your background in a way that is not bashful? Just tell, feel free to tell about the stuff you've done.
Yeah, and then— Sure.
Yeah.
So yeah, I think I've been training neural networks basically for what is now a decade, and these neural networks were not actually really used in the industry until maybe 5 or 6 years ago. So it's been some time that I've been training these neural networks, and that included, you know, institutions at Stanford, at OpenAI, at Google, and really just training a lot of neural networks, not just for images but also for natural language. And designing architectures that couple those two modalities for my PhD. So—
And the computer science class.
Oh yeah, and at Stanford I actually taught the convolutional neural networks class, and so I was the primary instructor for that class. I actually started the course and designed the entire curriculum. So in the beginning it was about 150 students, and then it grew to 700 students over the next 2 or 3 years. So it's a very popular class. It's one of the largest classes at Stanford right now. So that was also really successful.
I mean, Andrej is like really one of the best computer vision people in the world.
Arguably the best. Okay, thank you. Yeah, so hello everyone. So Pete told you all about the chip that we've designed that runs neural networks in the car. My team is responsible for training of these neural networks, and that includes all of data collection from the fleet, neural network training, and then some of the deployment onto that chip. So what do the neural networks do exactly in the car? So what we are seeing here is a stream of videos from across the vehicle, across the car. These are 8 cameras that send us videos, and then these neural networks are looking at those videos and are processing them and making predictions about what they're seeing. And so some of the things that we're interested in and some of the things you're seeing on this visualization here are lane line markings, other objects, the distances to those objects, what we call drivable space, shown in blue, which is where the car is allowed to go, and a lot of other predictions like traffic lights, traffic signs, and so on. Now, For my talk, I will talk roughly into— in 3 stages. So first, I'm going to give you a short primer on neural networks and how they work and how they're trained. And I need to do this because I need to explain in the second part why it is such a big deal that we have the fleet and why it's so important and why it's a key enabling factor to really training these neural networks and making them work effectively on the roads. And in the third stage, I'll talk about vision and LiDAR and how we can estimate depth just from vision alone. So the core problem that these networks are solving in the car is that of visual recognition. So for you and I, these are very— this is a very simple problem. You can look at all of these 4 images and you can see that they contain a cello, a boat, an iguana, or scissors. So this is very simple and effortless for us. This is not the case for computers. And the reason for that is that these images are to a computer really just a massive grid of pixels. And at each pixel, you have the brightness value at that point. And so instead of just seeing an image, a computer really gets a million numbers in a grid that tell you the brightness values at all the positions. The matrix, if you will.
It really is the matrix.
Yeah. And so we have to go from that grid of pixels and brightness values into high-level concepts like iguana and so on. And as you might imagine, this iguana has a certain pattern of brightness values, but iguanas actually can take on many appearances. So they can be in many different appearances, different poses, in different brightness conditions, against different backgrounds. You can have different crops of that iguana. And so we have to be robust across all those conditions, and we have to understand that all those different brightness patterns patterns actually correspond to iguanas. Now, the reason you and I are very good at this is because we have a massive neural network inside our heads that is processing those images. So light hits the retina, travels to the back of your brain to the visual cortex, and the visual cortex consists of many neurons that are wired together and that are doing all the pattern recognition on top of those images. And really, over the last, I would say, about 5 years, the state-of-the-art approaches to processing images using computers have also started to use neural networks, but in this case, artificial neural networks. But these artificial neural networks, and this is just a cartoon diagram of it, are a very rough mathematical approximation to your visual cortex. We really do have neurons and they are connected together. And here I'm only showing 3 or 4 neurons in 3 or 4— in 4 layers. But a typical neural network will have tens to hundreds of millions of neurons, and each neuron will have 1,000 connections. So these are really large pieces of almost simulated tissue. And then what we can do is we can take those neural networks and we can show them images. So for example, I can feed my iguana into this neural network, and the network will make predictions about what it's seen. Now in the beginning, these neural networks are initialized completely randomly, so the connection strengths between all those different neurons are completely random, and therefore the predictions of that network are also going to be completely random. So it might think that you're actually looking at a boat right now, and it's very unlikely that this is actually an iguana. And during the training— during the training process, really what we're doing is we know that that's actually an iguana. We have a label. So what we're doing is we're basically saying we'd like the probability of iguana to be larger for this image and the probability of all the other things to go down. And then there's a mathematical process called backpropagation stochastic gradient descent that allows us to backpropagate that signal through those connections and update every one of those connections— sorry— and update every one of those connections just a little amount. And once the update is complete, the probability of iguana for this image will go up a little bit. So it might become 14%. And the probability of the other things will go down. And of course, we don't just do this for this single image. We actually have entire large datasets that are labeled. So we have lots of images. Typically, you might have millions of images, thousands of labels or something like that. And you are doing forward-backward passes over and over again. So you're showing the computer, here's an image, it has an opinion, and then you're saying, this is the correct answer, and it tunes itself a little bit. You repeat this millions of times. And sometimes you show images, the same image to the computer, you know, hundreds of times as well. So the network training typically will take on the order of a few hours. Or a few days depending on how big of a network you're training, and that's the process of training a neural network. Now there's something very unintuitive about the way neural networks work that I have to really get into, and that is that they really do require a lot of these examples, and they really do start from scratch. They know nothing, and it's really hard to wrap your head around this. So as an example, here's a cute dog, and you probably may not know the breed of this dog, but the correct answer is that this is a Japanese spaniel. Now all of us are looking at this, and we're seeing Japanese spaniel, and we're like, okay, I got it. I understand kind of, what this Japanese Spaniel looks like. And if I show you a few more images of other dogs, you can probably pick out other Japanese Spaniels here. So in particular, those three look like a Japanese Spaniel, and the other ones do not. So you can do this very quickly, and you need one example. But computers do not work like this. They actually need a ton of data of Japanese Spaniels. So this is a grid of Japanese Spaniels showing them— you need thousands of examples— showing them in different poses, different brightness conditions, different backgrounds, different crops. You really need to teach the computer from all the different angles what this Japanese Spaniel looks like. And it really requires all that data to get that to work. Otherwise, the computer can't pick up on that pattern automatically. So what does all this imply about the setting of self-driving? Of course, we don't care about dog breeds too much. Maybe we will at some point. But for now, we really care about lane line markings, objects, where they are, where we can drive, and so on. So the way we do this is we don't have labels like iguana for images, but we do have images from the fleet like this. And we're interested in, for example, lane line markings. So we— a human typically goes into an image and using a mouse annotates the lane line markings. So here's an example of an annotation that a human could create, a label for this image. And it's saying that that's what you should be seeing in this image. These are the lane line markings. And then what we can do is we can go to the fleet and we can ask for more images from the fleet. And if you ask the fleet, if you just do a naive job of this and you just ask for images at random, the fleet might respond with images like this, typically going forward on some highway. This is what you might just get, like a random collection like this. And we would annotate all that data. Now, if you're not careful and you only annotate a random distribution of this data, your network will kind of pick up on this random distribution of data and work only in that regime. So if you show it a slightly different example, for example, here is an image that actually the road is curving and it is a bit of a more residential neighborhood. Then if you show the neural network this image, that network might make a prediction that is incorrect. It might say that, OK, well, I've seen lots of times on highways lanes just go forward, so here's a possible prediction. And of course, this is very incorrect. But the neural network really can't be blamed. It does not know that the tree on the left was whether or not it matters or not. It does not know if the car on the right matters or not towards the lane line. It does not know that the buildings in the background matter or not. It really starts completely from scratch. And you and I know that the truth is that none of those things matter. What actually matters is that there are a few white lane line markings over there in the vanishing point, and the fact that they curl a little bit should pull the prediction. Except there's no mechanism by which we can just tell the neural network, hey, those lane line markings actually matter. The only tool in the toolbox that we have is labeled data. So what we do is we need to take images like this when the network fails and we need to label them correctly. So in this case, we will turn the lane to the right. And then we need to feed lots of images of this to the neural net. And neural net over time will accumulate, will basically pick up on this pattern that those things there don't matter, but those lane line markings do. And we learn to predict the correct lane. So what's really critical is not just the scale of the dataset. We don't just want millions of images. We actually need to do a really good job of covering the possible space of things that the car might encounter on the roads. So we need to teach the computer how to handle scenarios where it's night and wet. You have all these different specular reflections, and as you might imagine, the brightness patterns in these images will look very different. We have to teach a computer how to deal with shadows, how to deal with forks in the road, how to deal with large objects that might be taking up most of that image, how to deal with tunnels, or how to deal with construction sites. And in all these cases, there's no, again, explicit mechanism to tell the network what to do. We only have massive amounts of data. We want to source all those images and we want to annotate the correct lines, and the network will pick up on the patterns of those. Now, large and varied datasets make— basically make these networks work very well. This is not just a finding for us here at Tesla. This is a ubiquitous finding across the entire industry. So experiments and research from Google, from Facebook, from Baidu, from Alphabet's DeepMind all show similar plots where neural networks really love data and love scale and variety. As you add more data, these neural networks start to work better and get higher accuracies for free. So more data just makes them work better. Now, a number of companies have— a number of people have kind of pointed out that potentially we could use simulation to actually achieve the scale of the datasets. And we're in charge of a lot of the conditions here. And maybe you can achieve some variety in a simulator. Now, at Tesla— and that was also kind of brought up in the questions just before this— now, at Tesla, this is actually a screenshot of our own simulator. We use simulation extensively. We use it to develop and evaluate the software. We've also even used it for training, quite successfully so. But really, when it comes to training data for neural networks, there really is no substitute for real data. The simulator— simulations have a lot of trouble with modeling appearance, physics, and the behaviors of all the agents around you. So here are some examples to really drive that point across. The real world really throws a lot of crazy stuff at you. So in this case, for example, we have very complicated environments. With snow, with trees, with wind. We have various visual artifacts that are hard to simulate potentially. We have complicated construction sites, bushes, and plastic bags that can go in— that can kind of go around with the wind. Complicated construction sites that might feature lots of people, kids, animals all mixed in. And simulating how those things interact and flow through this construction zone might actually be completely intractable. It's not about the movement of any one pedestrian in there. It's about how they respond to each other and how those cars respond to each other and how they respond to you driving in that setting. And all of those are actually really tricky to simulate. It's almost like you have to solve the self-driving problem to just simulate other cars in your simulation. So it's really complicated. So we have dogs, exotic animals, and in some cases it's not even that you can't simulate it, it's that you can't even come up with it. So for example, I didn't know that you can have truck on truck on truck like that, but in the real world you find this and you find lots of other things that are very hard to really even come up with. So really, the variety that I'm seeing in the data coming from the fleet is just crazy with respect to what we have in the simulator. We have a really good simulator.
I mean, I think simulation, you're fundamentally grading your own homework. So if you know that you're going to simulate it, OK, you can definitely solve for it. But as Andrej Karpathy is saying, you don't know what you don't know. The world is very weird and has millions of corner cases And if you— if somebody can produce a self-driving simulation that accurately matches reality, that in itself would be a monumental achievement of human capability. They can't. There's no way.
Yep. So I think the 3 points that I really tried to drive home until now are: to get neural networks to work well, you require these 3 essentials. You require a large dataset, a varied dataset, and a real dataset. And if you have those capabilities, you can actually train your networks and make them work very well. And so why is Tesla in such a unique and interesting position to really get all these three essentials right? And the answer to that, of course, is the fleet. We can really source data from it and make our neural network systems work extremely well. So let me take you through a concrete example of, for example, making the object detector work better to give you a sense of how we develop these neural networks, how we iterate on them, and how we actually get them to work over time. So object detection is something we care a lot about. We'd like to put bounding boxes around, say, the cars and the objects here because we need to track them and we need to understand how they might move around. So again, we might ask human annotators to give us some annotations for these, and humans might go in and might tell you that, okay, those patterns over there are cars and bicycles and so on. And you can train a neural network on this, but if you're not careful, the neural network will make mispredictions in some cases. So as an example, if we stumble by a car like this that has a bike on the back of it, then the neural network actually went— when I joined, would actually create two detections. It would create a car detection and a bicycle detection. And that's actually kind of correct because I guess both of those objects actually exist. But for the purposes of the controller and the planner downstream, you really don't want to deal with the fact that this bicycle can go with the car. The truth is that that bike is attached to that car. So in terms of, like, just objects on the road, there's a single object, a single car. And so what you'd like to do now is you'd like to just potentially annotate lots of those images as this is just a single car. So the process that we go through internally in the team is that we take this image or a few images that show this pattern, and we have a mechanism, a machine learning mechanism by which we can ask the fleet to source us examples that look like that. And the fleet might respond with images that contain those patterns. So as an example, these 6 images might come from the fleet. They all contain bikes on backs of cars. And we would go in and we would annotate all those as just a single car. And then the performance of that detector actually improves. And the network internally understands that, hey, when the bike is just attached to the car, that's actually just a single car. and it can learn that given enough examples. And that's how we've sort of fixed that problem. I will mention that I talk quite a bit about sourcing data from the fleet. I just want to make a quick point that we've designed this from the beginning with privacy in mind, and all the data that we use for training is anonymized. Now, the fleet doesn't just respond with bicycles on backs of cars. We look for all the things— we look for lots of things all the time. So for example, we look for boats, and the fleet can respond with boats. We look for construction sites, and the fleet can send us lots of construction sites from across the world. We look for even slightly more rare cases. So for example, finding debris on the road is pretty important to us. So these are examples of images that have streamed to us from the fleet that show tires, cones, plastic bags, and things like that. If we can source these at scale, we can annotate them correctly and the neural network can learn how to deal with them in the world. Here's another example. Animals, of course, also a very rare occurrence, an event. But we want the neural network to really understand what's going on here, that these are animals and we want to deal with that correctly. So to summarize, the process by which we iterate on neural network predictions looks something like this. We start with a seed dataset that was potentially sourced at random. We annotate that dataset, and then we train neural networks on that dataset and put that in the car. And then we have mechanisms by which we notice inaccuracies in the car when this detector may be misbehaving. So for example, if we detect that the neural network might be uncertain, or if we detect that— or if there's a driver intervention on any of those settings, we can create this trigger infrastructure that sends us data of those inaccuracies. And so for example, if we don't perform very well on lane line detection on tunnels, then we can notice that there's a problem in tunnels. That image would enter our unit tests so we can verify that we've actually fixing the problem over time. But now what you do is to fix this inaccuracy, you need to source many more examples that look like that. So we asked the fleet to please send us many more tunnels and then we label all those tunnels correctly. We incorporate that into the training set and we retrain the network, redeploy and iterate the cycle over and over again. And so we refer to this iterative process by which we improve these predictions as the data engine. So iteratively deploying something, potentially in shadow mode, sourcing inaccuracies, and incorporating them into the training set over and over again. And we do this basically for all the predictions of these neural networks. Now, so far, I talked about a lot of explicit labeling. So like I mentioned, we ask people to annotate data. This is an expensive process in time and also with respect to— yeah, it's just an expensive process. And so these annotations, of course, can be very expensive to achieve. So what I want to talk about also is really to utilize the power of the fleet. You don't want to go through this human annotation bottleneck. You want to just stream in data and automate it automatically. And we have multiple mechanisms by which we can do this. So as one example of a project that we recently worked on is the detection of cut-ins. So you're driving down the highway, someone is on the left or on the right, and they cut in in front of you into your lane. So here's a video showing the Autopilot detecting that this car is intruding into our lane. Now, of course, we'd like to detect a cut-in as fast as possible. So the way we approach this problem is we don't write explicit code for is the left blinker on, is the right blinker on, track the cuboid over time and see if it's moving horizontally. We actually use a fleet learning approach. So the way this works is we ask the fleet to please send us data whenever they see a car transition from a right lane to the center lane or from left to center. And then what we do is we rewind time backwards and we automatically can annotate that, hey, that car will turn— will in 1.3 seconds cut in in front of the— in front of you. And then we can use that for training the neural net. And so the neural net will automatically pick up on a lot of these patterns. So for example, the cars are typically yawed, they're moving this way, maybe the blinker is on. All that stuff happens internally inside the neural net just from these examples. So we ask the fleet to automatically send us all this data. We can get half a million or so images and all of these would be annotated for cut-ins. And then we trained the network. And then we took this cut-in network and we deployed it to the fleet, but we don't turn it on yet. We run it in shadow mode. And in shadow mode, the network is always making predictions. Hey, I think this vehicle is going to cut in from the way it looks. This vehicle is going to cut in. And then we look for mispredictions. So as an example, this is a clip that we had from shadow mode of the cut-in network. And it's kind of hard to see, but the network thought that the vehicle right ahead of us on the right was going to cut in. And you can sort of see that it's slightly flirting with the lane line. It's trying to— it's sort of encroaching a little bit. and the network got excited and it thought that that was going to be cut-in, that vehicle will actually end up in our center lane. That turns out to be incorrect and the vehicle did not actually do that. So what we do now is we just churn the data engine. We source that, ran in the shadow mode, it's making predictions, it makes some false positives and there are some false negative detections. So we got overexcited sometimes and sometimes we missed a cut-in when it actually happened. All those create a trigger that streams to us and that gets incorporated now for free. There's no humans harmed in the process of labeling this data. Incorporated it for free into our training set. We retrained the network and redeployed the shadow mode. And so we can spin this a few times, and we always look at the false positives and negatives coming from the fleet. And once we're happy with the false positive/false negative ratio, we actually flip the bit and actually let the car control to that network. And so you may have noticed, we actually shipped one of our first versions of a cutting-edge architecture approximately, I think, 3 months ago. So if you've noticed that the car is much better at detecting cut-ins, that's fleet learning operating at scale. Yes, it actually works quite nicely. So that's fleet learning. No humans were harmed in the process. It's just a lot of neural network training based on data and a lot of shadow mode and looking at those results. Another—
essentially, like, everyone's training the network all the time is what it amounts to. Whether the autopilot is on or off, network is being trained. Every mile that's driven for the car that's a hardware 2 or above is training the network.
Another interesting way that we use this in the scheme of fleet learning and the other project that I will talk about is path prediction. So while you are driving a car, what you're actually doing is you are annotating the data because you are steering the wheel. You're telling us how to traverse different environments. So what we're looking at here is some person in the fleet who took a left through an intersection. And what we do here is we have the full video of all the cameras, and we know that the path that this person took because of the GPS, the inertial measurement unit, the wheel angle, the wheel ticks. So we put all that together and we understand the path that this person took through this environment. And then, of course, we can use this for supervision for the network. So we just source a lot of this from the fleet. We train a neural network on those trajectories. And then the neural network predicts paths just from that data. So really what this is referred to typically is called imitation learning. We're taking human trajectories from the real world and we're just trying to imitate how people drive in real worlds. And we can also apply the same data engine crank to all of this and make this work over time. So here's an example of path prediction going through a kind of a complicated environment. So what you're seeing here is a video, and we are overlaying the predictions of the network. So this is a path that the network would follow in green. And some— yeah.
I mean, the crazy thing is the network is predicting paths it can't even see. With incredibly high accuracy. It can't see around the corner, but it's saying the probability of that curve is extremely high, so that's the path. And it nails it. You will see that in the cars today. We're going to turn on augmented vision so you can see the lane lines and the path predictions of the cars overlaid on the video.
Yeah. There's actually more going on under the hood that you can't even tell.
It's kind of scary, to be honest.
And of course, there's a lot of details I'm skipping over. You might not want to annotate all the drivers. You might want to just imitate the better drivers. And there's many technical ways that we actually slice and dice that data. But the interesting thing here is that this prediction is actually a 3D prediction that we project back to the image here. So the path here forward is a 3-dimensional thing that we're just rendering in 2D. But we know about the slope of the ground from all this. And that's actually extremely valuable for driving. So path prediction actually is live in the fleet today, by the way. So if you're driving Cloverleafs, if you're in a Cloverleaf on the highway, Until maybe 5 months ago or so, your car would not be able to do cloverleaf. Now it can. That's path prediction running live on your cars. We've shipped this a while ago. And today, you are going to get to experience this for traversing intersections. A large component of how we go through intersections in your drives today is all sourced from path prediction from automatic labels. So what I talked about so far is really the 3 key components of how we iterate on the predictions of the network and how we make it work over time. You require large, varied, and real data set. We can really achieve that here at Tesla. And we do that through the scale of the fleet, the data engine, shipping things in shadow mode, iterating that cycle, and potentially even using fleet learning where no human annotators are harmed in the process and just using data automatically. And we can really do that at scale. So in the next section of my talk, I'm going to especially talk about depth perception using vision only. So you might be familiar that there are at least two sensors in a car. One is vision, cameras, just getting pixels. And the other is LiDAR that a lot of companies also use. And LiDAR gives you these point measurements of distance around you. Now, one thing I'd like to point out first of all is you all came here, you drove here, many of you, and you used your neural net and vision. You were not shooting lasers out of your eyes, and you still ended up here.
We might have.
That's true for everyone. So clearly, the human neural net derives distance and all the measurements and the 3D understanding of the world just from vision. It actually uses multiple cues to do so. I'll just briefly go over some of them just to give you a sense of roughly what's going on inside. As an example, we have two eyes pointed out, so you get two independent measurements at every single time step of the world ahead of you, and your brain stitches this information together to arrive at some depth estimation because you can triangulate any points across those two viewpoints. A lot of animals instead have eyes that are positioned on the sides, so they have very little overlap in their visual fields. So they will typically use structure from motion, and the idea is that they bob their heads And because of the movement, they actually get multiple observations of the world, and you can triangulate again depths. And even with one eye closed and completely motionless, you can still have some sense of depth perception. If you did this, I don't think you would notice me coming 2 meters towards you or 100 meters back. And that's because there are a lot of very strong monocular cues that your brain also takes into account. This is an example of a pretty common visual illusion where you have— these two blue bars are identical, but your brain, the way it stitches up the scene, is it just expects one of them to be larger than the other because of the vanishing lines of this image. So your brain does a lot of this automatically, and neural nets, artificial neural nets can as well. So let me give you 3 examples of how you can arrive at depth perception from vision alone, a classical approach and 2 that rely on neural networks. So here's a video going down, I think this is San Francisco, of a Tesla. So these are our cameras, our sensing, and we're looking at all— I'm only showing the main camera, but all the cameras are turned on, the 8 cameras in the autopilot. And if you just have this 6-second clip What you can do is you can stitch up this environment in 3D using multi-view stereo techniques. So this— oops. This is supposed to be a video. Is it not a video? Oh, I know it's a video. There we go. So this is the 3D reconstruction of those 6 seconds of that car driving through that path. And you can see that this information is purely— it's very well recoverable from just videos. And roughly, that's through a process of triangulation and, as I mentioned, multiview stereo. And we've applied similar techniques, slightly more sparse and approximate, also in the car. So it's remarkable. All that information is really there in the sensor, and just a matter of extracting it. The other project that I want to briefly talk about is, as I mentioned, there's nothing about neural network— neural networks are very powerful visual recognition engines. And if you want them to predict depth, then you need to, for example, look for labels of depth. And then they can actually do that extremely well. So there's nothing limiting networks from predicting this monocular depth except for labeled data. So one example project that we've actually looked at internally is we use the forward-facing radar, which is shown in blue. And that radar is looking out and measuring depths of objects. And we use that radar to annotate what vision is seeing, the bounding boxes that come out of the neural networks. So instead of human annotators telling you, OK, this car and this bounding box is roughly 25 meters away, you can annotate that data much better using sensors. So you use sensor annotation. So as an example, radar is quite good at that distance. You can annotate that, and then you can train a neural network on it. And if you just have enough data of it, this neural network is very good at predicting those patterns. So here's an example of predictions of that. So in circles, I'm showing radar objects. And the cuboids that are coming out here are purely from vision. So the cuboids here are just coming out of vision, and the depth of those cuboids is learned via sensor annotation from the radar. So if this is working very well, then you would see that the circles in the top-down view would agree with the cuboids, and they do. And that's because neural networks are very competent at predicting depths. They can learn the different sizes of vehicles internally, and they know how big those vehicles are, and you can actually derive depth from that quite accurately. The last mechanism I will talk about very briefly is slightly more fancy and gets a bit more technical, but it is a mechanism that has recently— There's a few papers basically over the last year or two on this approach. It's called self-supervision. So what you do in a lot of these papers is you only feed raw videos into neural networks with no labels whatsoever. And you can still learn— you can still get neural networks to learn depth. And it's a little bit technical, so I can't go into the full details. But the idea is that the neural network predicts depth at every single frame of that video. And then there are no explicit targets that the neural network is supposed to regress to with the labels. But instead, the objective for the network is to be consistent over time. So whatever depth you predict should be consistent over the duration of that video. And the only way to be consistent is to be right. And so the neural network automatically predicts the correct depth for all the pixels. And we've reproduced some of these results internally. So this also works quite well. So in summary, people drive with vision only. No lasers are involved. This seems to work quite well. The point that I'd like to make is that visual recognition and very powerful visual recognition is absolutely necessary for autonomy. It's not a nice-to-have. Like we must have neural networks that actually really understand the environment around you. And LiDAR points are a much less information-rich environment. So vision really understands the full details. Just a few points around are much— there's much less information in those. So as an example on the left here, is that a plastic bag or is that a tire? LiDAR might just give you a few points on that, but vision can tell you which one of those two is true, and that impacts your control. Is that person who is slightly looking backwards, are they trying to merge into your lane on the bike, or are they just going forward? In the construction sites, what do those signs say? How should I behave in this world? The entire infrastructure that we have built up for roads is all designed for human visual consumption. So all the signs, all the traffic lights, everything is designed for vision. And so that's where all that information is. And so you need that ability. Is that person distracted and on their phone? Are they going to walk into your lane? Those answers to all these questions are only found in vision and are necessary for Level 4, Level 5 autonomy. And that is the capability that we are developing at Tesla. And through— this is done through combination of large-scale neural network training through data engine and getting that to work over time and using the power of the fleet. And so in this sense, LiDAR is really a shortcut. It sidesteps the fundamental problems, the important problem of visual recognition that is necessary for autonomy. And so it gives a false sense of progress, and it's ultimately a crutch. It does give, like, really fast demos. So if I was to summarize the entire— my entire talk in one slide, it would be this. All of autonomy, because you want level 4, level 5 systems that can handle all the possible situations in 99.99% of the cases, and chasing some of the last few knights is going to be very tricky and very difficult and is going to require a very powerful visual system. So I'm showing you some images of what you might encounter in any one slice of that 9. So in the beginning, you just have very simple cars going forward. Then those cars start to look a little bit funny. Then maybe you have bikes on cars, then maybe you have cars on cars. Then maybe you start to get into really rare events like cars turned over or even cars airborne. We see a lot of things coming from the fleet and we see them at some rate, like a really good rate compared to all of our competitors. And so the rate of progress at which you can actually address these problems, iterate on the software and really feed the neural networks with the right data that rate of progress is really just proportional to how often you encounter these situations in the wild, and we encounter them significantly more frequently than anyone else, which is why we're going to do extremely well. Thank you. Thanks.
More from Andrej

Skill Issue: Andrej Karpathy on Code Agents, AutoResearch, and the Loopy Era of AI

Andrej Karpathy: Tesla AI, Self-Driving, Optimus, Aliens, and AGI | Lex Fridman Podcast #333








