Individual skill
evo-template-matching-counter
Counts occurrences of template objects (coins, enemies, turtles) in grayscale keyframe images using OpenCV matchTemplate with TM_CCOEFF_NORMED and Non-Maximum Suppression, then aggregates results into a CSV file.
tasks-evolved/mario-coin-counting/environment/skills/evo-template-matching-counter/SKILL.md
Source commit 84ca182da055fafb6453dcec4a6defdbbfd987c1
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Local scripts
- Last checked
- Nov 6, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 97
- Repository last updated
- Sep 10, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- agent-skills Repository topic
- ai-agents Repository topic
- llm-agents Repository topic
- open-world Repository topic
- self-evolving-agents Repository topic
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 2,582 bytesSKILL.mdcore · 2,582 bytesscripts/counter_utils.pyruns · 5,709 bytes
Read excerpt
# evo-template-matching-counter
## Overview
Counts game sprites (coins, enemies, turtles) in grayscale keyframe images using OpenCV template matching with NMS deduplication, outputs results to CSV.
## Key Concepts
- Uses `cv2.TM_CCOEFF_NORMED` - normalized correlation coefficient, best for rigid 2D pixel art
- Default threshold: 0.8 (optimal for Super Mario sprites with MP4 compression artifacts)
- Non-Maximum Suppression (NMS) with IoU overlap threshold of 0.3 to deduplicate detections
- Both frame and template MUST be grayscale (single channel) for matching
- `np.where(result >= threshold)` returns (y_coords, x_coords) - row/column order
- Template must be smaller than frame in both dimensions
- CSV output columns: frame_id (full path like /root/keyframes_001.png), coins, enemies, turtles