Boundary-aware Transformers for Skin Lesion Segmentation

Overview

Boundary-aware Transformers for Skin Lesion Segmentation

Introduction

This is an official release of the paper Boundary-aware Transformers for Skin Lesion Segmentation.

Boundary-aware Transformers for Skin Lesion Segmentation,
Jiacheng Wang, Yueming Jin, Shuntian Cai, Hongzhi Xu, Pheng-Ann Heng, Jing Qin, Liansheng Wang
In: Medical Image Computing and Computer Assisted Intervention (MICCAI), 2021
[arXiv][Bibetex]

News

  • [11/15 2021] We have released the point map data.
  • [11/08 2021] We have released the training / testing codes.

Code List

  • Network
  • Pre-processing
  • Training Codes
  • MS

For more details or any questions, please feel easy to contact us by email ^_^

Results

Usage

Dataset

Please download the dataset from ISIC challenge.

Pre-processing

Please run:

$ python src/ISBI_resize.py
$ python src/point_gen.py

Point Maps

For your convenience, we release the processed maps and the dataset division.

Please download them from Baidu Disk. Code:kmqr.

The file names are equal to the original image names.

Training and testing

TODO

  1. We will improve the network to give a more powerful and simple lesion segmentation framework.

  2. The weights will be uploaded before next month.

Citation

If you find BAT useful in your research, please consider citing:

