rajpurkarlab / cheXlocalize

Code for CheXlocalize
MIT License
29 stars 12 forks source link

Execute the code #1

Closed ali-kianmehr closed 2 years ago

ali-kianmehr commented 2 years ago

Dear Stanford ML group I want my master's thesis to develop this model and make progress in the challenge. Implementation of the base model will be the starting point. How should we execute the code? I mean, what is the order of execution? I also downloaded the dataset. Addressing files (such as ground-truth (JSON file) and images) is different from what is written in code. Thank you for giving me more information.

alexaaag commented 2 years ago

Hello! To run the baseline model, you should first generate saliency heatmaps using the chexpert checkpoints and the x-ray images. We haven't released the code on generating saliency heatmaps - I will ask the other co-authors and come back with a decision. There are some issues regarding data privacy that we have to address first with Stanford.

From then on, you can either 1) directly run eval_ptgame.py to evaluate the heatmaps in a pointing game set up. The input to this code is raw saliency heatmaps (numpy array) from step1.

2) run segmentation/pred_segmentaion.py to generate segmentations. The input is the raw saliency heatmaps (numpy array) from step1, and the output is binary segmentations stored in JSON format. Then you can use eval_miou.py to evaluate localization in a segmentation set up.

We've updated the dataset and readme here stanford aimi database. You can find more instructions on reading the json file to numpy array (to obtain the ground truth binary segmentations).

We will work on releasing a demo in the repo to make the code more reproducible. Thank you for your patience and understanding.

asaporta commented 2 years ago

Hi @ali-kianmehr ! We just updated our code and README significantly, so if you're still working on this, hopefully it'll be a little easier for you now 😄