Prefer "no detection / unknown" over a wrong card. The tracker is only useful if it stops hallucinating.
Why the Old Approach Failed
The previous whole-frame card classifier was the wrong visual task. In normal live gameplay, opponent card art and names are never visible. The only visible signals are:
Unit spawns on the arena
Spell/effect animations
Building placements
This rewrite detects card-play events from spawn/effect evidence, not by classifying random battlefield frames.
Architecture
Emulator Capture (Win32 API / mss)
|
v
Battle Gater (detect battle vs lobby, compute ROIs)
|
v
Event Detector (temporal differencing, suppress persistent motion)
|
v
Evidence Model (YOLO unit detector + heuristic spell detectors)
|
v
Card Resolver (unit->card mapping, multi-unit rules, ambiguity->UNKNOWN)
|
v
Elixir Tracker + Deck Tracker