@inproceedings{wang2021boundary,
  title={Boundary-Aware Transformers for Skin Lesion Segmentation},
  author={Wang, Jiacheng and Wei, Lan and Wang, Liansheng and Zhou, Qichao and Zhu, Lei and Qin, Jing},
  booktitle={International Conference on Medical Image Computing and Computer-Assisted Intervention},
  pages={206--216},
  year={2021},
  organization={Springer}
}
Comments
  • Is a Binary key-patch map used during training?

    Is a Binary key-patch map used during training?

    Hello, Thanks for sharing good research!

    In the paper, figure 2, Binary Key-Patch Map is seem like used in BAG with input image features. I wonder how it worked in training. So, trying to find the part in the code, but I found this part in train.py.

    https://github.com/jcwang123/BA-Transformer/blob/d1ccdff68beac82d18c2cd64bb800e51d7afc5e1/train.py#L189

    It looks like point data(key-patch map or binary key-patch map) is used only for comparison with boundary prediction that came from the model. I think I missed the code that uses point data during the trained model. If it is, how the binary key-patch map is used in the training phase?

    Thanks!

    opened by YHYeooooong 6
  • pre-processing the dataset

    pre-processing the dataset

    Hi, thanks for your work and your sharing~

    For pre-processing the dataset, when I run python src/point_gen.py, I found there is no main function and no print information~ So, what can I do for the key-patch map generation?

    thks~

    opened by znshi 5
  •  TypeError: src data type = 17 is not supported

    TypeError: src data type = 17 is not supported

    Traceback (most recent call last): File "srcc/process_resize.py", line 87, in process_isic2018() File "srcc/process_resize.py", line 44, in process_isic2018 image_new = cv2.resize(image, dim, interpolation=cv2.INTER_CUBIC) TypeError: src data type = 17 is not supported

    opened by a139122679 4
  • Dataset Question

    Dataset Question

    Hello,jcWnag, I follow your reademe to train but the following error occured. There is no validation data in ISIC2016. I just find the train and test dataset in the website. How can find the vaild dataset, or have other sulution? Thanks for your answer!

    `class myDataset(data.Dataset): def init(self, split, aug=False): super(myDataset, self).init()

        self.image_paths = []
        self.label_paths = []
        self.point_paths = []
        self.dist_paths = []
    
        root_dir = './dataset/isic2016/'
        if split == 'train':
            self.image_paths = glob.glob(root_dir + '/Train/Image/*.npy')
            self.label_paths = glob.glob(root_dir + '/Train/Label/*.npy')
            self.point_paths = glob.glob(root_dir + '/Train/Point/*.npy')
        elif split == 'valid':
            self.image_paths = glob.glob(root_dir + '/Validation/Image/*.npy')
            self.label_paths = glob.glob(root_dir + '/Validation/Label/*.npy')
            self.point_paths = glob.glob(root_dir + '/Validation/Point/*.npy')
        elif split == 'test':
            self.image_paths = glob.glob(root_dir + '/Test/Image/*.npy')
            self.label_paths = glob.glob(root_dir + '/Test/Label/*.npy')
            self.point_paths = glob.glob(root_dir + '/Test/Point/*.npy')
        self.image_paths.sort()
        self.label_paths.sort()
        self.point_paths.sort()
    
        print('Loaded {} frames'.format(len(self.image_paths)))
        self.num_samples = len(self.image_paths)
        self.aug = aug
    
        self.transf = A.Compose([
            A.HorizontalFlip(p=0.5),
            A.VerticalFlip(p=0.5),
            A.RandomBrightnessContrast(p=0.2),
            A.Rotate()
        ])`
    
    opened by Ray-tju 3
  • the problem of formula (1)

    the problem of formula (1)

    Hello, I recently read your paper, I think it is very good, but I found that formula (1) is missing the residual part of the MSA position, I don’t know if what I put forward is correct, and I hope you can take a look. thanks.

    opened by RuosiZhou 2
  • Question about train.py

    Question about train.py

    line 47: parser.add_argument('--ppl', type=int, default=6) What is the meaning of ppl parameter? I have checked that the BAT class and train.py in line 97: It should be determined whether used decoder, thought the type is int and not boolean.

    opened by kelvin30708 1
  • Questions about model pre-training

    Questions about model pre-training

    Hello, author, I noticed that you mentioned in the article that all network encoders have been pre-trained on ImageNet, may I ask whether the encoders you mentioned refer to ResNet50 or ResNet50 + Transformer's encoder?

    Also, as I understand it, in the BAT class there is a decoder section in Transformer regardless of which Transformer is used, so what is use_decoder for (although it seems you set it to False).

    Thank you for the response

    opened by printorange 1
  • FileNotFoundError: [Errno 2] No such file or directory: 'dataset/data_split.json'

    FileNotFoundError: [Errno 2] No such file or directory: 'dataset/data_split.json'

    Thank you for your code, When I typed python train.py, I face the error as below following, how do we have the data_split.json? Thank you. image

    Thank you @jcwang123.

    opened by tphankr 1
  • ERROR: Unexpected segmentation fault encountered in worker

    ERROR: Unexpected segmentation fault encountered in worker

    $ python train.py Namespace(arch='BAT', aug=1, bt_size=8, cross=0, dataset='isic2016', exp_name='', fold='0', gpu='0', lr_seg=0.0001, n_epochs=200, net_layer=50, patience=500, point_pred=1, ppl=6, pre=0, seg_loss=0, trans=1) Loaded 900 frames Loaded 379 frames pretrained resnet, 50 ERROR: Unexpected segmentation fault encountered in worker. Traceback (most recent call last): File "/home/mll/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 986, in _try_get_data 图片

    opened by sorrowyn 1
Owner
Jiacheng Wang
Medical Imaging Processing
Jiacheng Wang
Code for Boundary-Aware Segmentation Network for Mobile and Web Applications

BASNet Boundary-Aware Segmentation Network for Mobile and Web Applications This repository contain implementation of BASNet in tensorflow/keras. comme

Hamid Ali 8 Nov 24, 2022
An official PyTorch Implementation of Boundary-aware Self-supervised Learning for Video Scene Segmentation (BaSSL)

An official PyTorch Implementation of Boundary-aware Self-supervised Learning for Video Scene Segmentation (BaSSL)

Kakao Brain 72 Dec 28, 2022
BADet: Boundary-Aware 3D Object Detection from Point Clouds (Pattern Recognition 2022)

