Inference evaluation

From lza6/Armor-piercing-system-prompts · View interactive version

Inference evaluation is an AI agent skill from the GitHub repository lza6/Armor-piercing-system-prompts. Run nnU-Net v2 prediction from dataset/results or explicit model folders, cascades, TTA/tiling/device/process controls, ensembling, postprocessing, evaluation, best-configuration selection, model sharing, and inference troubleshooting.

How to use this skill

Skill file

nnU-Net v2 Inference and Evaluation

Use this sub-skill after a trained, installed, exported, downloaded, or otherwise available nnU-Net v2 model exists and the task is to generate predictions, compare configurations, ensemble outputs, evaluate segmentations, apply postprocessing, or move models between environments.

Route here for

Do not handle here

Fast Path

  1. Confirm the model exists and matches the input dataset: trained result folder with dataset.json, plans.json, and requested fold_* checkpoints, or an explicit model folder with the same files.
  2. Check inference image filenames before running expensive prediction:

```bash

python sub-skills/inference-evaluation/scripts/check_inference_inputs.py INPUT_FOLDER MODEL_OR_DATASET_JSON

```

  1. Use nnUNetv2_predict when the model is in nnUNet_results:

```bash

nnUNetv2_predict -i INPUT_FOLDER -o OUTPUT_FOLDER -d DATASET001_Example -c 3d_fullres -f 0 1 2 3 4

```

  1. Use nnUNetv2_predict_from_modelfolder when the model folder is explicit:

```bash

nnUNetv2_predict_from_modelfolder -i INPUT_FOLDER -o OUTPUT_FOLDER -m MODEL_FOLDER -f 0 1 2 3 4

```

  1. Add --save_probabilities when predictions will be ensembled; run nnUNetv2_ensemble, then apply postprocessing if a postprocessing.pkl was selected.
  2. Evaluate predictions with nnUNetv2_evaluate_folder when dataset.json and plans.json are available, or nnUNetv2_evaluate_simple for label-list evaluation.

Bundled References

Bundled Helper

check_inference_inputs.py validates input-folder case/channel naming against dataset.json without loading images or importing nnU-Net. It accepts either a dataset.json path or a model/results folder containing dataset.json.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.