We provide the code that produces the results that we report in
Nicolas Ducros, A Lorente Mur, F. Peyrin. A Completion Network for Reconstruction from Compressed Acquisition. 2020 IEEE 17th International Symposium on Biomedical Imaging (ISBI), Apr 2020, Iowa City, United States, pp.619-623, ⟨10.1109/ISBI45749.2020.9098390⟩. Download PDF.
Contact: [email protected], CREATIS Laboratory, University of Lyon, France.
- Install SPyRiT and all dependencies. On Windows, you need first to install torch first (see the SPyRiT installation guide).
pip install -e spyrit .
pip install -r extra_requirements.txt
- (optional) If you already have the STL-10 dataset on your computer, create a symbolic link. Otherwise the STL-10 dataset will be downloaded.
- Linux:
ln -s <stl-10 parent folder> /data/
- Windows Powershell:
New-Item -ItemType SymbolicLink -Name \data\ -Target <stl-10 parent folder>
- Launch JupiterLab from the current folder
jupyter lab
and run main.ipynb
.
The notebook main.ipynb
downloads trained networks from this url. We also provide train.py
to train the different variants of the network, from a single command line.
-
Completion network
python train.py
-
Pseudo inverse network
python train.py --net_arch 2
-
Free network
python train.py --net_arch 3
Note that
- the models are saved in the default folder
.\models\
. To save them at another location consider
python train.py --model_root myfolder
- The defaults training parameters can be changed. For instance, run
python train.py --num_epochs 10 --batch_size 512 --lr 1e-8
to train your network for 10 epochs, with a batch size of 512, and a learning rate of 1e-8.
- you can keep
Average_64x64.npy
,Cov_64x64.npy
andVar_64x64.npy
in.\stats\
, to avoid re-computing them, which can be time-consuming.