Inspiration

Learning to solve a Rubik’s Cube usually means looking away from the cube to follow a video or diagram. We wanted a tutor that could see what you’re holding and respond to it.

The idea: point a scrambled cube at a small, self-contained device and get help—without needing to solve it first, connect to the cloud, or use a phone.

What it does

Cube Tutor uses an Alif development board’s camera and display to:

  • Locate visible cube faces.
  • Recognize the nine sticker colours on a face.
  • Show the camera view, detection boxes, and colour readings.
  • Provide beginner-oriented hints for building the white cross.

Camera processing and live inference run locally on the board. This is a working perception-and-feedback prototype, not yet a complete arbitrary-state cube solver.

How we built it

We trained a YOLO-based cube-face detector in PyTorch, then fine-tuned it locally using images from the actual Alif camera. We quantized the model to INT8 and compiled it with Arm Vela for the Ethos-U85 NPU.

The live detector runs through TensorFlow Lite Micro. We also built and ran a separate ExecuTorch inference prototype during development.

Firmware written in C and C++ connects camera capture, detection, calibrated sticker-colour classification, and an LVGL interface. A saved “table calibration” profile compensates for the lighting at our demo station.

We also built a network flashing service with a dashboard and per-job logs so teammates could deliver firmware builds to the shared board.

Challenges we ran into

The biggest challenge was making the entire pipeline work together.

A detector trained on webcam footage struggled with the board camera’s darker images. White balance, camera rotation, mirrored previews, and coordinate mapping all affected whether we sampled the correct stickers.

We also encountered display corruption, tight firmware memory limits, and a boot failure that required restoring the board’s application boot configuration.

Fixing these problems meant inspecting actual camera buffers, model inputs, and framebuffer captures—not just trusting a successful build or flash.

Accomplishments that we’re proud of

We brought the camera-to-detection-to-feedback loop onto the board.

A quick local fine-tune substantially improved cube localization in our demo setup. We restored a clear preview, recovered blue, green, and yellow recognition, and added a table-specific correction for the difficult red/orange boundary.

The result is a standalone prototype that can see a real cube and respond on its own screen.

What we learned

Edge AI is a systems problem. A model can execute correctly while receiving the wrong image, and a detector can find something confidently while selecting the wrong object.

Matching training data to the deployed camera—and making every intermediate stage observable—was more valuable than adding complexity.

We also learned to distinguish a working demonstration under known conditions from a generally reliable product.

What’s next for Cube Tutor

Next, we want to improve robustness across lighting, cameras, and viewing angles; reliably recognize multiple visible faces; and add guided six-face scanning.

That will support the next major step: maintaining a consistent cube state, recommending a specific move, and visually verifying that the learner completed it.

Built With

Share this project:

Updates

Submission history