DCSAU-Net: A Deeper and More Compact Split-Attention U-Net for Medical Image Segmentation

Overview

DCSAU-Net: A Deeper and More Compact Split-Attention U-Net for Medical Image Segmentation

By Qing Xu, Wenting Duan and Na He

Requirements

  1. pytorch==1.10.0
  2. pytorch-lightning==1.1.0
  3. albumentations==0.3.2
  4. seaborn
  5. sklearn

Dataset

To apply the model on a custom dataset, the data tree should be constructed as:

    ├── data
          ├── images
                ├── image_1.png
                ├── image_2.png
                ├── image_n.png
          ├── masks
                ├── image_1.png
                ├── image_2.png
                ├── image_n.png

CSV generation

python data_split_csv.py --dataset your/data/path --size 0.9 

Train

python train.py --dataset your/data/path --csvfile your/csv/path --loss dice --batch 16 --lr 0.001 --epoch 150 

Evaluation

python eval_binary.py --dataset your/data/path --csvfile your/csv/path --model save_models/epoch_last.pth --debug True

Acknowledgement

The codes are modified from ResNeSt, U-Net

Comments
  • RuntimeError: The size of tensor a (256) must match the size of tensor b (3) at non-singleton dimension 4

    RuntimeError: The size of tensor a (256) must match the size of tensor b (3) at non-singleton dimension 4

    intersection = (inputs * targets).sum() RuntimeError: The size of tensor a (256) must match the size of tensor b (3) at non-singleton dimension 4 您好,我用的是肠息肉数据集。

    image

    input的格式是(2,1,256,256) targets的格式是(2,1,256,256,3) 我的邮箱是[email protected],QQ是2106639131。 希望您能抽空看一下!十分感谢!

    opened by 1789000076 7
  • dataset

    dataset

    Excuse me, I want to train the ISIC Task 1 official dataset. What should the directory format of the data be? I store the data according to the directory structure of the data you give , and execute the data_ split_ csv,The test machine and training set cannot be divided into csv files .

    opened by Zrs1171757736 5
  • Head of PFC block, 3x3 or 7x7 conv?

    Head of PFC block, 3x3 or 7x7 conv?

    The PFC block code says

    def __init__(self,channels, kernel_size=7):
            super(PFC, self).__init__()
            self.input_layer = nn.Sequential(
                        nn.Conv2d(3, channels, kernel_size, padding= kernel_size // 2),
                        nn.ReLU(inplace=True),
                        nn.BatchNorm2d(channels)
    

    which implies that the head of the PFC block has a Conv2D with kernel size = 7

    However, in the paper, it is noted that "Also, 3x3 convolution is added to the head of this module for down-sampling the input image and raising the channel because depthwise separable convolution shows degradation of performance on low-dimensional features.

    Should the kernel_size for the input_layer be 3 or 7?

    opened by JohnMBrandt 3
  • RuntimeError: The size of tensor a (256) must match the size of tensor b (3) at non-singleton dimension 4

    RuntimeError: The size of tensor a (256) must match the size of tensor b (3) at non-singleton dimension 4

    请问我该如何解决这个问题,我使用的是Kavisr数据集,代码没有任何改动,但是出现了这个错误 Epoch 0/149

    Traceback (most recent call last): File "D:\paperin\a_new_road\DCSAU-Net-main\train.py", line 176, in model_ft, Loss_list, Accuracy_list = train_model(model_ft, criterion, optimizer_ft, exp_lr_scheduler, File "D:\paperin\a_new_road\DCSAU-Net-main\train.py", line 85, in train_model loss = criterion(outputs, labels) File "D:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl return forward_call(*input, **kwargs) File "D:\paperin\a_new_road\DCSAU-Net-main\loss.py", line 65, in forward intersection = (inputs * targets).sum()
    RuntimeError: The size of tensor a (256) must match the size of tensor b (3) at non-singleton dimension 4

    这个地方调试的inputs是Tensor(8, 1, 256, 256),但是targets是Tensor(8, 1, 256, 256, 3),请问是需要修改什么还是我数据集划分的问题 数据集划分 ├── data ├── images ├── cju0qkwl35piu0993l0dewei2.png ....... ├── masks ├── cju0qkwl35piu0993l0dewei2_segmentation.png .......

    opened by MOONWZ 2
  • Could you please share the code of comparison model in the paper

    Could you please share the code of comparison model in the paper

    Thank you for your contribution to relevant work. Could you please share the code of comparison model in the paper, such as ResUnet++ doubleu-net TransUnet levit-unet, which would be very helpful to me

    opened by MOONWZ 2
  • Can you provide the SegPC-2021 dataset you have processed?

    Can you provide the SegPC-2021 dataset you have processed?

    Excellent work!can you provide the labels of the SegPC-2021 dataset you processed? My email is [email protected], I would be very grateful if you can provide it

    opened by jane442 0
Owner
Qing Xu
Qing Xu
U2-Net: Going Deeper with Nested U-Structure for Salient Object Detection

The code for our newly accepted paper in Pattern Recognition 2020: "U^2-Net: Going Deeper with Nested U-Structure for Salient Object Detection."

Xuebin Qin 6.5k Jan 9, 2023
A PyTorch implementation for V-Net: Fully Convolutional Neural Networks for Volumetric Medical Image Segmentation

A PyTorch implementation of V-Net Vnet is a PyTorch implementation of the paper V-Net: Fully Convolutional Neural Networks for Volumetric Medical Imag

Matthew Macy 606 Dec 21, 2022
EPSANet:An Efficient Pyramid Split Attention Block on Convolutional Neural Network

EPSANet:An Efficient Pyramid Split Attention Block on Convolutional Neural Network This repo contains the official Pytorch implementaion code and conf

Hu Zhang 175 Jan 7, 2023
Official and maintained implementation of the paper "OSS-Net: Memory Efficient High Resolution Semantic Segmentation of 3D Medical Data" [BMVC 2021].

OSS-Net: Memory Efficient High Resolution Semantic Segmentation of 3D Medical Data Christoph Reich, Tim Prangemeier, Özdemir Cetin & Heinz Koeppl | Pr

Christoph Reich 23 Sep 21, 2022
Multi-atlas segmentation (MAS) is a promising framework for medical image segmentation

Multi-atlas segmentation (MAS) is a promising framework for medical image segmentation. Generally, MAS methods register multiple atlases, i.e., medical images with corresponding labels, to a target image;

NanYoMy 13 Oct 9, 2022
Context Axial Reverse Attention Network for Small Medical Objects Segmentation

CaraNet: Context Axial Reverse Attention Network for Small Medical Objects Segmentation This repository contains the implementation of a novel attenti

null 401 Dec 23, 2022
《DeepViT: Towards Deeper Vision Transformer》(2021)

DeepViT This repo is the official implementation of "DeepViT: Towards Deeper Vision Transformer". The repo is based on the timm library (https://githu

null 109 Dec 2, 2022
[Preprint] "Bag of Tricks for Training Deeper Graph Neural Networks A Comprehensive Benchmark Study" by Tianlong Chen*, Kaixiong Zhou*, Keyu Duan, Wenqing Zheng, Peihao Wang, Xia Hu, Zhangyang Wang

Bag of Tricks for Training Deeper Graph Neural Networks: A Comprehensive Benchmark Study Codes for [Preprint] Bag of Tricks for Training Deeper Graph

VITA 101 Dec 29, 2022
Deeper DCGAN with AE stabilization

AEGeAN Deeper DCGAN with AE stabilization Parallel training of generative adversarial network as an autoencoder with dedicated losses for each stage.

Tyler Kvochick 36 Feb 17, 2022
MogFace: Towards a Deeper Appreciation on Face Detection

MogFace: Towards a Deeper Appreciation on Face Detection Introduction In this repo, we propose a promising face detector, termed as MogFace. Our MogFa

null 48 Dec 20, 2022
Copy Paste positive polyp using poisson image blending for medical image segmentation

Copy Paste positive polyp using poisson image blending for medical image segmentation According poisson image blending I've completely used it for bio

Phạm Vũ Hùng 2 Oct 19, 2021
Build a medical knowledge graph based on Unified Language Medical System (UMLS)

UMLS-Graph Build a medical knowledge graph based on Unified Language Medical System (UMLS) Requisite Install MySQL Server 5.6 and import UMLS data int

Donghua Chen 6 Dec 25, 2022
Diverse Image Captioning with Context-Object Split Latent Spaces (NeurIPS 2020)

Diverse Image Captioning with Context-Object Split Latent Spaces This repository is the PyTorch implementation of the paper: Diverse Image Captioning

Visual Inference Lab @TU Darmstadt 34 Nov 21, 2022
Contrastive Learning for Compact Single Image Dehazing, CVPR2021

AECR-Net Contrastive Learning for Compact Single Image Dehazing, CVPR2021. Official Pytorch based implementation. Paper arxiv Pytorch Version TODO: mo

glassy 253 Jan 1, 2023
Code for paper "ASAP-Net: Attention and Structure Aware Point Cloud Sequence Segmentation"

ASAP-Net This project implements ASAP-Net of paper ASAP-Net: Attention and Structure Aware Point Cloud Sequence Segmentation (BMVC2020). Overview We i

Hanwen Cao 26 Aug 25, 2022
The open source code of SA-UNet: Spatial Attention U-Net for Retinal Vessel Segmentation.

SA-UNet: Spatial Attention U-Net for Retinal Vessel Segmentation(ICPR 2020) Overview This code is for the paper: Spatial Attention U-Net for Retinal V

Changlu Guo 151 Dec 28, 2022
CoTr: Efficiently Bridging CNN and Transformer for 3D Medical Image Segmentation

CoTr: Efficient 3D Medical Image Segmentation by bridging CNN and Transformer This is the official pytorch implementation of the CoTr: Paper: CoTr: Ef

null 218 Dec 25, 2022
Medical Image Segmentation using Squeeze-and-Expansion Transformers

Medical Image Segmentation using Squeeze-and-Expansion Transformers Introduction This repository contains the code of the IJCAI'2021 paper 'Medical Im

askerlee 172 Dec 20, 2022
Semi Supervised Learning for Medical Image Segmentation, a collection of literature reviews and code implementations.

Semi-supervised-learning-for-medical-image-segmentation. Recently, semi-supervised image segmentation has become a hot topic in medical image computin

Healthcare Intelligence Laboratory 1.3k Jan 3, 2023