CubeCheck 3Γ3 models
Three small networks that check a scrambled 3Γ3 cube from one camera view. They power check.cubing.in, where they run in the browser.
- Code, training and evaluation: github.com/darshanvss/cubecheck
- Try it: check.cubing.in
Files
| File | What it does | Parameters | Size |
|---|---|---|---|
corners/c2/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/c2/refiner.pt |
256Γ256 close-up β the 7 corners precisely | 2.5 M (small U-Net) | 10 MB |
reader/r2/best.pt |
Three straightened 72Γ72 faces β each of the 27 stickers: one of 6 colours, or covered | 0.7 M (small CNN + 2 transformer layers) | 2.8 MB |
onnx/*.onnx, onnx/meta.json |
The same three networks exported for ONNX Runtime (used by the website) | 22.7 MB | |
corners/c2/*_log.json |
Training curves, one entry per epoch |
The .pt files are PyTorch checkpoints holding only weights and scores (they load with torch.load(..., weights_only=True)). Use the PyTorch files 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/c2/ and runs/reader/r2/
The website downloads the ONNX files at build time (web/scripts/fetch-models.mjs).
Results
On 1,000 held-out synthetic renders with harsh random camera effects, single frames:
| Cube found | 994 / 1,000 |
| Frames with no cube wrongly called "cube" | 0 / 300 |
| Refiner corner error | median 0.78 px, 95th percentile 3.6 px |
| Stickers read correctly | 99.0% |
| True scramble called correct | 99.2% (no false alarms; the rest say "re-check") |
| One slipped move caught | 99.1% |
Results on real photos are not published yet.
Training data
Synthetic only: 32,800 3D renders (1280Γ720) of a 3Γ3 cube in randomised rooms, handheld and on tables, with exact labels for the 7 corners and every sticker: 20,000 scrambled, 6,000 near-solved, 5,000 with no cube, and 1,800 held out for testing. Room backgrounds are CC0 photos from Poly Haven. The training images contain no photographs of people. Camera effects are added at training time.
The dataset is not published yet. It will be released once it covers more puzzles (4Γ4 and up). Until then, retraining needs your own data in the same format: see docs/training.md and docs/dataset.md.
Training
Finder 60 epochs and refiner 100 epochs on one NVIDIA A40 (48 s per epoch, about 2.2 hours in all), starting from the previous version's weights. Sticker reader: about 75 minutes on an Apple M-series laptop.
Intended use and limitations
- Helps a scrambler double-check a 3Γ3 scramble. Not an official WCA tool, and not a replacement for the scrambler's own check.
- 3Γ3 only, 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 one corner of the cube pointing at the camera, so three faces show.
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.