Self-Driving Cars
Your browser doesn't support speech here. You can still read everything, or try Chrome, Edge or Safari.

← All courses

Course 7 of 11 · Intermediate → Advanced

Self-Driving Cars

Build an autonomous car and test it in simulation. Vehicle models and control, sensors, lane and object detection, segmentation and depth trained from scratch on simulator data, localisation and sensor fusion, path planning, reinforcement learning and safety testing, all in a driving simulator in your browser.

Softmaxima Simulator StudioWrite your car in Python, with as many files and trained networks as it needs, and watch it drive. In your browser, nothing to install.Open
How this course works

Welcome

  • Level: Intermediate → Advanced. You need: Python, Maths for AI and Machine Learning. Deep Learning and Computer Vision for the perception topics.
  • No car or hardware needed: everything is tested in a driving simulator that runs in the page. You write the car's brain in Python, press Run and watch it drive.
  • Before you start: Python, Maths for AI and Machine Learning. The perception topics also use Deep Learning and Computer Vision.
  • Pick a topic from the sidebar; they go in order. Press ▶ Play this topic to hear a lesson read aloud, or 🔊 Explain on one section.
  • Topics climb from Beginner to Intermediate · Maths, Advanced and Code; use the Show chips to hide levels you don't need. Most have a Watch it animation, Try it demos and runnable code examples, and every topic ends with a quiz: answer it to mark the topic done ✓.
  • Stuck? Press 💬 Ask the AI tutor: a small free AI model that runs on your own device and answers from the course.
  • Progress is saved in this browser and shared across all the courses on this site.

Learning path: 🐍 Python → 🗄️ SQL & Databases → ∑ Maths for AI → 📈 Machine Learning → 🧠 Deep Learning → 👁️ Computer Vision → 🚗 Self-Driving Cars → 💬 Natural Language Processing → ✨ Generative AI & LLM Apps → 🚀 Flask & Deployment → 🔬 Becoming an AI Researcher

Part 1: How a self-driving car works

Part 2: Seeing the road

6. Sensors and the Camera ModelWhat each sensor on a self-driving car measures and where it fails, how a camera turns the 3D world into pixels (the pinhole model, intrinsics and extrinsics), the car's camera in the simulator with perfect labels, and turning the camera view into a bird's-eye view.7. Recording a Labelled Driving DatasetWhy self-driving teams use simulated data, what labels a perception model needs, recording your own dataset in the simulator with weather and steering variety, and loading it in Python. Every model you train in Part 2 is trained on data you record here.8. Finding Lanes the Classic WayA complete lane finder without machine learning: a bird's-eye view, colour thresholds for white and yellow paint, a histogram and sliding windows to trace each line, and a curve fit. Then drive a full lap using only the camera, and find where hand-written rules break.9. Traffic-Light Classifier: Your First CNN from ScratchBuild the perception step that reads traffic lights: crop each light from your recorded data, design a small convolutional network, train it from scratch in PyTorch with class weights and augmentation, check it by weather, export it, and load it into the simulator so the car stops at red lights using your network.10. Object Detection: Cars, Pedestrians and LightsFind every car, pedestrian and traffic light in the camera image with one network: grid-based detection in the style of YOLO, building targets from your labelled boxes, a loss with four parts, non-maximum suppression, precision and recall per class, and running your trained detector live in the simulator.11. A U-Net for Lanes, Road and DistanceOne network that labels every pixel (own lane, other lane, markings, vehicles, pedestrians, lights) and estimates how far away each pixel is: semantic segmentation, the encoder–decoder and its skip connections, class weights for rare pixels, IoU per class, depth from one camera, and driving laps steered by your own U-Net.12. Tracking Objects Between FramesDetections are a fresh guess every frame; driving needs objects that persist, with an identity and a velocity. Match detections to tracks with IoU, smooth and predict them with a constant-velocity Kalman filter, survive missed frames, and estimate the distance and time to collision with the car ahead.13. Driving by Imitation: Camera to SteeringSkip lanes and boxes entirely: train a network that maps the camera image straight to a steering angle by copying a driver (behaviour cloning, as in NVIDIA's PilotNet). See why a low test error is not enough, why the car drifts off the road, and how recovery data fixes it.14. Robustness and Running Models LiveA model that works on your test set can still fail on the road. Measure performance by condition, understand the gap between simulation and reality, fine-tune instead of starting over, and make a model fast and small enough for a car: the time budget, 8-bit weights and what they cost.

Part 3: Knowing where you are

Part 4: Deciding what to do

Part 5: Making it safe

Part 6: Modern perception (advanced)

24. Real Datasets, Transfer Learning and mAPMove from the simulator to real roads: the public driving datasets (KITTI, BDD100K, nuScenes, Waymo), measuring a detector properly with average precision and COCO mAP, and why starting from a pretrained network beats training from scratch. Fine-tune a pretrained YOLO on your recordings, then on KITTI.25. Depth from Cameras: Stereo and Self-SupervisedHow far away is everything? Measure depth with two cameras by matching pixels, see why the error grows with the square of the distance, discover how a network can learn depth from a single camera with no depth labels at all, and test a depth foundation model.26. Lidar and 3D Object DetectionA lidar measures distance with lasers, millions of points a second. Explore a simulated 32-laser lidar, detect objects the classic way (remove the ground, cluster, fit boxes), see where that breaks, then detect cars and pedestrians with a learned bird's-eye-view network, and train a PointPillars-style detector on KITTI's real lidar.27. Bird's-Eye View: Many Cameras and Sensor FusionModern self-driving cars fuse many cameras into one map seen from above. Mount four cameras on the car, see why flat-ground projection smears every car, lift pixels into 3D with depth as Lift-Splat-Shoot does, paint lidar points with camera classes, and train Lift-Splat-Shoot in Colab on four-camera recordings.28. Learning to Predict Other Road UsersWhere will that car be in 3 seconds? Learn why one predicted path is not enough, train networks that predict several possible futures with probabilities, measure them with minADE, minFDE and miss rate, and build a transformer predictor in Colab.29. The Frontier: End-to-End, World Models and Vision-LanguageWhere self-driving research is heading: whole stacks trained end to end, world models that imagine the future, vision-language models that explain a scene in words, and the problem underneath them all, knowing when the network does not know. Measure uncertainty yourself and question a vision-language model about a road scene.
When you finish

Next course

Ready