| name | profile-imaging |
| description | Profile a medical-imaging dataset before any modelling decision is made — the acquisition grid, voxel spacing and orientation spread, the intensity domain, which label values are actually present, how much of the volume the target occupies, and how large the target is in millilitres — then gate that profile against the researcher's declared plan. Catches, at the point where it is still cheap, the dataset facts that otherwise surface after a training run: a "test set" that carries no ground truth, labels whose grid does not match their image, a stray label index, a target occupying a fraction of a percent while accuracy is planned as a metric, and acquisition heterogeneity nobody declared a resampling decision for. Emits a dataset-profile JSON and a deterministic gate that reads it (stdlib-only, so an audit travels with the JSON). It describes the data and audits the plan against it; it does not preprocess, split, or train.
|
| triggers | profile dataset, dataset profile, EDA, exploratory data analysis, explore the data, what does the data look like, imaging dataset, NIfTI, voxel spacing, slice thickness, orientation, intensity distribution, Hounsfield, class imbalance, foreground fraction, label sanity, empty label, label QC, dataset QC, data audit, before training, target volume, organ volume, is my test set labelled, research direction, where do I start |
| tools | Read, Write, Edit, Bash, Grep, Glob |
| model | inherit |
Profile-Imaging Skill
Purpose
A dataset decides more of a study than the architecture does, and it decides it first. Before
anything is preprocessed, split, or trained, a handful of facts are already true about the data, and
each one closes off or opens up a research plan:
- If the target occupies 0.4 % of the volume, accuracy is not a metric — predicting background
everywhere scores 99.6 %.
- If through-plane spacing runs 1.5–8 mm inside a single institution, resampling is not a default to
accept quietly; it is the most consequential preprocessing choice in the study, and it is also the
axis along which an external dataset will differ.
- If the directory named
imagesTs has no labels, it is not a test set, and the held-out set has to
come from somewhere else — better known before training than after.
- If the organ volume spans 56–502 mL when normal is roughly 100–250, the cohort contains disease
that a subgroup analysis should be pre-specified for, rather than discovered post hoc.
None of that requires a model, a GPU, or an engineer. It requires reading every file once and
writing down what is there. This skill does that, and then audits the plan against it.
It is the front door of the model-engineering lane:
profile-imaging (describe) → /design-study + /architecture-zoo (decide) →
/preprocess-imaging (plan the pipeline) → /model-scaffold (build) → /model-validation →
/model-evaluation.
When to use
- You have a dataset and a task, and need to know what the data will and will not support before
committing to a plan.
- You inherited a dataset and need its integrity established (labels intact, splits labelled,
label values as declared) before anyone trains on it.
- You are about to write a Methods section that describes the cohort and its acquisition.
When NOT to use
- Tabular / clinical variables →
/generate-codebook (data dictionary) and /clean-data.
- Designing the preprocessing pipeline and auditing it for data-stage leakage →
/preprocess-imaging (it consumes what this skill describes).
- Auditing the train/val/test split table →
/model-validation.
- Choosing an architecture →
/architecture-zoo. Building the repo → /model-scaffold.
- Held-out metrics, calibration, subgroup results → then .