Closed dyang37 closed 3 years ago
I tested the code in the Purdue Brown cluster. I got the same result as Diyu shown in the pull request.
However, here are 2 suggestions:
When I tested in Lilly's Cluster, it failed to download the tarball file since the compute nodes are not connected to the internet. To test the code, I first downloaded the dataset in an interactive node that can connect to the internet, then use the computed nodes to run the demo.
After that, the code runs successfully and the results look exactly the same as the results above.
Based on the above issue, here is a suggestion,
10/14 update log. The following updates are made based on our discussion in today's meeting:
./demo_data
folder exists. If so ask user if it is desired to download and overwrite the existing data.Add exception handling for URLError and HTTPErrors when downloading data from url, and raise exceptions with more human readable error messages: HTTP errors:
URL error: This is most likely due to internet connection issue. In this case we ask the user to check his/her internet connection.
mbircone/mace/denoiser.py
to demo/denoiser_utils.py
so that cnn denoiser is not part of mbircone module.data_format
in cnn_denoiser
function so that it supports a wider variety of deep neural network denoiser models.Pull request ready to merge. Here are the summary of the major updates:
Modified the print messages inside MACE. Changed the verbose parameter in MACE to be the following:
Modified sphinx docs scripts and mace doctoring style. Here is the built mace docs:
mace-docs.pdf
Note that by default sphinx docs do not support arguments grouping (Required args/args specific to MACE/optional args). As a result I have to hard code some of the formatting in the source code of the docstring. See the mace docstring inside mace/mace.py
for more details.
Added a faster MACE demo demo_mace3D_fast.py
. This demo is mostly the same as demo_mace3D.py
except that the phantom is 2x downsampled in all directions, and num_det_rows
and num_det_channels
are also halved to match up with the downsampled phantom size. The downsampling in xy plane is performed with resize
function from PIL
. The downsampling in z direction (slices) is performed by simply taking first half of the slices.
Original phantom:
Downsampled phantom:
MACE Reconstruction:
Testing on an iMac, MACE reconstruction takes a total of about 2 minutes (40 sec for qGGMRF recon + 10* (6.5 sec/mace_iteration)) on the downsampled dataset.
download_and_extract(download_url, extract_path='./demo_data/')
inside demo_utils.py.cone3D.project()
function.mbircone/cone3D/src/interface.c
and mbircone/cone3D/src/recon3DCone.c
This is my first attempt to merge mace into master branch. This PR contains the minimal code for a mace3D reconstruction demo using simulated data (bottle cap).
I set up the mace module in the way that no extra requirements (specifically keras and tensorflow) are needed for the mbircone library. All keras/tensorlow dependent part are moved into demo script. The reason for this setting is that ideally we want the user to be able to install mbircone without the dependencies of tensorflow and keras.
Scripts:
mace3D
function.Tests performed:
demo_3D_shepp_logan.py
without installing mace specific requirements. Make sure that the reconstructed images look correct.demo_mace3D.py
, and make sure that we obtain good mace reconstructions.Phantom (axial slice):
MACE reconstruction: