CIL-Demos is a collection of jupyter notebooks, designed to introduce you to the Core Imaging Library (CIL).
The demos can be found in the demos folder, and the README.md in this folder provides some info about the notebooks, including the additional datasets which are required to run them.
To open and run the notebooks interactively in an executable environment, please click the Binder link above.
Note: In the Binder interface, there is no GPU available.
Note: In the Google Cloud platform, there is free GPU (16Gb). However, you need to install CIL manually.
The easiest way to install an environment to run the demos is using our maintained environment file which contains the required packages. Running the command below will create a new environment which has specific and tested versions of all CIL dependencies and additional packages required to run the demos:
conda env create -f https://tomographicimaging.github.io/scripts/env/cil_demos.ymlOr for a CPU-only environment which will work for a limited number of CIL demos
conda env create -f https://tomographicimaging.github.io/scripts/env/cil_demos_cpu.ymlThe additional packages include:
cudatoolkit If you have GPU drivers compatible with more recent CUDA versions you can modify this package selector (installing tigre via conda requires 9.2).
ipywidgets will allow you to use interactive widgets in our jupyter notebooks.
Check the main CIL repo for full details on CIL and its dependencies and how to install into a custom environment.
-
Activate your environment using:
conda activate cil_demos. (Or replacecil_demoswithcil_demos_cpuif you created the CPU-only environment). -
Clone the
CIL-Demosrepository and move into theCIL-Demosfolder. -
Run:
jupyter-labon the command line. -
Navigate into
demos/1_Introduction
The best place to start is the 01_intro_walnut_conebeam.ipynb notebook.
However, this requires downloading the walnut dataset.
To test your notebook installation, instead run 03_preprocessing.ipynb, which uses a dataset shipped with CIL, which will
have automatically been installed by conda.
Instead of using the jupyter-lab command, an alternative is to run the notebooks in VSCode.
For more advanced general imaging and tomography demos, please visit the following repositories:
