Skip to content
/ ECL Public

[MICCAI 2023] ECL: Class-Enhancement Contrastive Learning for Long-tailed Skin Lesion Classification

License

Notifications You must be signed in to change notification settings

zylbuaa/ECL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECL: Class-Enhancement Contrastive Learning for Long-tailed Skin Lesion Classification

GitHub stars MIT Licence

Share us a ⭐ if this repo does help

This repository is the official implementation of ECL (Accepted by MICCAI 2023). If you encounter any question, please feel free to contact us. You can create an issue or just send an email to me at zhangyilan@buaa.edu.com. Also welcome for any idea exchange and discussion.

video-record.mp4

Updates

[07/09/2023] Code is public.

Table of Contents

Abstract

Our Network Structure Skin image datasets often suffer from imbalanced data distribution, exacerbating the difficulty of computer-aided skin disease diagnosis. Some recent works exploit supervised contrastive learning (SCL) for this long-tailed challenge. Despite achieving significant performance, these SCL-based methods focus more on head classes, yet ignore the utilization of information in tail classes. In this paper, we propose class-Enhancement Contrastive Learning (ECL), which enriches the information of minority classes and treats different classes equally. For information enhancement, we design a hybrid-proxy model to generate class-dependent proxies and propose a cycle update strategy for parameter optimization. A balanced-hybrid-proxy loss is designed to exploit relations between samples and proxies with different classes treated equally. Taking both "imbalanced data" and "imbalanced diagnosis difficulty" into account, we further present a balanced-weighted cross-entropy loss following the curriculum learning schedule.

Requirements

  • Windows/Linux both support
  • python 3.8
  • PyTorch 1.9.0
  • torchvision 0.10.0

Datasets

We conduct experiments on two public skin lesion datasets (download from ISIC Challenge): ISIC 2018 and ISIC 2019. The ISIC 2018 dataset contains 2594 images of 7 classes, and the ISIC 2019 dataset contains 25331 images of 8 classes. You can run the following code to get the splied datasets:

python ./utils/dataset/split_data.py  --datapath ./data/ISIC2018/ --dataset ISIC2018

Training

To train the model(s) in the paper, run this command:

python train.py --dataset ISIC2018 --data_path ./data/ISIC2018/ --batch_size 64 --lr 0.002 --epochs 100 --gpu 0 --model_path ./results/ISIC2018/

Testing

We upload the model weights for two datasets, run this command:

python test.py --dataset ISIC2018 --data_path ./data/ISIC2018/  --model_path ./data/ISIC2018/ --log_path <your log path>

Citation & Acknowledgments

If you find this repo useful for your research, please consider citing the paper

License

This project is released under the MIT license.

About

[MICCAI 2023] ECL: Class-Enhancement Contrastive Learning for Long-tailed Skin Lesion Classification

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages