All Projects → McGregorWwww → UCTransNet

McGregorWwww / UCTransNet

Licence: other
Implementation of our AAAI'22 work: 'UCTransNet: Rethinking the Skip Connections in U-Net from a Channel-wise Perspective with Transformer'.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to UCTransNet

mmrazor
OpenMMLab Model Compression Toolbox and Benchmark.
Stars: ✭ 644 (+387.88%)
Mutual labels:  segmentation
uoais
Codes of paper "Unseen Object Amodal Instance Segmentation via Hierarchical Occlusion Modeling", ICRA 2022
Stars: ✭ 77 (-41.67%)
Mutual labels:  segmentation
medical image segmentation
Medical image segmentation ( Eye vessel segmentation)
Stars: ✭ 90 (-31.82%)
Mutual labels:  segmentation
hair-dye
Neural Network for Dying Hair💈
Stars: ✭ 45 (-65.91%)
Mutual labels:  segmentation
pcan
Prototypical Cross-Attention Networks for Multiple Object Tracking and Segmentation, NeurIPS 2021 Spotlight
Stars: ✭ 294 (+122.73%)
Mutual labels:  segmentation
Lyrics-to-Audio-Alignment
Aligns text (lyrics) with monophonic singing voice (audio). The algorithm uses structural segmentation to segment the audio into structures and then uses hidden markov models to obtain alignment within segments. The final alignment is concatenation of time stamps of lyrics within the segments for each song.
Stars: ✭ 57 (-56.82%)
Mutual labels:  segmentation
Point2Sequence
Point2Sequence: Learning the Shape Representation of 3D Point Clouds with an Attention-based Sequence to Sequence Network
Stars: ✭ 34 (-74.24%)
Mutual labels:  segmentation
kaggle-satellite-imagery-feature-detection
Satellite Imagery Feature Detection (68 out of 419)
Stars: ✭ 29 (-78.03%)
Mutual labels:  segmentation
dcsp segmentation
No description or website provided.
Stars: ✭ 34 (-74.24%)
Mutual labels:  segmentation
Semantic-Image-Segmentation
Applying the 100 Layer Tiramisu on the Camvid Dataset
Stars: ✭ 29 (-78.03%)
Mutual labels:  segmentation
MiVOS
[CVPR 2021] Modular Interactive Video Object Segmentation: Interaction-to-Mask, Propagation and Difference-Aware Fusion. Semi-supervised VOS as well!
Stars: ✭ 302 (+128.79%)
Mutual labels:  segmentation
ML IDCard Segmentation-TF-Keras
Machine Learning Project to identify an ID Card on an image
Stars: ✭ 38 (-71.21%)
Mutual labels:  segmentation
CAPE
Cylinder and Plane Extraction from Depth Cameras
Stars: ✭ 107 (-18.94%)
Mutual labels:  segmentation
VNet
Prostate MR Image Segmentation 2012
Stars: ✭ 54 (-59.09%)
Mutual labels:  segmentation
MONAILabel
MONAI Label is an intelligent open source image labeling and learning tool.
Stars: ✭ 249 (+88.64%)
Mutual labels:  segmentation
superpixelRefinement
Superpixel-based Refinement for Object Proposal Generation (ICPR 2020)
Stars: ✭ 24 (-81.82%)
Mutual labels:  segmentation
CarND-Detect-Lane-Lines-And-Vehicles
Use segmentation networks to recognize lane lines and vehicles. Infer position and curvature of lane lines relative to self.
Stars: ✭ 66 (-50%)
Mutual labels:  segmentation
volkscv
A Python toolbox for computer vision research and project
Stars: ✭ 58 (-56.06%)
Mutual labels:  segmentation
Dynamic ORB SLAM2
Visual SLAM system that can identify and exclude dynamic objects.
Stars: ✭ 89 (-32.58%)
Mutual labels:  segmentation
U-Net-Fixed-Point-Quantization-for-Medical-Image-Segmentation
Repository containing code for "U-Net Fixed-Point Quantization for Medical Image Segmentation" paper at MICCAI2019
Stars: ✭ 62 (-53.03%)
Mutual labels:  segmentation

[AAAI2022] UCTransNet

This repo is the official implementation of 'UCTransNet: Rethinking the Skip Connections in U-Net from a Channel-wise Perspective with Transformer' which is accepted at AAAI2022.

framework

We propose a Channel Transformer module (CTrans) and use it to replace the skip connections in original U-Net, thus we name it 'U-CTrans-Net'.

🔥🔥 Online Presentation Video is available for brief introduction. 🔥🔥

Requirements

Install from the requirements.txt using:

pip install -r requirements.txt

Usage

1. Data Preparation

1.1. GlaS and MoNuSeg Datasets

The original data can be downloaded in following links:

Then prepare the datasets in the following format for easy use of the code:

├── datasets
    ├── GlaS
    │   ├── Test_Folder
    │   │   ├── img
    │   │   └── labelcol
    │   ├── Train_Folder
    │   │   ├── img
    │   │   └── labelcol
    │   └── Val_Folder
    │       ├── img
    │       └── labelcol
    └── MoNuSeg
        ├── Test_Folder
        │   ├── img
        │   └── labelcol
        ├── Train_Folder
        │   ├── img
        │   └── labelcol
        └── Val_Folder
            ├── img
            └── labelcol

1.2. Synapse Dataset

The Synapse dataset we used is provided by TransUNet's authors. Please go to https://github.com/Beckschen/TransUNet/blob/main/datasets/README.md for details.

2. Training

As mentioned in the paper, we introduce two strategies to optimize UCTransNet.

The first step is to change the settings in Config.py, all the configurations including learning rate, batch size and etc. are in it.

2.1 Jointly Training

We optimize the convolution parameters in U-Net and the CTrans parameters together with a single loss. Run:

python train_model.py

2.2 Pre-training

Our method just replaces the skip connections in U-Net, so the parameters in U-Net can be used as part of pretrained weights.

By first training a classical U-Net using /nets/UNet.py then using the pretrained weights to train the UCTransNet, CTrans module can get better initial features.

This strategy can improve the convergence speed and may improve the final segmentation performance in some cases.

3. Testing

3.1. Get Pre-trained Models

Here, we provide pre-trained weights on GlaS and MoNuSeg, if you do not want to train the models by yourself, you can download them in the following links:

3.2. Test the Model and Visualize the Segmentation Results

First, change the session name in Config.py as the training phase. Then run:

python test_model.py

You can get the Dice and IoU scores and the visualization results.

🔥🔥 The testing results of all classes in Synapse dataset can be downloaded through this link. 🔥🔥

4. Reproducibility

In our code, we carefully set the random seed and set cudnn as 'deterministic' mode to eliminate the randomness. However, there still exsist some factors which may cause different training results, e.g., the cuda version, GPU types, the number of GPUs and etc. The GPU used in our experiments is NVIDIA A40 (48G) and the cuda version is 11.2.

Especially for multi-GPU cases, the upsampling operation has big problems with randomness. See https://pytorch.org/docs/stable/notes/randomness.html for more details.

When training, we suggest to train the model twice to verify wheather the randomness is eliminated. Because we use the early stopping strategy, the final performance may change significantly due to the randomness.

Reference

Citations

If this code is helpful for your study, please cite:

@misc{wang2021uctransnet,
      title={UCTransNet: Rethinking the Skip Connections in U-Net from a Channel-wise Perspective with Transformer}, 
      author={Haonan Wang and Peng Cao and Jiaqi Wang and Osmar R. Zaiane},
      year={2021},
      eprint={2109.04335},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Contact

Haonan Wang ([email protected])

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].