1. AI segmentation of a cohort#
In this tutorial you auto-contour, for every patient in a head-and-neck cohort, the structures the Xerostomia (grade 2+) model is built from. VALIDATE picks the AI model for you, installs it, and runs it.
You need: a cohort folder with one subfolder per patient, each holding that patient’s CT (DICOM, NIfTI or NRRD). See Inputs.
Time: installing the AI model is a one-time download of 1–3 GB. How long the run takes depends on your hardware; it is much faster on a GPU.
Set up the analysis#
Open VALIDATE (see Getting started).
Under Start from, keep Data (DICOM/NIfTI) selected.
Next to Data, click Browse… and select your cohort folder.
In Model, select Xerostomia (grade 2+).
Check Output. It is filled in for you, as
analysis_Xerostomia (grade 2+)inside the cohort folder. Click Browse… to choose another folder.
NIfTI or NRRD scans?
For NIfTI or NRRD, also select a Plan info CSV with a Scan file column, giving each
patient’s scan file name (or a pattern such as *_CT.nrrd). DICOM folders need no CSV.
See Plan info CSV.
Install the AI model#
The Segment tab lists the AI models the model’s structures are made from, here CT_HN_SMIT. The dot next to it shows whether it is installed:
If it says Installed (green), skip to Run the AI model. If you installed it before in another folder, select Use existing install, click Browse… and select that folder.
To install it:
Select Install to:, click Browse… and choose a folder with a few GB free. You can reuse this folder for every analysis.
If the model’s maintainers gave you a download link for the weights, paste it in Weights URL. Otherwise leave it empty.
Click Install.
A progress bar shows while it downloads the model’s code and weights and sets up its own Python environment. This can take a while.
When it finishes, the dot turns green and says Installed, and Use existing install is selected with your install folder:
Run the AI model#
Under Device, select GPU to use an NVIDIA GPU or Apple silicon, or CPU. GPU falls back to the CPU if there is no GPU.
Optional: click Notify when done and enter your email address to get an email when the run ends. It contains the run’s status and where to find its files, but no patient data.
Click Run.
VALIDATE asks to save the settings. Click Save and continue.
While it runs, VALIDATE shows the AI model being applied and how many patients are done:
To stop early, click Stop. VALIDATE finishes the patient it is working on, then stops. Click Run again later to carry on: it asks whether to keep the patients already done or run them again.
When the run ends, the progress bar says Done with the number of patients:
Check the results#
Click View error log. If it is empty, every patient ran. Otherwise it lists each patient that failed and why. See Troubleshooting.
Click Generate summary. VALIDATE writes
segment_summary.csvin the analysis folder and opens it. It has one row per patient, AI model, output file and structure. See segment_summary.csv.Click View outputs to open the analysis folder. Each patient’s AI contours are in a subfolder named after the patient: an RTSTRUCT for DICOM data, NIfTI masks otherwise. Open them in your treatment planning system or viewer to review them.
Important
Review the AI contours before using them. VALIDATE doesn’t check them for you.
Next#
Click Next to go to the Model tab, and continue with 2. From AI segmentation to NTCP.