feat: add new arrows model
Browse files- README.md +32 -36
- arrows.safetensors +3 -0
- config.json +50 -14
README.md
CHANGED
|
@@ -57,6 +57,23 @@ model-index:
|
|
| 57 |
value: 0.8347
|
| 58 |
name: F1 Score (Macro)
|
| 59 |
verified: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
pipeline_tag: image-classification
|
| 61 |
---
|
| 62 |
|
|
@@ -129,49 +146,28 @@ The pieces model classifies chess square images into 13 classes: 6 white pieces
|
|
| 129 |
|
| 130 |
### ↗ Arrows Model (`arrows.safetensors`)
|
| 131 |
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
<!---->
|
| 135 |
-
|
| 136 |
-
<!-- **Overview:** -->
|
| 137 |
-
|
| 138 |
-
<!---->
|
| 139 |
-
|
| 140 |
-
<!-- The arrows model classifies chess square images into 49 classes representing different arrow overlay patterns: 20 arrow heads (N, NE, E, SE, S, SW, W, NW, and intermediate directions), 12 arrow tails, 8 middle segments, 4 corner pieces, and empty squares (xx). This model enables detection and reconstruction of arrow annotations commonly used in chess analysis interfaces. -->
|
| 141 |
-
|
| 142 |
-
<!---->
|
| 143 |
-
|
| 144 |
-
<!-- **Training:** -->
|
| 145 |
-
|
| 146 |
-
<!---->
|
| 147 |
-
|
| 148 |
-
<!-- - **Architecture**: SimpleCNN (156k parameters, same as pieces model) -->
|
| 149 |
-
|
| 150 |
-
<!-- - **Input**: 32×32px RGB square images -->
|
| 151 |
-
|
| 152 |
-
<!-- - **Data**: ~93,000 synthetic images from 55 board styles × arrow overlays -->
|
| 153 |
-
|
| 154 |
-
<!-- - **Augmentation**: Conservative augmentation with highlight overlays (25%), random crops, and minimal color jitter/noise. No horizontal flips or rotation to preserve arrow directionality -->
|
| 155 |
-
|
| 156 |
-
<!-- - **Optimizer**: AdamW (lr=0.0003, weight_decay=0.0003) -->
|
| 157 |
-
|
| 158 |
-
<!-- - **Training**: 200 epochs, batch size 64 -->
|
| 159 |
-
|
| 160 |
-
<!---->
|
| 161 |
|
| 162 |
-
|
| 163 |
|
| 164 |
-
|
| 165 |
|
| 166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
|
| 168 |
-
|
| 169 |
|
| 170 |
-
|
|
|
|
|
|
|
| 171 |
|
| 172 |
-
|
| 173 |
|
| 174 |
-
|
| 175 |
|
| 176 |
## Training Your Own Model
|
| 177 |
|
|
|
|
| 57 |
value: 0.8347
|
| 58 |
name: F1 Score (Macro)
|
| 59 |
verified: false
|
| 60 |
+
- name: chess-cv-arrows
|
| 61 |
+
results:
|
| 62 |
+
- task:
|
| 63 |
+
type: image-classification
|
| 64 |
+
name: Image Classification
|
| 65 |
+
dataset:
|
| 66 |
+
name: Chess CV Arrows Test Dataset
|
| 67 |
+
type: chess-cv-arrows-test
|
| 68 |
+
metrics:
|
| 69 |
+
- type: accuracy
|
| 70 |
+
value: 0.9997
|
| 71 |
+
name: Accuracy
|
| 72 |
+
verified: false
|
| 73 |
+
- type: f1
|
| 74 |
+
value: 0.9997
|
| 75 |
+
name: F1 Score (Macro)
|
| 76 |
+
verified: false
|
| 77 |
pipeline_tag: image-classification
|
| 78 |
---
|
| 79 |
|
|
|
|
| 146 |
|
| 147 |
### ↗ Arrows Model (`arrows.safetensors`)
|
| 148 |
|
| 149 |
+
**Overview:**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
+
The arrows model classifies chess square images into 49 classes representing different arrow overlay patterns: 20 arrow heads, 12 arrow tails, 8 middle segments (for straight and diagonal arrows), 4 corner pieces (for knight-move arrows), and empty squares (xx). This model enables detection and reconstruction of arrow annotations commonly used in chess analysis interfaces. The NSEW naming convention (North/South/East/West) indicates arrow orientation and direction.
|
| 152 |
|
| 153 |
+
**Training:**
|
| 154 |
|
| 155 |
+
- **Architecture**: SimpleCNN (156k parameters, same as pieces model)
|
| 156 |
+
- **Input**: 32×32px RGB square images
|
| 157 |
+
- **Data**: ~4.5M synthetic images from 55 board styles × arrow overlays (~3.14M train, ~672K val, ~672K test)
|
| 158 |
+
- **Augmentation**: Conservative augmentation with highlight overlays (25%), random crops, and minimal color jitter/noise. No horizontal flips to preserve arrow directionality
|
| 159 |
+
- **Optimizer**: AdamW (lr=0.0005, weight_decay=0.00005)
|
| 160 |
+
- **Training**: 20 epochs, batch size 128
|
| 161 |
|
| 162 |
+
**Performance:**
|
| 163 |
|
| 164 |
+
| Dataset | Accuracy | F1-Score (Macro) |
|
| 165 |
+
| --------------------- | -------- | ---------------- |
|
| 166 |
+
| Test Data (synthetic) | 99.97% | 99.97% |
|
| 167 |
|
| 168 |
+
The arrows model is optimized for detecting directional annotations while maintaining spatial consistency across the board.
|
| 169 |
|
| 170 |
+
**Limitation:** Classification accuracy degrades when multiple arrow components overlap in a single square.
|
| 171 |
|
| 172 |
## Training Your Own Model
|
| 173 |
|
arrows.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b575e3d87c698b04c1cbe097179c9de3f7f37568e78570367eea549196d1218
|
| 3 |
+
size 645164
|
config.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
| 2 |
-
"model_id": "
|
| 3 |
"architecture": "SimpleCNN",
|
| 4 |
-
"num_classes":
|
| 5 |
"input_size": [
|
| 6 |
32,
|
| 7 |
32,
|
|
@@ -11,18 +11,54 @@
|
|
| 11 |
"framework": "mlx",
|
| 12 |
"task": "image-classification",
|
| 13 |
"classes": [
|
| 14 |
-
"
|
| 15 |
-
"
|
| 16 |
-
"
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
"
|
| 21 |
-
"
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
"xx"
|
| 27 |
]
|
| 28 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"model_id": "arrows",
|
| 3 |
"architecture": "SimpleCNN",
|
| 4 |
+
"num_classes": 49,
|
| 5 |
"input_size": [
|
| 6 |
32,
|
| 7 |
32,
|
|
|
|
| 11 |
"framework": "mlx",
|
| 12 |
"task": "image-classification",
|
| 13 |
"classes": [
|
| 14 |
+
"corner-E-S",
|
| 15 |
+
"corner-N-E",
|
| 16 |
+
"corner-S-W",
|
| 17 |
+
"corner-W-N",
|
| 18 |
+
"head-E",
|
| 19 |
+
"head-ENE",
|
| 20 |
+
"head-ESE",
|
| 21 |
+
"head-N",
|
| 22 |
+
"head-NE",
|
| 23 |
+
"head-NNE",
|
| 24 |
+
"head-NNW",
|
| 25 |
+
"head-NW",
|
| 26 |
+
"head-S",
|
| 27 |
+
"head-SE",
|
| 28 |
+
"head-SSE",
|
| 29 |
+
"head-SSW",
|
| 30 |
+
"head-SW",
|
| 31 |
+
"head-W",
|
| 32 |
+
"head-WNW",
|
| 33 |
+
"head-WSW",
|
| 34 |
+
"middle-E-NNE",
|
| 35 |
+
"middle-E-SSE",
|
| 36 |
+
"middle-E-W",
|
| 37 |
+
"middle-N-ENE",
|
| 38 |
+
"middle-N-S",
|
| 39 |
+
"middle-N-WNW",
|
| 40 |
+
"middle-S-ESE",
|
| 41 |
+
"middle-S-WSW",
|
| 42 |
+
"middle-SE-NW",
|
| 43 |
+
"middle-SW-NE",
|
| 44 |
+
"middle-W-NNW",
|
| 45 |
+
"middle-W-SSW",
|
| 46 |
+
"tail-E",
|
| 47 |
+
"tail-ENE",
|
| 48 |
+
"tail-ESE",
|
| 49 |
+
"tail-N",
|
| 50 |
+
"tail-NE",
|
| 51 |
+
"tail-NNE",
|
| 52 |
+
"tail-NNW",
|
| 53 |
+
"tail-NW",
|
| 54 |
+
"tail-S",
|
| 55 |
+
"tail-SE",
|
| 56 |
+
"tail-SSE",
|
| 57 |
+
"tail-SSW",
|
| 58 |
+
"tail-SW",
|
| 59 |
+
"tail-W",
|
| 60 |
+
"tail-WNW",
|
| 61 |
+
"tail-WSW",
|
| 62 |
"xx"
|
| 63 |
]
|
| 64 |
}
|