Please cite the following paper if you are using our model:
Qiu Z, Rivaz H, Xiao Y. Joint enhancement of automatic chest x-ray diagnosis and radiological gaze prediction with multistage cooperative learning. Med Phys. 2025 Jul;52(7):e17977. doi: 10.1002/mp.17977. PMID: 40665596; PMCID: PMC12264402.
You can download the two datasets used in this study from the following links:
- MIMIC-CXR Database
- Contains the chest X-ray images.
- Access requires approval through PhysioNet Credentialed Access.
- Eye Gaze Data for Chest X-rays
- Provides eye gaze data for chest X-ray studies.
- Includes references to specific chest X-ray images from the MIMIC-CXR database.
The eye gaze data references specific chest X-ray images from the MIMIC-CXR database. You need to manually locate and download these images from the MIMIC-CXR database one by one based on the image IDs provided in the Eye Gaze dataset.
To set up the environment for this project, follow these steps:
First, clone this repository to your local machine:
git clone https://github.com/HealthX-Lab/CXRGazeLearn.git
cd CXRGazeLearnInstall the required packages using requirements.txt:
pip install -r requirements.txtTo process the dataset, follow these steps:
Go to the Data folder in the project directory:
cd DataOpen data.py and update the paths to your local directories for the datasets. Replace the placeholder paths with your own:
gaze_path = '/home/ziruiqiu/MscStudy/eye-gaze-dataset/physionet.org/files/egd-cxr/1.0.0' # Replace with your own path
cxr_path = '/home/ziruiqiu/MscStudy/eye-gaze-dataset' # Replace with your own pathExecute the data.py script to process the dataset:
python data.pyTo use the code, follow these steps. Each stage corresponds to a step in the pipeline described in the paper.
Navigate to the CL folder, which contains the code for training the DenseNet-201 feature encoder.
cd CL
python RUN.pyThe second stage generates visual saliency maps that mimic the attention patterns of medical professionals.
cd ..
cd Classification
python RUN.pyThe final stage performs the classification task using a feature-fusion approach:
cd ..
cd KL
python RUN.pyIf you are unable to run the code, feel free to reach out leoqiuzirui@gmail.com