BADet: Boundary-Aware 3D Object Detection from Point Clouds (Pattern Recognition

Rui Qian 17 Dec 12, 2022
This project deals with the detection of skin lesions within the ISICs dataset using YOLOv3 Object Detection with Darknet.

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License. Skin Lesion detection using YOLO This project deal

Lalith Veerabhadrappa Badiger 1 Nov 22, 2021
code for `Look Closer to Segment Better: Boundary Patch Refinement for Instance Segmentation`

Look Closer to Segment Better: Boundary Patch Refinement for Instance Segmentation (CVPR 2021) Introduction PBR is a conceptually simple yet effective

H.Chen 143 Jan 5, 2023
Generic Event Boundary Detection: A Benchmark for Event Segmentation

Generic Event Boundary Detection: A Benchmark for Event Segmentation We release our data annotation & baseline codes for detecting generic event bound

null 47 Nov 22, 2022
[AAAI-2021] Visual Boundary Knowledge Translation for Foreground Segmentation

Trans-Net Code for (Visual Boundary Knowledge Translation for Foreground Segmentation, AAAI2021). [https://ojs.aaai.org/index.php/AAAI/article/view/16

ZJU-VIPA 2 Mar 4, 2022
Boundary IoU API (Beta version)

Boundary IoU API (Beta version) Bowen Cheng, Ross Girshick, Piotr Dollár, Alexander C. Berg, Alexander Kirillov [arXiv] [Project] [BibTeX] This API is

Bowen Cheng 177 Dec 29, 2022
TransNet V2: Shot Boundary Detection Neural Network

TransNet V2: Shot Boundary Detection Neural Network This repository contains code for TransNet V2: An effective deep network architecture for fast sho

Tomáš Souček 212 Dec 27, 2022
Code for CVPR2021 paper "Learning Salient Boundary Feature for Anchor-free Temporal Action Localization"

AFSD: Learning Salient Boundary Feature for Anchor-free Temporal Action Localization This is an official implementation in PyTorch of AFSD. Our paper

Tencent YouTu Research 146 Dec 24, 2022
A public available dataset for road boundary detection in aerial images

Topo-boundary This is the official github repo of paper Topo-boundary: A Benchmark Dataset on Topological Road-boundary Detection Using Aerial Images

Zhenhua Xu 79 Jan 4, 2023
Out-of-boundary View Synthesis towards Full-frame Video Stabilization

Out-of-boundary View Synthesis towards Full-frame Video Stabilization Introduction | Update | Results Demo | Introduction This repository contains the

null 25 Oct 10, 2022
A pytorch-version implementation codes of paper: "BSN++: Complementary Boundary Regressor with Scale-Balanced Relation Modeling for Temporal Action Proposal Generation"

BSN++: Complementary Boundary Regressor with Scale-Balanced Relation Modeling for Temporal Action Proposal Generation A pytorch-version implementation

null 11 Oct 8, 2022
BMN: Boundary-Matching Network

BMN: Boundary-Matching Network A pytorch-version implementation codes of paper: "BMN: Boundary-Matching Network for Temporal Action Proposal Generatio

qinxin 260 Dec 6, 2022
Qimera: Data-free Quantization with Synthetic Boundary Supporting Samples

Qimera: Data-free Quantization with Synthetic Boundary Supporting Samples This repository is the official implementation of paper [Qimera: Data-free Q

Kanghyun Choi 21 Nov 3, 2022
Boundary-preserving Mask R-CNN (ECCV 2020)

BMaskR-CNN This code is developed on Detectron2 Boundary-preserving Mask R-CNN ECCV 2020 Tianheng Cheng, Xinggang Wang, Lichao Huang, Wenyu Liu Video

Hust Visual Learning Team 178 Nov 28, 2022
A Weakly Supervised Amodal Segmenter with Boundary Uncertainty Estimation

Paper Khoi Nguyen, Sinisa Todorovic "A Weakly Supervised Amodal Segmenter with Boundary Uncertainty Estimation", accepted to ICCV 2021 Our code is mai

Khoi Nguyen 5 Aug 14, 2022
Finite difference solution of 2D Poisson equation. Can handle Dirichlet, Neumann and mixed boundary conditions.

Poisson-solver-2D Finite difference solution of 2D Poisson equation Current version can handle Dirichlet, Neumann, and mixed (combination of Dirichlet

Mohammad Asif Zaman 34 Dec 23, 2022
[ICCV 2021 Oral] PoinTr: Diverse Point Cloud Completion with Geometry-Aware Transformers

PoinTr: Diverse Point Cloud Completion with Geometry-Aware Transformers Created by Xumin Yu*, Yongming Rao*, Ziyi Wang, Zuyan Liu, Jiwen Lu, Jie Zhou

Xumin Yu 317 Dec 26, 2022