This repository contains the core implementation of the CAFNet model proposed in our manuscript "[Diffuse optical Imaging with CAFNet (channel attention fusion network)]" (JBO), an annotated simulated dataset, experimental phantom dataset as well as requirement file for readers.
-
Make sure you have Python 3.7.12 installed.
-
Install the required dependencies:
pip install -r py-37.yamlEnsure your dataset is in the correct folder structure expected by the scripts.
For test samples, the plotting utility uses a sample ID key (e.g., 'id_test_20_2d_exp') to select which data to visualize.
To train the CAFNet model, run:
python helper1516.pyThis script will:
-
Load the dataset
-
Save the dataset in the directory 'trainingtata'
For generating plots after training, run:
python CAFNet_Model_Plot.pyTo visualize the reconstructed optical-property images:
Open the plotting script or a Python session.
Change the key value to your desired test sample ID (Line #323):
python
for i in ['id_test_20_2d_exp']: # Replace with your test sample ID
plot_result(i, 'trainingtata', None)Explanation of columns in the output plot:
Column 1: Ground truth optical properties
Column 2: Reconstructed results using Tikhonov Regularization
'trainingtata' refers to the directory containing the trained model outputs.
Make sure your dataset paths match the paths expected in the script