diff --git a/README.md b/README.md index e92182c3f52daaf380035872fd4d415604560259..05be3b28c5c01943d139cfb5f27d3918bae3e451 100644 --- a/README.md +++ b/README.md @@ -1,48 +1,54 @@ # Mu Map -Repository for the code to replicate the paper of Shi et al. with our SPECT/CT Scanner. - -## Differences -| | Authors | Ours | -| :-------------------- | :----------------------------: | :-------------------------------: | -| SPECT/CT Scanner | GE NM/CT 850 SPECT/CT | Siemens Symbia Intevo 16 SPECT/CT | -| Scan Arc | 180° | 208° | -| Angles | 60 | 34 | -| Energy Window Lower | 114-126 keV | 110-131 keV | -| Energy Window Upper | 126-155 keV | 131-152 keV | -| Dose | 15 mCi | ? | -| Reconstruction | OSEM (5 iterations, 4 subsets) | Siemens Conjugate Gradient | -| CT Energy | 120 kVp | ? | -| Attenuation Map Shape | (25-35)x64x64 | ? | -| Reconstruction Shape | 64x64x64 | 51x128x128 | -| Voxel Size | 6.8x6.8x6.8 mm³| 4.8x4.8x4.8 mm³ | - - -## Open Questions +Repository containing the code of the paper `Deep Learning Approximation of Attenuation Maps for Myocardial Perfusion SPECT with an IQ·SPECT Collimator`. + +Using this code, it is possible to train a deep neural network to predict attenuation maps from non-attenuation-corrected reconstructions. +Training is inspired by the description in [1] and is implemented with [PyTorch](https://pytorch.org/). +For the optimization of hyperparameters, a random search procedure [2] is implemented. +To compute attenuation-corrected reconstructions, the script TODO implements the post-reconstruction attenuation correction (PRAC) [3] algorithm. +The open-source tomographic reconstruction software [STIR](https://stir.sourceforge.net/) is used for this. +Reconstructions can be evaluated using the mean squared error or the normalized mean absolute error. +While there is also code to evaluate polar maps, they cannot be generated here. +For the purpose of the paper, grayscale polar maps were generated the Cedars-Sinai Cardiac Suite [4]. + +## Results + +## Release ToDo's +* Update dependency versions in pyproject.toml an requirements.txt +* Test installation instructions +* Add illustrations: + * Gif of the comparison between a predicted and an actual attenuation map + * polar maps + +## Installation +Installation was tested with Ubuntu 20.04 and 22.04. +1. Create and load a virtual environment `python -m venv .venv && source .venv/bin/activate` +2. Install python requirements `pip install -r requirements.txt` + +### STIR +STIR is required to project and reconstruct scans (using the PRAC algorithm). +For its installation, this repository contains STIR as a submodule as well as an installation script. +To install STIR run: +1. `git submodule init && git submodule update` +2. `cd libs && ./install.sh && cd ..` + +### Tesseract OCR +Because we could not export perfusion scores from polar maps generated with the Cedars-Sinai Cardiac Suite, but only RGB images with scores written in a green font, we added a [script](/mu_map/polar_map/get_perfusion) to help extract these scores. +This script uses [Tesseract](https://tesseract-ocr.github.io/) to automatically parse these numbers from the image. +To install tesseract, run: +`sudo apt install tesseract-ocr` + +## Usage +This code is not intended for direct usage as data structures likely differ. + +## Features +* cGAN training +* Random search [2] for hyperparameter optimization +* PRAC [3] algorithm +* Evaluation of polar maps ## References -* `Shi et al. "Deep learning-based attenuation map generation for myocardial perfusion SPECT". 2020 In: European Journal of Nuclear Medicine and Molecular Imaging 47.10` - * [DOI: 10.1007/s00259-020-04746-6](www.doi.org/10.1007/s00259-020-04746-6) - -## Install -Install libraries for tomographic reconstruction: - -### NiftyRec -* `mkdir libs` -* `cd libs` -* `git clone https://github.com/TomographyLab/NiftyRec` -* `cd NiftyRec` -* `git checkout 5329496` -* `cp README.md README.txt` - this file is needed by cmake -* `mkdir build` -* `cd build` -* `ccmake ..` - turn of the volume renderer -* `make -j 8` -* `make package` -* `sudo dpkg -i NiftyRec-3.1.0-Linux-x86_64.deb` - -### TomoLab -Make sure your python virtual environment is active for this. -* `mkdir libs` -* `cd libs` -* `git clone https://github.com/TomographyLab/TomoLab` -* `git checkout 86b9a58` +1. L. Shi et al. “Deep learning-based attenuation map generation for myocardial perfusion SPECTâ€. In: European Journal of Nuclear Medicine and Molecular Imaging 47 (2020). doi: [10.1007/s00259-020-04746-6](https://doi.org/10.1007/s00259-020-04746-6). +2. J. Bergstra and Y. Bengio. “Random Search for Hyper-Parameter Optimizationâ€. In: Journal of Machine Learning Research 13 (2012). +3. H. Liu et al. “Post-reconstruction attenuation correction for SPECT myocardium perfusion imaging facilitated by deep learning-based attenuation map generationâ€. In: Journal of Nuclear Cardiology 29 (2021). doi: [10.1007/s12350-021-02817-1](http://doi.org/10.1007/s12350-021-02817-1). +4. G. Germano et al. “Quantitation in gated perfusion SPECT imaging: The Cedars-Sinai approachâ€. In: Journal of Nuclear Cardiology 14 (2007). doi: [10.1016/j.nuclcard.2007.06.008](https://doi.org/10.1016/j.nuclcard.2007.06.008). +