A lot of people don't really understand the massive amount of money and manpower Tesla has funneled into developing not only the AI that runs the car, but also the hardware that does all that work. This includes advanced hardware in the car and some of the worlds most advanced supercomputers at Tesla which analyze and learn from all the data and videos Teslas are constantly feeding back to the mother ship to make the car safer and ultimately to achive autonomous driving capability. Here is good coverage of the various AI functionality: