Spaces:
Sleeping
Sleeping
Download togyz/classes.py from ansarzeinulla/9OCR: direct link, hf CLI and curl.
- Browser
- Download file 757 Bytes
-
https://huggingface.co/spaces/ansarzeinulla/9OCR/resolve/88da3f4b8727a736334dbbfb5216dc4ea9c26560/togyz/classes.py
- Command line
-
hf download hf://spaces/ansarzeinulla/9OCR@88da3f4b8727a736334dbbfb5216dc4ea9c26560/togyz/classes.py
-
curl -L -o classes.py https://huggingface.co/spaces/ansarzeinulla/9OCR/resolve/88da3f4b8727a736334dbbfb5216dc4ea9c26560/togyz/classes.py
757 Bytes
| """Canonical class list for Togyzkumalak move OCR. | |
| 162 moves (start hole 1-9, end hole 1-9, with or without a capture 'x') | |
| plus 'empty'. The order matches the alphabetical order used by | |
| torchvision ImageFolder in the legacy pipeline (legacy/class_mapping.json), | |
| so old and new indices agree. | |
| """ | |
| MOVES = [ | |
| f"{start}{end}{suffix}" | |
| for start in range(1, 10) | |
| for end in range(1, 10) | |
| for suffix in ("", "x") | |
| ] | |
| EMPTY = "empty" | |
| CLASSES = MOVES + [EMPTY] | |
| CLASS_TO_IDX = {name: i for i, name in enumerate(CLASSES)} | |
| NUM_CLASSES = len(CLASSES) # 163 | |
| # Kazan checkpoint numbers on the scoresheet summary strips: always exactly | |
| # two digits (with leading zero), values 00-81, never an 'x'. | |
| KAZAN_CLASSES = [f"{v:02d}" for v in range(82)] + [EMPTY] | |