Datasets¶
LION trains and tests on public CT datasets, downloaded and prepared once on your machine. Each has its own page: what it is, how to get it and prepare it, and how LION uses it. The tutorials and example scripts use LIDC-IDRI.
Dataset |
What it is |
In LION |
|---|---|---|
Clinical lung CT of 1010 patients, with annotated nodules. LION simulates the measurements from the images. |
|
|
Measured fan-beam CT of 5,000 slices of 109 objects, in three modes (low dose, high dose, beam hardening). |
|
|
Cone-beam micro-CT of 42 walnuts. |
download only, for now |
Where LION looks for data¶
LION finds the data in the folder named by LION_DATA_PATH: set it once,
e.g. in your ~/.bashrc,
export LION_DATA_PATH=/path/to/datasets
Downloads go to raw/ inside it, and the prepared data that LION reads to
processed/, one folder per dataset:
LION_DATA_PATH/
├── raw/
│ ├── LIDC-IDRI/
│ ├── 2detect/
│ └── walnuts/
└── processed/
├── LIDC-IDRI/
└── 2detect/
Saved models record their data’s paths relative to LION_DATA_PATH, so a
model trained on one machine finds its data on another.
Note
At CIA (DAMTP, Cambridge), the datasets are ready:
export LION_DATA_PATH=/store/cia-lion/datasets.
Using the data¶
Mostly through an experiment, which fixes the geometry, the noise and the splits of a problem and makes the datasets (Data and experiments):
from LION.experiments import ct_experiments
experiment = ct_experiments.LowDoseCTRecon() # LIDC-IDRI
# experiment = ct_experiments.clinicalCTRecon(dataset="2DeteCT") # measured
training = experiment.get_dataset("train") # (sinogram, image) pairs
The loaders also work on their own, with their own parameters (each dataset’s
page). Any torch Dataset of (measurements, target) pairs trains with
LION; a LIONDataset is also recorded with the model.
A new dataset¶
A dataset joins LION with a loader deriving from LIONDataset (in
LION/data_loaders), its download and preparation scripts (in
LION/data_loaders/<dataset>/), and a page here, in docs/datasets/,
listed above. The developer guide says what the loader
needs; Extending LION writes one.