wenmin-wu/ds-skills/separate-pos-neg-dice-tracking
Claude Code and agent skill by wenmin-wu/ds-skills
- community
Checking that the SKILL.md file is still in the repository.
Track dice score separately for positive (mask-present) and negative (empty-mask) images to avoid division distortion
Install
npx vskill@latest install wenmin-wu/ds-skills/separate-pos-neg-dice-trackingSKILL.md
The same SKILL.md was published earlier as wenmin-wu/ds-skills/separate-pos-neg-dice-tracking.
Overview
Standard dice metric breaks on empty masks: 2|A∩B|/(|A|+|B|) = 0/0. Most datasets hack around this by adding a small epsilon, which distorts scores for negative images. A cleaner approach: track dice separately for positive and negative cases. For negative images, dice is simply 1 if the prediction is also empty, else 0. This gives interpretable per-category scores and reveals whether the model is failing on positives or leaking false positives on negatives.
Quick Start
Workflow
- Binarize probability map with threshold
- Split batch by ground-truth mask sum: zero → negative, positive → positive
- For negatives, dice = 1 iff prediction sum is also zero (perfect empty prediction)
- For positives, compute standard dice
- Report both aggregates separately in logs — watch them diverge to diagnose failure modes
Key Decisions
- Negative definition: Ground-truth sum == 0 (no mask pixels). Different from "negative predictions".
- Per-image vs per-batch: Compute per-image to avoid one large positive mask dominating the score.
- Actionable signal: If
dice_negdrops, model is hallucinating masks on healthy images — add a classification gate. Ifdice_posdrops, improve segmentation directly. - vs. epsilon smoothing: Epsilon hides the failure mode by giving fake dice=1 to empty pairs. Split tracking exposes it.
References
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/cv/separate-pos-neg-dice-tracking/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/wenmin-wu/ds-skills/separate-pos-neg-dice-tracking)