MR Recon Eval: Digital Image Quality Phantoms and Automated Evaluation Metrics for Assessing Machine Learning-Based MRI Reconstruction
![](https://private-user-images.githubusercontent.com/37195678/337760831-e8eedb5d-75b4-4b70-991c-c71e2af018e1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MjgxNjUsIm5iZiI6MTczOTQyNzg2NSwicGF0aCI6Ii8zNzE5NTY3OC8zMzc3NjA4MzEtZThlZWRiNWQtNzViNC00YjcwLTk5MWMtYzcxZTJhZjAxOGUxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDA2MjQyNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY1NjEyYzBlZjIxNzNkNGE1MDcyZmE5YTZmODBlY2UwOTZkOTA1MzA0NzE0N2VmMjYwMDE4OWIzOGE3MzIxODImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.p1JGfK97ISuSZAxY1sY2gVi-9qGMVJiF0xrZHl07-Dc)
This repository contains the open-source Python code for the paper titled "Evaluating Machine Learning-Based MRI Reconstruction Using Digital Image Quality Phantoms". It consists of:
- Digital phantom creation (digital_phantom.py): creating 3 types of phantoms in k-space: disk, resolution, low-contrast phantom
- Metrics evaluation (evaluation_metrics.py): geometric accuracy, intensity uniformity, percentage ghosting, sharpness, SNR, high contrast resolution, and low contrast detectability.
This software and documentation (the "Software") were developed at the Food and Drug Administration (FDA) by employees of the Federal Government in the course of their official duties. Pursuant to Title 17, Section 105 of the United States Code, this work is not subject to copyright protection and is in the public domain. Permission is hereby granted, free of charge, to any person obtaining a copy of the Software, to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, or sell copies of the Software or derivatives, and to permit persons to whom the Software is furnished to do so. FDA assumes no responsibility whatsoever for use by other parties of the Software, its source code, documentation or compiled executables, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic. Further, use of this code in no way implies endorsement by the FDA or confers any advantage in regulatory decisions. Although this software can be redistributed and/or modified freely, we ask that any derivative works bear some notice that they are derived from it, and any modified versions bear some notice that they have been modified.
-
Install python 3.11.3 or any version greater (Note: the code was tested on python 3.11.3 and 3.11.5 by the authors but maybe compatible with a lower version of python.)
-
Clone this repository and navigate to its root directory
-
Install the required dependencies in a python enviroment
pip install numpy matplotlib scikit-image scipy
Run demo.py in a python enviroment.
Expected Output
![](https://private-user-images.githubusercontent.com/162378584/331362143-385842cf-2eca-46ea-ab8e-a1b7eebf3bbc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MjgxNjUsIm5iZiI6MTczOTQyNzg2NSwicGF0aCI6Ii8xNjIzNzg1ODQvMzMxMzYyMTQzLTM4NTg0MmNmLTJlY2EtNDZlYS1hYjhlLWExYjdlZWJmM2JiYy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QwNjI0MjVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xZGEwZTQ1MjQwMmRiOTU3MmJiZTAzMTliOTkzMGIxODhkMGFjNThkNWM4YjI3Y2MzNTc0ZTcwNDIyZmRlOTIwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.AWy5KQIqfydPXtu9fdxjsNfkrOLysXm_6PSxXeM7UR8)
![](https://private-user-images.githubusercontent.com/162378584/331362161-82f16b3e-b37e-45fa-abd6-c01b010c04a4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MjgxNjUsIm5iZiI6MTczOTQyNzg2NSwicGF0aCI6Ii8xNjIzNzg1ODQvMzMxMzYyMTYxLTgyZjE2YjNlLWIzN2UtNDVmYS1hYmQ2LWMwMWIwMTBjMDRhNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QwNjI0MjVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wZDg5MmQ2NDUxMGUwMTgzMDkwOWI5NjgyOGMwZDFmZTM2NjI1ODcyYTM2MWI2OGZkMDRiZjhjNjZmNDllZjQ5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9._vuGPP19hVuJCjvw3E286vXWF29o2OA0qPYDzwI3CkQ)
![](https://private-user-images.githubusercontent.com/162378584/331362175-58300a3b-b9f5-4450-9fc6-e9755edd3490.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MjgxNjUsIm5iZiI6MTczOTQyNzg2NSwicGF0aCI6Ii8xNjIzNzg1ODQvMzMxMzYyMTc1LTU4MzAwYTNiLWI5ZjUtNDQ1MC05ZmM2LWU5NzU1ZWRkMzQ5MC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjEzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxM1QwNjI0MjVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT02YzhkMDQwMDQ3NGE0ZTllYzY1ZDVlNGMwOTIxMTMwZWFkMDNjZWRjNWZjNjhmMmEyZjQ4MDJiZGJiYTA2ZGU4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.YASBMyALYtuytPbs6yp1V4t_qU_64RDSDtxZ1WmVX8w)
Geometric accuracy (maximum percentage error): 0.0003
Intensity uniformity: 94.2322
Percentage ghosting: 0.0009
Sharpness fwhm: 1.5268 Sharpness slope: 0.3233
SNR dual: 11.3576
High contrast resolution:
number of resolved vertical lines in the upper resolution block: 4
number of resolved horizontal lines in the lower resolution block: 4
Calculating low contrast detectability measurement (may take a while) ...
Low contrast detectability (number of complete spokes): 9
**The exact values will be different in each realization due to random noise in the generated phantom images. The evaluation result and the generated phantom images will be saved to an "ouptut" folder.
- How to cite Tan F, Delfino JG, Zeng R. Evaluating Machine Learning-Based MRI Reconstruction Using Digital Image Quality Phantoms. Bioengineering. 2024; 11(6):614. https://doi.org/10.3390/bioengineering11060614
Rongping Zeng, rongping.zeng@fda.hhs.gov Fei Tan, fei.tan@fda.hhs.gov