A high-concurrency, real-time dart scoring and board analytics engine architected in Rust.
The professional Rust port of the original Dart-Vision project.
The Rust Auto Score Engine uses a deep neural pipeline to:
- 📷 Capture/Upload a dartboard image (800x800).
- 🔍 Detect dart positions and 4 calibration corners in under 50ms.
- 📐 Reconstruct board areas even if corners are obscured by players.
- 🧮 Calculate the exact score based on BDO professional standards.
- 📊 Display a professional dashboard with SVG overlays and confidence metrics.
Experience the engine directly in your browser or via cloud hosting:
| Platform | Link | Technology |
|---|---|---|
| WASM Site | 🔗 Open Demo | Rust + WebAssembly (Local Inference) |
| HF Space | 🔗 Open Space | Docker + Axum (Cloud Inference) |
The engine is optimized for sub-millisecond latency on modern GPUs.
| Command | Category | Key Features |
|---|---|---|
cargo run --release -- gui |
Dashboard | Full Web UI (8080), Live SVG, Real-time Analysis |
cargo run --release -- train |
Training | Adam Optimizer, DIOU Loss, Auto-Checkpointing |
cargo run --release -- test <path> |
Diagnostics | Raw Coordinate Reporting, Confidence Metrics |
Note: For maximum performance, always use the
--releaseflag during execution.
- Rust Toolchain: Stable channel (1.75+).
- GPU Drivers: Support for Vulkan, Metal, or DX12 (via WGPU).
# Clone Repo
git clone https://github.com/iambhabha/RustAutoScoreEngine.git
cd RustAutoScoreEngine
# Ensure weights are present
# Place 'model_weights.bin' in the root directory
# Launch Dashboard
cargo run --release -- guiFollow these steps to train the model on your own hardware using the Burn framework.
Download the Official IEEE DeepDarts Collection (16K+ images) and extract them:
# Extract into dataset/800 folder
unzip images.zip -d dataset/800/Ensure dataset/labels.json exists with mappings for:
- Class 0: Dart Tip
- Class 1-4: Calibration Corners
cargo run --release -- train💡 VRAM Optimization: The engine is optimized for as little as 3.3GB VRAM, making it training-ready for consumer laptops and GPUs.
⚙️ GPU Tuning: All performance and accuracy settings are now in src/config.rs. See SETTINGS.md for detailed instructions on how to optimize for 100GB vs RTX 5080 VRAM.
Need to generate a large labeled dataset quickly? Use our built-in auto-labelers to detect corners and darts automatically from raw images.
This uses a pre-trained model.pt to generate labels_auto.json and high-quality visuals.
python tools/labeler_v8.py- Clean Visuals: Draws sharp 12x12 boxes with color-coded labels (C1-C4, D).
- Customizable: Adjust box size or colors in the
generate()function using OpenCV.
A pure Rust implementation for ultra-fast, dependency-free dataset labeling using model.onnx.
cargo run --bin autolabel- Pixel-Art Labels: Custom "D" and "C1-C4" renderer for clear verification without font dependencies.
- Fixed Boxes: Uses synchronized 12x12 boxes to match the Python output exactly.
- Legend: Prints a color guide (Red=C1, Green=C2, etc.) directly in your terminal.
RustAutoScoreEngine/
├── src/
│ ├── main.rs ← Entry point (CLI Handler)
│ ├── bin/
│ │ └── autolabel.rs ← Rust Auto-Labeler (ONNX)
│ ├── model.rs ← YOLOv4-tiny (Burn Implementation)
│ ├── server.rs ← Axum Web Server & API
│ ├── train.rs ← Training Loop & Optimizers
│ ├── scoring.rs ← BDO Standard Mathematics
│ └── wasm_bridge.rs ← Browser Bindings
├── tools/
│ └── labeler_v8.py ← Python Auto-Labeler (YOLOv8)
├── static/
│ └── index.html ← Professional Dashboard UI
├── dataset/
│ ├── 800/ ← Training Images
│ └── labels.json ← Ground Truth Metadata
├── model_weights.bin ← Trained Neural Weights
├── Dockerfile ← Hugging Face Space Config
├── Cargo.toml ← Dependencies & Build Config
├── SETTINGS.md ← GPU & Training Optimization Guide
└── README.md ← Project Documentation
| Region | Radius (mm) |
|---|---|
| Full Board | 225.5 |
| Double Ring | 170.0 |
| Treble Ring | 107.4 |
| Outer Bull | 15.9 |
| Bullseye | 6.35 |
If you use this work in your research, please cite:
@inproceedings{mcnally2021deepdarts,
title = {DeepDarts: Modeling Keypoints as Objects for Automatic Scorekeeping in Darts using a Single Camera},
author = {McNally, William and Narasimhan, Kanav and Guttikonda, Srinivasu and Yampolsky, Alexander and McPhee, John and Wong, Alexander},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVSports)},
year = {2021}
}