ImageNetV2 Classification Accuracy Evaluation
Use this skill when sampled ImageNetV2-style records need top-1/top-5 metrics or an accuracy drop relative to an original validation metric.
Inputs
- Sample JSON with records containing
labeland rankedpredictions. - Optional original accuracy baseline.
Outputs
top1,top5, sample count, and optional drop.
Workflow
- Load sampled records.
- Count whether the true label is ranked first for top-1.
- Count whether the true label appears in the first five predictions for top-5.
- Compute drops as
original_accuracy - new_accuracy.
Validation
Run python scripts/evaluate_accuracy.py tests/fixtures/sample.json --original-top1 0.75 --output /tmp/metrics.json.
Limitations
This skill consumes precomputed predictions; it does not run a vision model.