Running YOLOv8 on an STM32MP257 for Tic-Tac-Toe
A camera that sees a tic-tac-toe board. A robotic arm that knows where every piece is. And a chip running it all without ever touching the cloud.
For my internship at STMicroelectronics, I trained a YOLOv8 model from scratch to detect board occupancy using colored game pieces, built my own dataset, labeled every frame, and dealt with the boring problems nobody warns you about: lighting that changes the moment you move the lamp, a dataset too small to generalize, a camera angle that worked perfectly until it didn't.
Getting a model to train is one thing. Getting it to run on an STM32MP257, with Cortex-A35 cores, a Cortex-M33 coprocessor, and a Neural-ART NPU sharing one tiny board, is a different problem entirely. The export pipeline alone took the model through four formats: PyTorch to ONNX to TFLite to the ST edge toolchain. Each step lost something. Each step needed debugging.
The result: real-time inference on-device, no cloud round-trip, latency measured in single-digit milliseconds. The arm picks up pieces and plays a full game. It's not a strong player. It doesn't need to be. The point was proving the pipeline works end to end on constrained hardware.