New to Claude Skills? Learn how to install them →

nvidia on GitHub

VLM Binary Classification Gap Analysis

OfficialFree

Identify false positives and negatives in VLM predictions.

by nvidia2.8k stars on nvidia/skills
2 views
Updated Aug 7, 2026
Get this skill

Free · Opens the source repo

What VLM Binary Classification Gap Analysis does

The VLM Binary Classification Gap Analysis skill is designed to assist developers and data scientists in evaluating the performance of Vision Language Models (VLM) on binary classification tasks. By analyzing the predictions generated by a VLM against the ground truth, this skill extracts critical insights into false positives (FP) and false negatives (FN). The output is structured in a way that facilitates further investigation and root cause analysis, making it a valuable tool for anyone working with VLMs in a production or research setting.

To use this skill, users invoke the vlm_bcq action within the TAO Toolkit data services container, providing paths to their predictions JSON file and specifying an output directory for the results. The skill processes the predictions, identifying discrepancies where the model's responses diverge from the expected ground truth. This is particularly useful for refining model performance and understanding failure cases that may arise during deployment.

The output consists of a JSONL file containing detailed information about each FP and FN case, along with a human-readable report summarizing the counts of these errors. This structured output can be utilized in subsequent stages of root cause analysis, driving improvements in model training and evaluation workflows. The skill is particularly relevant for teams engaged in developing and iterating on VLMs, as it provides actionable insights into model performance.

In summary, this skill is essential for anyone involved in the evaluation and enhancement of VLMs, enabling them to pinpoint specific areas of failure and refine their models accordingly.

When to use it

Use this skill when you need to analyze the performance of a VLM on binary classification tasks and extract detailed FP and FN cases for further analysis.

When not to use it

This skill is not suitable for tasks outside of binary classification evaluation or when the predictions JSON does not conform to the required format.

What you can build with it

Evaluating VLM Performance

After deploying a VLM, use this skill to analyze its predictions against ground truth data to identify areas of improvement.

Root Cause Analysis

Utilize the outputs from this skill in downstream RCCA stages to understand the reasons behind model failures and refine training.

Iterative Model Development

In an iterative development process, apply this skill regularly to assess the impact of changes made to the VLM and ensure consistent performance.

How to install VLM Binary Classification Gap Analysis

View source

1. Install with the skills CLI

npx skills add nvidia/skills/tao-analyze-gaps-vlm-bcq --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by nvidia

VLM Binary Classification Gap Analysis

Reads a VLM predictions JSON, compares each model response against ground truth, and writes FP/FN failure cases to a JSONL file with a summary report.

Purpose

After running a VLM on a binary yes/no evaluation task, the predictions need to be compared against ground truth to identify failure cases. This skill produces a structured list of FP (false positive) and FN (false negative) samples that downstream RCCA stages (e.g., cosmos generation, root cause analysis) consume to drive a DEFT iteration.

Usage

Invoke the vlm_bcq action inside the TAO Toolkit data services container with Hydra-style key=value overrides:

gap_analysis vlm_bcq \
  predictions_json=/path/to/results.json \
  results_dir=/path/to/output/gaps

Include videos_dir when video_id values in the predictions are relative paths:

gap_analysis vlm_bcq \
  predictions_json=/path/to/results.json \
  results_dir=/path/to/output/gaps \
  videos_dir=/path/to/videos/root

After the run, surface the FP/FN counts from kpi_gaps_report.txt and point downstream stages at kpi_gaps.jsonl.

Inputs

  • predictions_json: Path to predictions JSON file. Must be a JSON array where each item has video_id, response, and gt fields. response and gt are parsed with word-boundary matching — 'yes' or 'no' anywhere in the string is recognized. Samples where both or neither are present are skipped with a warning.
  • videos_dir (optional): Base directory for resolving relative video_id paths. If omitted, video_id values are used as absolute paths.

Predictions JSON format:

[
  {
    "video_id": "/path/to/video.mp4",
    "response": "Yes, there is a collision.",
    "gt": "B. No",
    "question": "Is there a collision?"
  }
]

Outputs

  • kpi_gaps.jsonl: One JSON object per line for each FP/FN case. Fields: video_id (absolute path), error_type (FP or FN), question, ground_truth, response.
  • kpi_gaps_report.txt: Human-readable table with total FP/FN counts.

If no gaps are found, no files are written and a message is logged.

Key Parameters

ParameterRequiredDescription
predictions_jsonYesPath to predictions JSON file
results_dirYesOutput directory; created if it does not exist
videos_dirNoBase directory for resolving relative video_id paths

Error Patterns

ErrorCauseFix
FileNotFoundErrorpredictions_json does not existCheck the path
ValueError: must be a JSON arrayPredictions file is not a listWrap predictions in [...]
ValueError: missing 'gt'/'response'/'video_id'A prediction item is missing a required fieldInspect and fix the predictions JSON
Samples silently skippedresponse or gt contains both or neither 'yes'/'no'Check logs for warnings; inspect those samples

Frequently asked questions about VLM Binary Classification Gap Analysis

Similar skills