This document tracks planned improvements and known issues for future development.
Status: Blocking all CV detection accuracy improvements
Related: CV_INVESTIGATION_REPORT.md, DETECTION_ACCURACY_REPORT.md
Current templates are static PNG assets that look completely different from in-game rendered icons:
| Aspect | Current Templates | In-Game Icons |
|---|---|---|
| Border | Cyan/teal | Rarity-colored (orange, purple, gold, etc.) |
| Overlays | None | Stack count overlays (x2, x3, etc.) |
| Rendering | Clean vector graphics | Compressed, aliased game rendering |
| Max Similarity | β | 25-30% achievable |
The CV detection system requires 45%+ similarity to match items. With templates maxing out at 25-30% similarity, no amount of threshold tuning can fix this.
- Accuracy: 0% across all test images
- F1 Score: 0
- Root Cause: Templates don't visually match what the game actually renders
Replace static templates with templates generated from actual game screenshot crops:
-
Use existing training data at
data/training-data/crops/- ~100+ validated samples from actual gameplay
- Already has item labels and quality ratings
-
Template generation approach:
- For each item with 3+ training samples:
- Load all validated crops
- Resize to common size (64x64)
- Average pixel values OR use best quality sample
- Fall back to original templates for items without samples
- For each item with 3+ training samples:
-
Alternative: Capture new templates directly from game with correct rendering
src/images/items/*.pngβ Current static templatesdata/training-data/crops/β Source for new templatesscripts/cv-benchmark.jsβ Validation after fix
Priority: High (after template fix)
Verified calibrations:
- β 1920x1080 β Hand-checked and fixed
- β 2560x1440 β Verified
Needs verification:
β οΈ 1280x720 (720p)β οΈ 1280x800 (Steam Deck)β οΈ 1600x900 (900p)
Consider implementing auto-calibration using hotbar border detection.
Priority: Medium
Current format lists each item instance separately, but game UI stacks items:
// Current (expanded)
"items": ["Wrench", "Wrench", "Ice Crystal", ...]
// Game UI (stacked)
[Wrench x2] [Ice Crystal x1] ...This causes slot position mismatches in benchmarks.
Once templates are fixed, apply these improvements:
-
Enable experimental empty detection methods
useHistogramβ Few colors = emptyuseCenterEdgeβ Uniform center = empty
-
Correct rarity threshold logic
- Common items should be more lenient (many look similar)
- Legendary items should be stricter (unique visuals)
-
Add similarity floor check
- Reject matches below absolute minimum (0.35)
-
OCR accuracy improvements
- Add character whitelist for stack counts (
0123456789x)
- Add character whitelist for stack counts (
After template replacement is complete:
| Metric | Current | Target |
|---|---|---|
| F1 Score | 0% | >85% |
| Precision | 0% | >85% |
| Recall | 0% | >80% |
| False Positives | N/A | <2% |
| Match Rate | 0% | >85% |
- CV_INVESTIGATION_REPORT.md β Initial root cause analysis (Jan 25, 2026)
- DETECTION_ACCURACY_REPORT.md β Detailed investigation with tuning recommendations (Jan 31, 2026)
Last updated: January 31, 2026