Skip to content

CVIU-CSU/M2MRF-Lesion-Segmentation

Repository files navigation

Automated Lesion Segmentation in Fundus Images with Many-to-Many Reassembly of Features

This repo is the official implementation of paper "Automated Lesion Segmentation in Fundus Images with Many-to-Many Reassembly of Features".

Environment

This code is based on mmsegmentation.

  • pytorch=1.6.0
  • mmsegmentation=0.8.0
  • mmcv=1.2.0
conda create -n m2mrf python=3.7 -y
conda activate m2mrf

conda install pytorch=1.6.0 torchvision cudatoolkit=10.2 -c pytorch -y
pip install mmcv-full==1.2.0 -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.6.0/index.html -i https://pypi.douban.com/simple/
pip install opencv-python
pip install scipy
pip install tensorboard tensorboardX
pip install sklearn
pip install terminaltables
pip install matplotlib

cd M2MRF-Lesion-Segmentation
chmod u+x tools/*
pip install -e .

Training and testing

# prepare dataset
python tools/prepare_labels.py
python tools/augment.py

# train
CUDA_VISIBLE_DEVICES=0,1,2,3 PORT=12345 tools/dist_train.sh configs/m2mrf/fcn_hr48-M2MRF-C_40k_idrid_bdice.py 4

# test
CUDA_VISIBLE_DEVICES=0,1,2,3 PORT=12345 tools/dist_test.sh configs/m2mrf/fcn_hr48-M2MRF-C_40k_idrid_bdice.py /path/to/fcn_hr48-M2MRF-C_40k_idrid_bdice_iter_40000.pth 4 --eval mIoU

Results and models

We evaluate our method on IDRiD and DDR.

IDRiD

method   mIOU   mAUPR download
M2MRF-A 49.86 67.15 config | model
M2MRF-B 49.33 66.71 config | model
M2MRF-C 50.17 67.55 config | model
M2MRF-D 49.96 67.32 config | model

DDR

method   mIOU   mAUPR download
M2MRF-A 31.47 49.56 config | model
M2MRF-B 30.56 49.86 config | model
M2MRF-C 30.39 49.20 config | model
M2MRF-D 30.76 49.47 config | model

In the paper, we reported average performance over three repetitions, but our code only reported the best one among them.

Citation

If you find this code useful in your research, please consider citing:

@article{liu2023m2mrf,
      title = {Automated Lesion Segmentation in Fundus Images with Many-to-Many Reassembly of Features},
      author = {Qing Liu and Haotian Liu and Wei Ke and Yixiong Liang},
      journal = {Pattern Recognition},
      volume = {136},
      pages = {109191},
      year = {2023},
      issn = {0031-3203},
      doi = {https://doi.org/10.1016/j.patcog.2022.109191},
}

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages