01 Video
Starting with the camera’s view
I started with 42 videos: over 5.46 million frames across different wheels, lighting conditions, and camera angles.
How much of a roulette spin can you predict from a few seconds of video?
I built a computer vision system to follow the ball and wheel, assembled a dataset of 2,765 spins, and trained three neural networks to forecast their motion. The models learned enough to substantially outperform the simple baselines.
What the camera sees
Choose a frame to inspect its labels.
An angled camera turns a circular track into an ellipse. A hand can hide the ball, and a missed detection can look like a sudden jump. I built a processing pipeline to correct the view, repair short gaps, and extract motion the models could learn from.
A frame from the source footage.
01 Video
I started with 42 videos: over 5.46 million frames across different wheels, lighting conditions, and camera angles.
02 Detect
I trained a YOLOv11 segmentation model to find the ball, green zero, and dealer’s hand. It located the ball’s centre with a mean error of 1.36 pixels.
03 Correct
I fitted an ellipse to the track, then transformed the angled camera view into a top-down circle. That gave every spin a shared coordinate system.
04 Measure
From those tracks, I calculated position and speed, then identified when the ball left the rim. Those measurements became the models’ training data.
With the tracks in place, I could test the original question. I gave the models only the first 2–10 seconds of each spin and asked them to predict the motion that followed, up to the moment the ball left the rim.
2,765 SPINS, DIVIDED BY PURPOSE
11 motion features per frame
Motion in → time out
t*Motion in → future positions out
sin θ̂, cos θ̂Motion in → future positions out
sin θ̂, cos θ̂An illustration of early stopping: keep the model that performs best on validation data, rather than simply training for longer.
WHAT HAPPENS WHEN THE INPUT CHANGES?
Ball-trajectory error after six seconds of video. Removing the derived angular features increased the error from 0.185 to 1.179 radians.
01 Split
I used 75% of the spins for training, 12.5% to tune the models, and reserved the final 12.5% for testing.
02 Design
One LSTM predicts a single drop time. Two encoder–decoder networks predict sequences of future angles, one for the ball and one for the wheel.
03 Train
I trained with Adam and a loss suited to circular motion, reducing the learning rate as progress slowed and stopping after ten epochs without improvement.
04 Test
I removed features, added noise, and reduced the training set to test how robust the models were. I also varied the observation window from two to ten seconds to measure how much early footage helped.
After six seconds of video, the ball model’s mean trajectory error was 0.185 radians—about 10.6°. That is 88% lower than simply keeping the last observed angle. Giving the models more of the spin improved all three predictions.
How much did the model improve?
The comparison is made after six seconds of observed motion. “Last-angle” keeps the last position; “Random” guesses an angle. The bars show mean error in radians, so shorter is better.
Where the forecasts break down
The difficult cases involve abrupt slowing or a ball hidden from view. A forecast can follow the earlier motion well and still miss what happens after that interruption.The project showed that video contains enough information to learn useful forecasts of roulette motion. Predicting the final pocket is a further problem: these experiments stop at drop-off. The dissertation covers the dataset, model choices, comparisons, and the cases that were hardest to predict.
Read the methods and results