data-validation
Inspect class membership and ground-truth/detection-result file-set intersections for mAP-style inputs with safe report-first repair guidance.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- data-validation
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Inspect class membership and ground-truth/detection-result file-set intersections for mAP-style inputs with safe report-first repair guidance.
- disable-model-invocation
- true
02 资源文件 2
- 参考文档references/troubleshooting.md7.0 KB
- 参考文档references/workflows.md6.3 KB
03 SKILL.md 正文
data-validation
Use this sub-skill when a future agent must decide whether mAP-style ground-truth and detection-result folders are ready for evaluation, find which files contain a class, or safely repair mismatched .txt file sets before running metrics.
Route here for
- Checking that
ground-truth/anddetection-results/contain top-level.txtfiles with matching filenames. - Diagnosing evaluator errors that imply a missing ground-truth or detection-result pair.
- Finding every GT and DR file whose first token on any annotation line equals a requested class name.
- Reporting GT-only and DR-only files before evaluation.
- Moving non-intersecting files into an explicit backup folder after a report-only dry run and explicit confirmation.
Do not handle here
- Computing AP, mAP, IoU matching, ignored classes, custom IoU thresholds, plots, animations, or evaluator output files: use
../evaluation/SKILL.md. - Converting PASCAL VOC XML, YOLO, darkflow JSON, darknet result text, or keras-yolo3 annotations into mAP text files: use
../conversion/SKILL.md. - Deep validation of bounding-box coordinates, confidence values, optional
difficultbehavior, or metric semantics beyond the file-set and first-token class checks owned here.
Evidence-backed assumptions
- The evaluator expects one ground-truth
.txtfile and one detection-result.txtfile per image, with matching filenames such asimage_1.txton both sides. - Ground-truth lines start with the class name and then contain box coordinates plus optional
difficult. - Detection-result lines start with the class name, then confidence and box coordinates.
- The legacy class finder searched both folders for a class by comparing the first whitespace-separated token of each line.
- The legacy intersection helper moved non-intersecting files immediately; this generated skill uses a bundled report-first helper instead.
First checks
-
Identify the actual GT and DR folders the user wants evaluated. Do not assume implicit repository-relative folders; pass explicit paths to the helper.
-
Run a non-mutating readiness report:
python sub-skills/data-validation/scripts/check_map_inputs.py \ --gt-dir /path/to/ground-truth \ --dr-dir /path/to/detection-results -
If the user asks about a class, add
--class-name CLASSand read both GT and DR results. A class absent from both folders usually means the class label is misspelled, conversion mapped it differently, or the wrong folders were selected. -
If the report shows GT-only or DR-only files, inspect the listed basenames before moving anything. Same counts can still be invalid when basenames differ.
-
Repair only when the user accepts moving the non-intersecting
.txtfiles out of evaluator inputs. Use a backup root outside the GT/DR folders and require explicit confirmation:python sub-skills/data-validation/scripts/check_map_inputs.py \ --gt-dir /path/to/ground-truth \ --dr-dir /path/to/detection-results \ --move-extra-to /path/to/map-input-backup \ --confirm-move -
Rerun the report after any repair. Route to evaluation only when the helper reports matching file sets and non-empty intersections.
Reference map
- Read
references/workflows.mdfor step-by-step class lookup, file-set readiness, dry-run interpretation, and explicit backup repair workflows. - Read
references/troubleshooting.mdfor empty folders, same-count/different-basename failures, non-intersecting sets, missing classes, unsafe legacy moves, wrong filenames, and backup conflicts. - Run
scripts/check_map_inputs.py --helpwhen you need exact helper options and exit-code behavior.
Safety rules
- The bundled helper is report-only by default. Supplying
--move-extra-towithout--confirm-moveprints a plan but still does not move files. - Never delete GT or DR files as a repair step. The only bundled repair moves non-intersecting
.txtfiles to a named backup root. - Do not move files when the GT/DR intersection is empty; that usually means wrong paths, wrong extensions, or incompatible naming rather than a safe partial mismatch.
- Keep conversion fixes in the conversion sub-skill and metric/debug interpretation in the evaluation sub-skill so this sub-skill stays focused on class lookup and file-set intersection readiness.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.