Giter VIP home page Giter VIP logo

cmunext's Introduction

CMUNeXt: An Efficient Medical Image Segmentation Network based on Large Kernel and Skip Fusion

Official pytorch code base for ISBI 2024 oral paper "CMUNeXt: An Efficient Medical Image Segmentation Network based on Large Kernel and Skip Fusion"

Paper | Code

News ๐Ÿฅฐ:

  • CMUNeXt is accepted by ISBI 2024 as oral presentation ! ๐Ÿฅฐ
  • Paper is accepted by ISBI 2024 ! ๐ŸŽ‰
  • Code is released now !
  • Code will be released soon ! ๐Ÿ˜˜

Introduction

The U-shaped architecture has emerged as a crucial paradigm in the design of medical image segmentation networks. However, due to the inherent local limitations of convolution, a fully convolutional segmentation network with U-shaped architecture struggles to effectively extract global context information, which is vital for the precise localization of lesions. While hybrid architectures combining CNNs and Transformers can address these issues, their application in real medical scenarios is limited due to the computational resource constraints imposed by the environment and edge devices. In addition, the convolutional inductive bias in lightweight networks adeptly fits the scarce medical data, which is lacking in the Transformer based network. In order to extract global context information while taking advantage of the inductive bias, we propose CMUNeXt, an efficient fully convolutional lightweight medical image segmentation network, which enables fast and accurate auxiliary diagnosis in real scene scenarios. CMUNeXt leverages large kernel and inverted bottleneck design to thoroughly mix distant spatial and location information, efficiently extracting global context information. We also introduce the Skip-Fusion block, designed to enable smooth skip-connections and ensure ample feature fusion. Experimental results on multiple medical image datasets demonstrate that CMUNeXt outperforms existing heavyweight and lightweight medical image segmentation networks in terms of segmentation performance, while offering a faster inference speed, lighter weights, and a reduced computational cost.

CMUNeXt:

framework

Performance Comparison

Datasets

Please put the BUSI dataset or your own dataset as the following architecture.

โ””โ”€โ”€ CMUNeXt
    โ”œโ”€โ”€ data
        โ”œโ”€โ”€ busi
            โ”œโ”€โ”€ images
            |   โ”œโ”€โ”€ benign (10).png
            โ”‚   โ”œโ”€โ”€ malignant (17).png
            โ”‚   โ”œโ”€โ”€ ...
            |
            โ””โ”€โ”€ masks
                โ”œโ”€โ”€ 0
                |   โ”œโ”€โ”€ benign (10).png
                |   โ”œโ”€โ”€ malignant (17).png
                |   โ”œโ”€โ”€ ...
        โ”œโ”€โ”€ your dataset
            โ”œโ”€โ”€ images
            |   โ”œโ”€โ”€ 0a7e06.png
            โ”‚   โ”œโ”€โ”€ ...
            |
            โ””โ”€โ”€ masks
                โ”œโ”€โ”€ 0
                |   โ”œโ”€โ”€ 0a7e06.png
                |   โ”œโ”€โ”€ ...
    โ”œโ”€โ”€ dataloader
    โ”œโ”€โ”€ network
    โ”œโ”€โ”€ utils
    โ”œโ”€โ”€ main.py
    โ””โ”€โ”€ split.py

Environment

  • GPU: NVIDIA GeForce RTX4090 GPU
  • Pytorch: 1.13.0 cuda 11.7
  • cudatoolkit: 11.7.1
  • scikit-learn: 1.0.2
  • albumentations: 1.2.0

Training and Validation

You can first split your dataset:

python split.py --dataset_name busi --dataset_root ./data

Then, train and validate your dataset:

python main.py --model ["CMUNeXt", "CMUNeXt-S", "CMUNeXt-L"] --base_dir ./data/busi --train_file_dir busi_train.txt --val_file_dir busi_val.txt

Acknowledgements:

This code-base uses helper functions from Medical-Image-Segmentation-Benchmarks.

Citation

If you use our code, please cite our paper:

@article{tang2023cmunext,
  title={CMUNeXt: An Efficient Medical Image Segmentation Network based on Large Kernel and Skip Fusion},
  author={Tang, Fenghe and Ding, Jianrui and Wang, Lingtao and Ning, Chunping and Zhou, S Kevin},
  journal={arXiv preprint arXiv:2308.01239},
  year={2023}
}

cmunext's People

Contributors

fenghetan9 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cmunext's Issues

dataset multiple masks

In the busi dataset,some images have multiple corresponding masks,for example ,benign (4).png have benign (4)_mask.png and benign (4)_mask_1.png.How do you deal with this problem?My Email:[email protected]

MRI segmentation

I am interested for your works

I used MRI with nii file , how can I implement according to your project , please guide me .

thanks you

Code

Hello my dear author, I am interested in your article and would like to get the code of the article. Hope to get in touch with you if it is convenient for you.My Email: [email protected]

Questions for Ablation Study

In the Ablation Study, what's the code of the "CMUNeXt Block" networks ( introduce the CMUNeXt block into the Reduced U-Net architecture ) in Table 3?
I change all fusion_conv to my DBLconv_block in the class CMUNeXt, for example, change self.Up_conv5 = fusion_conv(ch_in=dims[3] * 2, ch_out=dims[3]) to self.Up_conv5 = DBLconv_block(ch_in=dims[3] * 2, ch_out=dims[3]). The following is the DBLconv_block

class DBLconv_block(nn.Module):
    def __init__(self, ch_in, ch_out):
        super(DBLconv_block, self).__init__()
        self.conv = nn.Sequential(
            nn.Conv2d(ch_in, ch_out, kernel_size=3, stride=1, padding=1, bias=True),
            nn.BatchNorm2d(ch_out),
            nn.ReLU(inplace=True),
            nn.Conv2d(ch_out, ch_out, kernel_size=3, stride=1, padding=1, bias=True),
            nn.BatchNorm2d(ch_out),
            nn.ReLU(inplace=True)
        )

    def forward(self, x):
        x = self.conv(x)
        return x

But its Params will be 3.01M , not 3.18 M as stated in Table 3.
So what's the code of the "CMUNeXt Block" networks in Table 3? My Email:[email protected]

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.