Datasets:
Add files using upload-large-folder tool
Browse files- README.md +134 -0
- checksums.txt +1 -0
- crops/ammo_sample2_r04_f005064.png +3 -0
- crops/ammo_sample2_r04_f006216.png +3 -0
- crops/ammo_sample2_r04_f006984.png +3 -0
- crops/ammo_sample2_r05_f002400.png +3 -0
- crops/friendly_chat_sample1_r07_f001092_row2.png +3 -0
- crops/friendly_chat_sample1_r08_f001080_row4.png +3 -0
- crops/friendly_chat_sample1_r08_f001176_row3.png +3 -0
- crops/friendly_chat_sample1_r10_f000720_row5.png +3 -0
- crops/friendly_chat_sample1_r12_f002016_row6.png +3 -0
- crops/friendly_chat_sample1_r13_f002472_row6.png +3 -0
- crops/friendly_chat_sample1_r14_f000912_row3.png +3 -0
- crops/friendly_chat_sample2_r01_f000492_row0.png +3 -0
- crops/friendly_chat_sample2_r03_f000480_row1.png +3 -0
- crops/friendly_chat_sample2_r03_f005964_row6.png +3 -0
- crops/friendly_chat_sample2_r04_f005244_row7.png +3 -0
- crops/friendly_chat_sample2_r04_f006252_row0.png +3 -0
- crops/friendly_chat_sample2_r04_f007116_row1.png +3 -0
- crops/friendly_chat_sample2_r04_f007164_row1.png +3 -0
- crops/friendly_chat_sample2_r05_f002316_row1.png +3 -0
- crops/friendly_chat_sample2_r06_f004908_row2.png +3 -0
- crops/friendly_chat_sample2_r08_f003696_row2.png +3 -0
- crops/friendly_chat_sample2_r09_f001392_row1.png +3 -0
- crops/friendly_chat_sample3_r04_f004668_row4.png +3 -0
- crops/hp_sample1_r14_f000156.png +3 -0
- crops/killfeed_sample1_r08_f004524_row2.png +3 -0
- crops/killfeed_sample1_r09_f002748_row4.png +3 -0
- crops/killfeed_sample1_r10_f004956_row3.png +3 -0
- crops/killfeed_sample1_r13_f000048_row0.png +3 -0
- crops/killfeed_sample1_r13_f002508_row1.png +3 -0
- crops/killfeed_sample1_r14_f002352_row1.png +3 -0
- crops/killfeed_sample2_r01_f000972_row3.png +3 -0
- crops/killfeed_sample2_r02_f006312_row2.png +3 -0
- crops/killfeed_sample2_r03_f003252_row3.png +3 -0
- crops/killfeed_sample2_r03_f006012_row4.png +3 -0
- crops/killfeed_sample2_r03_f006216_row3.png +3 -0
- crops/killfeed_sample2_r04_f003432_row0.png +3 -0
- crops/killfeed_sample2_r05_f002700_row1.png +3 -0
- crops/killfeed_sample2_r05_f003312_row4.png +3 -0
- crops/killfeed_sample2_r07_f002004_row1.png +3 -0
- crops/killfeed_sample2_r08_f003684_row4.png +3 -0
- crops/killfeed_sample2_r08_f005856_row1.png +3 -0
- crops/killfeed_sample2_r10_f001044_row0.png +3 -0
- crops/killfeed_sample3_r03_f001656_row0.png +3 -0
- crops/killfeed_sample3_r04_f000924_row1.png +3 -0
- crops/killfeed_sample3_r04_f006384_row3.png +3 -0
- crops/killfeed_sample3_r05_f001428_row3.png +3 -0
- crops/money_sample2_r04_f005652.png +3 -0
- crops/money_sample3_r04_f000552.png +3 -0
README.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- image-to-text
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- ocr
|
| 9 |
+
- cs2
|
| 10 |
+
- counter-strike
|
| 11 |
+
- hud
|
| 12 |
+
- video-games
|
| 13 |
+
- crnn-training
|
| 14 |
+
pretty_name: CS2 HUD OCR Crops
|
| 15 |
+
size_categories:
|
| 16 |
+
- 10K<n<100K
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
# CS2 HUD OCR Crops
|
| 20 |
+
|
| 21 |
+
Per-region HUD crops sliced from three Counter-Strike 2 match recordings,
|
| 22 |
+
labelled where possible from the demo file's `parse_ticks` state. Built
|
| 23 |
+
to train a specialist CRNN that replaces the EasyOCR killfeed reader
|
| 24 |
+
(currently ~6 s p95 on CPU) with a sub-30 ms specialist.
|
| 25 |
+
|
| 26 |
+
## Source
|
| 27 |
+
|
| 28 |
+
Three matches by the same POV player (`farouqqq`), recorded in CS2's
|
| 29 |
+
built-in DVR + the corresponding `.dem` files:
|
| 30 |
+
|
| 31 |
+
| sample | map | dem | rounds | resolution | fps |
|
| 32 |
+
|---------|----------|----------------|--------|-------------|-----|
|
| 33 |
+
| sample1 | Ancient | ancent.dem | 8 | 1280 × 1024 | 60 |
|
| 34 |
+
| sample2 | Dust 2 | dust_2.dem | 10 | 1280 × 1024 | 60 |
|
| 35 |
+
| sample3 | Overpass | overpass.dem | 9 | 1280 × 1024 | 60 |
|
| 36 |
+
|
| 37 |
+
Frames sampled at 5 fps. Per-region ROIs slice via the
|
| 38 |
+
[`hud_extractor`](https://github.com/bashiryounis/coach-api) package's
|
| 39 |
+
calibrated `hud_template.json`.
|
| 40 |
+
|
| 41 |
+
## Signals + label sources
|
| 42 |
+
|
| 43 |
+
| signal | label source | gate |
|
| 44 |
+
|-----------------|-------------------------------------------|---------------------------------------------------------------|
|
| 45 |
+
| `hp` | dem `health` (POV-filtered, alive only) | v_mask brightness + phash dedupe |
|
| 46 |
+
| `money` | dem `balance` | v_mask brightness + phash dedupe |
|
| 47 |
+
| `ammo` | dem `m_iClip1` (alive only) | v_mask brightness + phash dedupe |
|
| 48 |
+
| `timer` | tesserocr text (≥ 0.70 conf) — optional | v_mask brightness + phash dedupe |
|
| 49 |
+
| `killcam` | tesserocr binary (≥ 0.50 conf) — optional | v_mask + phash + ±5 s POV death window |
|
| 50 |
+
| `killfeed` | **unlabeled** in this v1 (use Colab GPU) | v_mask brightness + phash dedupe; one crop per row slot |
|
| 51 |
+
| `friendly_chat` | **unlabeled** in this v1 (use Colab GPU) | v_mask brightness + phash dedupe; one crop per row slot |
|
| 52 |
+
|
| 53 |
+
`killfeed` and `friendly_chat` are saved without text labels in this
|
| 54 |
+
release because the EasyOCR teacher (~600 ms / row on CPU) made a single
|
| 55 |
+
pass impractical. The crops are ready for a GPU-side labeling sweep
|
| 56 |
+
(EasyOCR `gpu=True` is ~10× faster on a single T4).
|
| 57 |
+
|
| 58 |
+
## File layout
|
| 59 |
+
|
| 60 |
+
```
|
| 61 |
+
dataset/cs2_ocr/
|
| 62 |
+
├── crops/ # PNG, one per labeled crop
|
| 63 |
+
│ ├── hp_sample1_r07_f000048.png
|
| 64 |
+
│ ├── money_sample2_r03_f000132.png
|
| 65 |
+
│ ├── killfeed_sample3_r05_f000240_row2.png
|
| 66 |
+
│ ├── friendly_chat_sample1_r10_f000600_row3.png
|
| 67 |
+
│ └── ...
|
| 68 |
+
├── train.parquet
|
| 69 |
+
├── val.parquet
|
| 70 |
+
├── test.parquet
|
| 71 |
+
└── manifest.json
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
Split key = `(sample, round)`, so no frame leak across splits.
|
| 75 |
+
|
| 76 |
+
| split | composition |
|
| 77 |
+
|-------|-----------------------------------------------------------------------------------------------------------|
|
| 78 |
+
| train | sample1 r07-r10 · sample2 r01-r07 · sample3 r01-r06 |
|
| 79 |
+
| val | sample1 r11 · sample2 r08 · sample3 r07 |
|
| 80 |
+
| test | sample1 r12-r14 · sample2 r09-r10 · sample3 r08-r09 |
|
| 81 |
+
|
| 82 |
+
## Parquet schema
|
| 83 |
+
|
| 84 |
+
| column | type | notes |
|
| 85 |
+
|-----------------|--------|------------------------------------------------------------------------------------|
|
| 86 |
+
| `crop_path` | str | relative to dataset root, e.g. `crops/hp_sample1_r07_f000048.png` |
|
| 87 |
+
| `signal` | str | one of `hp` `money` `ammo` `timer` `killcam` `killfeed` `friendly_chat` |
|
| 88 |
+
| `label` | str | ground-truth string; `""` for unlabeled rows |
|
| 89 |
+
| `teacher_engine`| str | `dem` / `tesserocr` / `easyocr` / `unlabeled` |
|
| 90 |
+
| `teacher_conf` | float | 0-1; `1.0` for `dem`, `0.0` for `unlabeled` |
|
| 91 |
+
| `dem_verified` | bool | `True` iff label came from the dem (the dem is ground truth) |
|
| 92 |
+
| `clip_id` | str | source clip, e.g. `sample1_r07` |
|
| 93 |
+
| `frame_idx` | int | original frame ordinal inside the clip |
|
| 94 |
+
| `width_px` | int | crop width in pixels |
|
| 95 |
+
| `height_px` | int | crop height in pixels |
|
| 96 |
+
|
| 97 |
+
## How to load
|
| 98 |
+
|
| 99 |
+
```python
|
| 100 |
+
from datasets import load_dataset
|
| 101 |
+
ds = load_dataset("ybashir/CS2-HUD-OCR-Crops")
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
To get an actual image rather than a path you'll need to join the
|
| 105 |
+
`crop_path` column with the downloaded `crops/` directory.
|
| 106 |
+
|
| 107 |
+
## Build details
|
| 108 |
+
|
| 109 |
+
- Frame extractor + dem alignment + ROI slicer:
|
| 110 |
+
[`scripts/build_crnn_dataset.py`](https://github.com/bashiryounis/coach-api)
|
| 111 |
+
- Clip cutter (per-round mp4s):
|
| 112 |
+
[`scripts/cut_clips.py`](https://github.com/bashiryounis/coach-api)
|
| 113 |
+
- HUD template (calibrated ROIs + row slots):
|
| 114 |
+
[`hud_extractor/hud_extractor/config/hud_template.json`](https://github.com/bashiryounis/coach-api)
|
| 115 |
+
|
| 116 |
+
## Known limitations
|
| 117 |
+
|
| 118 |
+
- POV-only labels. The `dem` ground truth applies to `farouqqq`'s state;
|
| 119 |
+
other players' HUDs are not in scope.
|
| 120 |
+
- `sample3` round 1 begins before the dem started recording. Its
|
| 121 |
+
`dem_freeze_s` is negative — the dem-truth labels begin partway into
|
| 122 |
+
the clip.
|
| 123 |
+
- `parse_event` is broken on these dem files (`EntityNotFound` across
|
| 124 |
+
every version of `demoparser2`), so `player_death` correlations for
|
| 125 |
+
killfeed verification are not available. EasyOCR remains the only
|
| 126 |
+
signal source for killfeed/chat.
|
| 127 |
+
- Re-encoded clips (`-c libx264 -crf 20`) lose a few decibels vs. the
|
| 128 |
+
source DVR; not visible at HUD resolution but flagged for transparency.
|
| 129 |
+
|
| 130 |
+
## License
|
| 131 |
+
|
| 132 |
+
CC-BY-4.0. The underlying gameplay footage is captured from a personal
|
| 133 |
+
Counter-Strike 2 session (Valve Corp.) — the dataset is published for
|
| 134 |
+
non-commercial research on HUD-region OCR distillation.
|
checksums.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
|
crops/ammo_sample2_r04_f005064.png
ADDED
|
Git LFS Details
|
crops/ammo_sample2_r04_f006216.png
ADDED
|
Git LFS Details
|
crops/ammo_sample2_r04_f006984.png
ADDED
|
Git LFS Details
|
crops/ammo_sample2_r05_f002400.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample1_r07_f001092_row2.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample1_r08_f001080_row4.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample1_r08_f001176_row3.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample1_r10_f000720_row5.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample1_r12_f002016_row6.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample1_r13_f002472_row6.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample1_r14_f000912_row3.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample2_r01_f000492_row0.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample2_r03_f000480_row1.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample2_r03_f005964_row6.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample2_r04_f005244_row7.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample2_r04_f006252_row0.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample2_r04_f007116_row1.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample2_r04_f007164_row1.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample2_r05_f002316_row1.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample2_r06_f004908_row2.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample2_r08_f003696_row2.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample2_r09_f001392_row1.png
ADDED
|
Git LFS Details
|
crops/friendly_chat_sample3_r04_f004668_row4.png
ADDED
|
Git LFS Details
|
crops/hp_sample1_r14_f000156.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample1_r08_f004524_row2.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample1_r09_f002748_row4.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample1_r10_f004956_row3.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample1_r13_f000048_row0.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample1_r13_f002508_row1.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample1_r14_f002352_row1.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r01_f000972_row3.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r02_f006312_row2.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r03_f003252_row3.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r03_f006012_row4.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r03_f006216_row3.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r04_f003432_row0.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r05_f002700_row1.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r05_f003312_row4.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r07_f002004_row1.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r08_f003684_row4.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r08_f005856_row1.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample2_r10_f001044_row0.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample3_r03_f001656_row0.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample3_r04_f000924_row1.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample3_r04_f006384_row3.png
ADDED
|
Git LFS Details
|
crops/killfeed_sample3_r05_f001428_row3.png
ADDED
|
Git LFS Details
|
crops/money_sample2_r04_f005652.png
ADDED
|
Git LFS Details
|
crops/money_sample3_r04_f000552.png
ADDED
|
Git LFS Details
|