CubeCheck models

Small networks that check a scrambled cube, 2Γ—2 to 7Γ—7, from one camera view. They power check.cubing.in, where they run in the browser.

Versions

Each release is a tag; the code pins the one it was tested with.

Tag Corners Sticker reader Cube sizes
v0.2.0 c7: trained with painted fingers over corners and across whole edges, and with two-face views r4: one reader for every size 2Γ—2 to 7Γ—7
v0.1.0 c2 r2 3Γ—3

This repository was called cubecheck-3x3 until v0.2.0; the old name still redirects here.

Files (v0.2.0)

File What it does Parameters Size
corners/c7/finder.pt Whole frame at 256Γ—256 β†’ is there a cube, and roughly where its 7 visible corners are 2.5 M (small U-Net) 10 MB
corners/c7/refiner.pt 256Γ—256 close-up β†’ the 7 corners precisely 2.5 M (small U-Net) 10 MB
reader/r4/best.pt The three visible faces of an NΓ—N cube, straightened to 24 px per sticker β†’ each of the 3NΒ² stickers: one of 6 colours, or covered 0.72 M (small CNN, a position network, 2 transformer layers) 2.9 MB
onnx/finder.onnx, onnx/refiner.onnx The corner networks for ONNX Runtime (used by the website) 9.9 MB each
onnx/reader-N.onnx (N = 2…7) The sticker reader for one cube size: the website loads only the size it checks 2.9 MB each
onnx/meta.json Input sizes and the settings the website uses (finder bar 0.5, a second look 2Γ— closer when unsure)
*_log.json, log.json Training curves, one entry per epoch

The older corners/c2/ and reader/r2/ files are kept (the v0.1.0 tag has its own onnx/).

The .pt files are PyTorch checkpoints holding only weights, settings and scores (they load with torch.load(..., weights_only=True)). Use them from Python or to train further, and the ONNX files to run in a browser or anywhere ONNX Runtime runs.

Use

From the GitHub repository:

cd python
uv sync --extra models
uv run python scripts/download_models.py   # into runs/corners/c7/ and runs/reader/r4/

The website downloads the ONNX files at build time (web/scripts/fetch-models.mjs).

Results (v0.2.0)

Held-out synthetic renders with harsh random camera effects, single frames, run exactly as the website runs them (python/scripts/evaluate_nxn.py), 300 renders per size with scrambles of every length:

2Γ—2 3Γ—3 4Γ—4 5Γ—5 6Γ—6 7Γ—7
True scramble called correct 98.7% 99.3% 100% 99.0% 96.3% 90.3%
False alarm (the rest say "re-check") 0% 0.7% 0% 0% 0.7% 0.3%
One slipped move caught 96.7% 100% 100% 99.0% 96.7% 90.7%
One slipped move missed 2.0% 0% 0% 0% 0.3% 0%

On 1,000 full 3Γ—3 scrambles: true scramble correct 99.9% with no false alarms, one slip caught 99.5%. With two faces and a sliver in view (the cube held toward the scrambler), 86–95% correct with 0.3–2.7% false alarms. The live page waits for several frames to agree.

With fingers hiding a whole edge of the cube, c7 puts the two hidden corners about half as far off as the model before it (4–7% of the edge, from 8–11%), and false alarms on a 7Γ—7 held that way fell from 19% to 6%.

Results on real photos are not published yet.

Training data

Synthetic only: about 127,000 3D renders (1280Γ—720) of 2Γ—2 to 7Γ—7 cubes in randomised rooms, handheld and on tables, with exact labels for the 7 corners and every sticker. Scrambles of every length, views of three faces, of two faces and a sliver, and of exactly two faces, cluttered scenes, and 15,000 frames with no cube. Room backgrounds are CC0 photos from Poly Haven. The training images contain no photographs of people. Camera effects and painted fingers are added at training time. See docs/dataset.md.

Training

Each model starts from its parent's weights. c7: from c5b, finder 8 epochs and refiner 20 on one RTX 4090 (about 1.5 hours). r4: from r3 (itself from the 3Γ—3 reader r2), on an Apple M-series laptop, about 2 hours a stage. Commands: docs/training.md.

Intended use and limitations

  • Helps a scrambler double-check a scramble. Not an official WCA tool, and not a replacement for the scrambler's own check.
  • Standard WCA colour scheme. Stickerless cubes and unusual colour schemes are untested.
  • Trained on renders: accuracy on real webcams, under strongly coloured light or with heavy motion blur may be lower.
  • Needs a corner of the cube toward the camera (three faces), or two faces on 3Γ—3 and bigger. 6Γ—6 and 7Γ—7 stickers are small, so the cube has to be close: farther away the check says "re-check".

Licence

AGPL-3.0, like the code. If you use these weights in a service that people use over a network, share its source with them.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support