executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
pytorch-fidUse pytorch-fid to compute Frechet Inception Distance for image directories or saved activation statistics, precompute .npz stats, validate inputs, and troubleshoot PyTorch Inception FID workflows.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this repo skill when a task involves pytorch-fid, the pytorch_fid
Python package, Frechet Inception Distance (FID), image dataset quality
comparison, GAN or diffusion sample evaluation, Inception feature dimensions, or
.npz activation-statistics files produced by this package.
pytorch-fidpytorch_fidpytorch-fidpython -m pytorch_fidpython scripts/check_pytorch_fid_env.py
Add --json when a machine-readable report is needed.references/repo-provenance.md.references/repo-routing-metadata.json.references/troubleshooting.md.Minimal import smoke:
from pytorch_fid.fid_score import calculate_fid_given_paths
from pytorch_fid.inception import InceptionV3
The import smoke must not construct InceptionV3 unless a model download/cache
check is explicitly allowed. The bundled scripts avoid model construction.
Read this skill when the user asks to:
.npz statistics file;pytorch_fid.fid_score APIs from Python;--dims values 64, 192, 768, or 2048;.npz files are compatible before running;Avoid this skill when the task is only generic image preprocessing, generic PyTorch model training, TensorFlow FID code, CLIP-based image metrics, or repo maintenance unrelated to using the packaged FID workflows.
Use the bundled references instead of returning long inline explanations:
references/cli-reference.mdreferences/api-reference.md.npz data contract:
references/data-formats.mdreferences/workflows.mdreferences/troubleshooting.mdreferences/repo-provenance.mdUse bundled scripts for safe checks:
scripts/check_pytorch_fid_env.py: import,
package metadata, CLI help, torch/torchvision, and optional CUDA availability.scripts/validate_fid_inputs.py: validate two
FID input paths as image directories or .npz statistics files.scripts/inspect_stats_npz.py: summarize saved
statistics files and check their mu/sigma arrays..npz file containing saved activation statistics. If both are directories,
the package computes statistics for both in the same run.python scripts/validate_fid_inputs.py INPUT_A INPUT_B --expected-dims 2048
Omit --expected-dims when the intended feature dimension is not known yet.2048; lower dimensions (64,
192, 768) are faster but not directly comparable to 2048 scores.--device cuda:0 only
after verifying CUDA availability; reduce --batch-size for memory errors.python -m pytorch_fid PATH_A PATH_B --dims 2048 --batch-size 50
python -m pytorch_fid --save-stats DATASET_DIR reference_stats.npz
python -m pytorch_fid GENERATED_DIR reference_stats.npz --dims 2048
references/api-reference.md and keep path,
dimension, and device checks explicit in the calling code.bmp, jpg, jpeg, pgm, png, ppm,
tif, tiff, and webp; use lowercase suffixes for reliable source
matching across platforms.mu and sigma arrays; sigma must be a
square covariance matrix whose side length matches mu length.numpy<2 to avoid ABI warnings or import failures.scripts/check_pytorch_fid_env.py,
then read references/troubleshooting.md..npz keys, non-finite stats, or
dimension mismatches: run
scripts/validate_fid_inputs.py.scripts/inspect_stats_npz.py.