MaskGenerator
A small neural network that finds the road lines in a camera image, and a 2D raycast that turns them into lidar-like distances to drive a car.
- Period
- May 2026 – Jun 2026
- Role
- Model, training pipeline and raycast
- Team
- 3 people
- Status
- archived
Stack and tags


To drive a car, an AI does not need to see the road the way we do. It needs to know where the lines are, and how far away. MaskGenerator is the vision half of RoboCar, a self-driving racing car: it takes a picture from the car, keeps only the road lines, and turns them into a handful of distances, the way a lidar would.
How it works
There was no ready-made dataset, so we made one with a racing simulator: for every picture of the road, the simulator also gives the same picture with only the lines drawn. A small neural network learns to go from one to the other. Rays are then cast from the car across the result, and the distance at which each one meets a line is all the driving AI receives.
Most of the progress came from the data rather than the model: flipped and rotated pictures, grayscale, cleaner examples and some real photographs.
What I took from it
- A model is only as good as the examples it sees, so changing the data beat changing the network.
- Reducing an input to the few numbers that matter can matter more than a better model.