Home

Awesome

TransNorm: Transformer Provides a Strong Spatial Normalization Mechanism for a Deep Segmentation Model

The official code for "TransNorm: Transformer Provides a Strong Spatial Normalization Mechanism for a Deep Segmentation Model".

R. Azad, Mohammad Al-Antary, Moein Heidari, and Dorit Merhof , "TransNorm: Transformer Provides a Strong Spatial Normalization Mechanism for a Deep Segmentation Model", download link.


Updates


Introduction

In this paper, we argue that combining the two descriptors, namely, CNN and Transformer might provide an efficient feature representation, which is at the heart of our research in this paper. Majority of existing CNN-Transformer based networks suffer from a weak construction on the skip connection section. To this end, we design a two-level attention mechanism based on the Transformer module to adaptively recalibrate the feature combination on the skip connection path.

Please consider starring us, if you found it useful. Thanks

Updates

This code has been implemented in python language using Pytorch library and tested in ubuntu OS, though should be compatible with related environment. following Environement and Library needed to run the code:

Run Demo

For training deep model and evaluating on each data set follow the bellow steps:</br> 1- Download the ISIC 2018 train dataset from this link and extract both training dataset and ground truth folders inside the dataset_isic18. </br> 2- Run Prepare_ISIC2018.py for data preperation and dividing data to train,validation and test sets. </br> 3- Run train_skin.py for training the model using trainng and validation sets. The model will be train for 100 epochs and it will save the best weights for the valiation set. </br> 4- For performance calculation and producing segmentation result, run evaluate_skin.py. It will represent performance measures and will saves related results in results folder.</br>

Notice: For training and evaluating on ISIC 2017 and ph2 follow the bellow steps :

ISIC 2017- Download the ISIC 2017 train dataset from this link and extract both training dataset and ground truth folders inside the dataset_isic18\7. </br> then Run Prepare_ISIC2017.py for data preperation and dividing data to train,validation and test sets. </br> ph2- Download the ph2 dataset from this link and extract it then Run Prepare_ph2.py for data preperation and dividing data to train,validation and test sets. </br> Follow step 3 and 4 for model traing and performance estimation. For ph2 dataset you need to first train the model with ISIC 2017 data set and then fine-tune the trained model using ph2 dataset.

Quick Overview

Diagram of the proposed method

Perceptual visualization of the proposed two-level attention module.

Diagram of the proposed method

Results

In bellow, results of the proposed approach illustrated. </br>

SKin Lesion Segmentation

Performance Comparision on SKin Lesion Segmentation

In order to compare the proposed method with state of the art appraoches on SKin Lesion Segmentation, we considered Drive dataset.

Methods (On ISIC 2017)Dice-ScoreSensivitySpecificatyAccuracy
Ronneberger and et. all U-net0.81590.81720.96800.9164
Oktay et. all Attention U-net0.80820.79980.97760.9145
Lei et. all DAGAN0.84250.83630.97160.9304
Chen et. all TransU-net0.81230.82630.95770.9207
Asadi et. all MCGU-Net0.89270.85020.98550.9570
Valanarasu et. all MedT0.80370.80640.95460.9090
Wu et. all FAT-Net0.85000.83920.97250.9326
Azad et. all Proposed TransNorm0.89330.85320.98590.9582

For more results on ISIC 2018 and PH2 dataset, please refer to the paper

SKin Lesion Segmentation segmentation result on test data

SKin Lesion Segmentation  result

Model weights

You can download the learned weights for each dataset in the following table.

DatasetLearned weights (Will be added)
ISIC 2018TransNorm
ISIC 2017TransNorm
Ph2TransNorm

Query

All implementations are done by Reza Azad and Moein Heidari. For any query please contact us for more information.

rezazad68@gmail.com
moeinheidari7829@gmail.com