Caution
This project is an AI slop.
- Nearly all of the code is generated by AI.
- No human code reviews.
- All human inputs will be converted into tokens and processed by AI. See CONTRIBUTING.md for details.
Use at your own risk!
A local, web-based annotation tool for building OCR training datasets from Arcaea play-result screenshots. It pairs with core-ocr, which provides the screenshot layout detection, field/icon recognition primitives, and the image hash database (ihdb) builder used for song and partner identification. Text recognition runs locally via RapidOCR (PaddleOCR onnx models).
The workflow it is built around:
- Bulk import a folder of screenshots. Files are content-hashed for deduplication, renamed to UUIDs, and organized into a local store.
- Automatic pre-recognition runs on every image: T1/T2 layout detection, numeric field OCR (score, PURE/FAR/LOST, max recall, high score, shiny pure count, early/late counts), clear-type and difficulty classification via color masks, and song/partner identification against an ihdb. B30/B50 screenshots take a different path: a layout probe classifies the bot rendering, and each card is pre-recognized individually, on request.
- Human review is what the UI optimizes for: every field arrives
pre-filled, suspicious values are flagged by client-side consistency
checks (identity equations like
pure = shiny + early + late), and annotating one image is mostly "glance, correct, confirm". - Confirmed values land in SQLite. Everything OCR-related is recomputable and never persisted.
B30/B50 results images (one image, many sub-components) are also a supported mode. Each card is reviewed and confirmed independently, and renderings the probe does not recognize are annotated manually. An image counts as fully reviewed once every component its layout expects has a checked row. These results are stored in their own tables, separate from the single-image device results.
This repository distributes no game assets and no game-derived data. To run recognition you need, on your own machine:
-
An image hash database (ihdb) built with
arcaea_offline_ocr.builders.ihdb.ImageHashesDatabaseBuilderfrom song jackets and partner icons you extracted yourself. Place it atdata/ihdb.db(the default) or set its path viaODM_IHDB_PATH. -
Partner icons, the song list and the characters file (the partner letter ids), extracted from an Arcaea APK:
cd backend uv run python scripts/extract_assets.py /path/to/arcaea.apk
This writes data/partner_icons/, data/catalog/songlist and
data/catalog/characters.json relative to the repository root.
The dev server proxies /api to the backend.
# backend
uv sync --all-packages
cd backend
uv run uvicorn app.main:app --port 8199
# frontend (second terminal, from the repository root)
cd frontend
pnpm install
pnpm devThe backend serves the built frontend and opens the browser itself.
uv sync --all-packages
(cd frontend && pnpm install && pnpm build)
uv run odm # or python -m appRun uv run odm --help for available configuration options.
Highest to lowest priority:
- CLI flags
ODM_*environment variablesodm.tomlin the anchor directory- built-in defaults
Paths in the config file resolve relative to the config file's directory. Paths in the environment or on the CLI resolve relative to the current working directory.
data_dir = "data"
host = "127.0.0.1"
port = 8199
open_browser = true
# database_url = "sqlite:///..."
# ihdb_path = "ihdb.db"| Variable | Default | Purpose |
|---|---|---|
ODM_CONFIG |
<anchor>/odm.toml |
Config file location |
ODM_DATA_DIR |
<anchor>/data |
Database, image store, thumbnails, assets |
ODM_DATABASE_URL |
sqlite in the data dir | SQLAlchemy URL |
ODM_IHDB_PATH |
<data>/ihdb.db |
Image hash database |
ODM_HOST |
127.0.0.1 |
Bind address |
ODM_PORT |
8199 |
Port |
ODM_OPEN_BROWSER |
true |
Open a browser tab on startup |
The anchor directory is the repository root in development, and the directory of the executable in the packaged bundle.
A non-writable data directory will raise a startup error.
backend/scripts/package_windows.py builds the frontend, then packs
the backend with PyInstaller into a portable bundle, which is a folder
around odm.exe that runs from anywhere:
# from the repository root
uv run backend/scripts/package_windows.pyThe output is build/dist/odm/. Double-clicking odm.exe starts the
server, opens the browser, and creates data/ next to the executable
on first start. The ihdb and extracted assets belong in that data/
directory (What you need to provide).
The console window is the server: closing it stops it.
Arcaea is a game by lowiro. This project is an independent tool and is not affiliated with or endorsed by lowiro.