Code Monkey home page Code Monkey logo

crossmatch's Introduction

CrossMatch

Code for this paper: CrossMatch: Enhance Semi-Supervised Medical Image Segmentation with Perturbation Strategies and Knowledge Distillation

CrossMatch Paper: arXiv

overview

Requirements

  1. Create conda environment:
    conda create -n CrossMatch python=3.11
  2. Clone the repo:
    git clone https://github.com/AiEson/CrossMatch.git
  3. Activate the environment:
    conda activate CrossMatch
  4. Install the requirements:
    cd CrossMatch
    pip install -r requirements.txt

Usage

LA dataset

One click to run:

cd LA/code
bash train.sh

ACDC dataset

One click to run:

cd ACDC
bash scripts/train.sh gpu_num port
# like `bash scripts/train.sh 4 12333` for 4 GPUs and port 12333

Results

LA dataset results

  • The training set consists of 8 labeled scans and 72 unlabeled scans and the testing set includes 20 scans.
Method Reference Dice(%)↑ Jaccard(%)↑ 95HD(voxel)↓ ASD(voxel)↓
UA-MT (MICCAI'19) 85.81 75.41 18.25 5.04
SASSNet (MICCAI'20) 85.71 75.35 14.74 4.00
DTC (AAAI'21) 84.55 73.91 13.80 3.69
MC-Net (MICCAI'21) 86.87 78.49 11.17 2.18
URPC (MedIA'22) 83.37 71.99 17.91 4.41
SS-Net (MICCAI'22) 86.56 76.61 12.76 3.02
MC-Net+ (MedIA'22) 87.68 78.27 10.35 1.85
DMD (MICCAI'23) 89.70 81.42 6.88 1.78
BCP (CVPR'23) 89.55 81.22 7.10 1.69
UniMatch (CVPR'23) 89.09 80.47 12.50 3.59
CAML (MICCAI'23) 89.62 81.28 8.76 2.02
Ours 91.33 84.11 5.29 1.53
  • The training set consists of 16 labeled scans and 64 unlabeled scans and the testing set includes 20 scans.
Method Reference Dice(%)↑ Jaccard(%)↑ 95HD(voxel)↓ ASD(voxel)↓
UA-MT (MICCAI'19) 88.18 79.09 9.66 2.62
SASSNet (MICCAI'20) 88.11 79.08 12.31 3.27
DTC (AAAI'21) 87.79 78.52 10.29 2.50
MC-Net (MICCAI'21) 90.43 82.69 6.52 1.66
URPC (MedIA'22) 87.68 78.36 14.39 3.52
SS-Net (MICCAI'22) 88.19 79.21 8.12 2.20
MC-Net+ (MedIA'22) 90.60 82.93 6.27 1.58
DMD (MICCAI'23) 90.46 82.66 6.39 1.62
BCP (CVPR'23) 90.18 82.36 6.64 1.61
UniMatch (CVPR'23) 90.77 83.18 7.21 2.05
CAML (MICCAI'23) 90.78 83.19 6.11 1.68
Ours 91.61 84.57 5.36 1.57

ACDC dataset results

  • The training set consists of 3 labeled scans and 67 unlabeled scans and the testing set includes 20 scans.
Method Reference Dice(%)↑ Jaccard(%)↑ 95HD(voxel)↓ ASD(voxel)↓
UA-MT (MICCAI'19) 46.04 35.97 20.08 7.75
SASSNet (MICCAI'20) 57.77 46.14 20.05 6.06
DTC (AAAI'21) 56.90 45.67 23.36 7.39
MC-Net (MICCAI'21) 62.85 52.29 7.62 2.33
URPC (MedIA'22) 55.87 44.64 13.60 3.74
SS-Net (MICCAI'22) 65.82 55.38 6.67 2.28
DMD (MICCAI'23) 80.60 69.08 5.96 1.90
UniMatch (CVPR'23) 84.38 75.54 5.06 1.04
Ours 88.27 80.17 1.53 0.46

  • The training set consists of 7 labeled scans and 63 unlabeled scans and the testing set includes 20 scans.
Method Reference Dice(%)↑ Jaccard(%)↑ 95HD(voxel)↓ ASD(voxel)↓
UA-MT (MICCAI'19) 81.65 70.64 6.88 2.02
SASSNet (MICCAI'20) 84.50 74.34 5.42 1.86
DTC (AAAI'21) 84.29 73.92 12.81 4.01
MC-Net (MICCAI'21) 86.44 77.04 5.50 1.84
URPC (MedIA'22) 83.10 72.41 4.84 1.53
SS-Net (MICCAI'22) 86.78 77.67 6.07 1.40
DMD (MICCAI'23) 87.52 78.62 4.81 1.60
UniMatch (CVPR'23) 88.08 80.10 2.09 0.45
Ours 89.08 81.44 1.52 0.52

Qualitative results

la_qulti

Citation

If you find this project useful, please consider citing:

@misc{zhao2024crossmatch,
      title={CrossMatch: Enhance Semi-Supervised Medical Image Segmentation with Perturbation Strategies and Knowledge Distillation}, 
      author={Bin Zhao and Chunshi Wang and Shuxue Ding},
      year={2024},
      eprint={2405.00354},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Acknowledgement

  • This code is adapted from UA-MT, DTC and UniMatch .
  • We thank Lequan Yu, Xiangde Luo and Lihe Yang for their elegant and efficient code base.

crossmatch's People

Contributors

aieson avatar

Stargazers

Xinyu Liu avatar YuhangHong avatar xiaoyang avatar  avatar  avatar  avatar  avatar  avatar 青.꧔ avatar Leilei Ma avatar  avatar OxygenLu avatar cgnerds avatar  avatar  avatar Hayden P avatar Sumfun avatar Cliff Sterry avatar

Watchers

Kostas Georgiou avatar  avatar

crossmatch's Issues

Multi GPUs training problem

Traceback (most recent call last):
File "/home/mnt/lee/Med/CrossMatch/ACDC/train_cross_match.py", line 420, in
main()
File "/home/mnt/lee/Med/CrossMatch/ACDC/train_cross_match.py", line 183, in main
for i, (
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 630, in next
data = self._next_data()
^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 1325, in _next_data
return self._process_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
data.reraise()
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/_utils.py", line 694, in reraise
raise exception
OSError: Caught OSError in DataLoader worker process 11.
Original Traceback (most recent call last):
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
^^^^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/torch/utils/data/_utils/fetch.py", line 51, in
data = [self.dataset[idx] for idx in possibly_batched_index]
~~~~~~~~~~~~^^^^^
File "/home/mnt/lee/Med/CrossMatch/ACDC/dataset/acdc.py", line 37, in getitem
sample = h5py.File(os.path.join(self.root, id), 'r')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/h5py/_hl/files.py", line 562, in init
fid = make_fid(name, mode, userblock_size, fapl, fcpl, swmr=swmr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/mnt/lee/miniconda3/envs/CrossMatch/lib/python3.11/site-packages/h5py/_hl/files.py", line 235, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 102, in h5py.h5f.open
OSError: [Errno 9] Unable to synchronously open file (unable to lock file, errno = 9, error message = 'Bad file descriptor')

Why are the dsc values in your paper for unimatch lower than those reported in the original Unimatch article?

Thank you very much for your excellent work, but I noticed that the treatment of the ACDC dataset in your work is consistent with the original Unimatch article, and the section on preserving the optimal model after calculating dice is also consistent. However, your paper reproduces the 10% labeled Unimatch's dice value of 88.08, which was 89.9 in the original Unimatch paper, and I noticed that you implemented test.py, and I'd like to confirm that you are re-running test.py to calculate dice(88.08 ) after saving the optimal model in train_cross_match.py, Jaccard, etc. Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.