This is the official repository of our paper Long-tailed Medical Diagnosis with Relation-aware Representation Learning and Iterative Classifier Calibration
We improved the decoupling method for balanced medical image classification on long-tailed datasets as follows:
- Create a conda environment using the requirements file.
conda env create -n env_name -f environment.yaml
conda activate env_name
- Download the ISIC2019LT, ISIC Archive, and Hyper-Kvasir by running the following scripts:
bash prepare_datasets/ISIC2019LT/download_ISIC2019LT.sh
bash prepare_datasets/ISIC_Archive/download_isic_archive.sh
bash prepare_datasets/hyper-kvasir/download_hyper_kvasir.sh
-
Modify the parameters in the yaml files under the folder config.
-
Run the first and second stage of the LMD:
python stage1.py --config config/isic2019.yaml
python stage2.py --config config/isic2019.yaml
As shown above, the LMD framework is capable of generating rich and balanced representations for long-tailed medical image classification.