Code for Reciprocal Adversarial Learning for Brain Tumor Segmentation: A Solution to BraTS Challenge 2021 Segmentation Task

Overview

BRATS 2021 Solution For Segmentation Task

This repo contains the supported pytorch code and configuration files to reproduce 3D medical image segmentaion results of Reciprocal Adversarial Learning for Brain Tumor Segmentation: A Solution to BraTS Challenge 2021 Segmentation Task.

Proposed Architecture

Environment

Prepare an environment with python=3.8, and then run the command "pip install -r requirements.txt" for the dependencies.

Data Preparation

  • File structure
     BRATS2021
      |---Data
      |   |--- RSNA_ASNR_MICCAI_BraTS2021_TrainingData
      |   |   |--- BraTS2021_00000
      |   |   |   |--- BraTS2021_00000_flair...
      |   
      |              
      |   
      |
      |---train.py
      |---test.py
      ...
    

Train/Test

  • Train : Run the train script on BraTS 2021 Training Dataset with Base model Configurations.
python train.py --num_classes 3 --epochs 350
  • Test : Run the test script on BraTS 2021 Training Dataset.
python test.py --num_classes 3

Acknowledgements

This repository makes liberal use of code from open_brats2020.

References

Citing our work

   @misc{peiris2022reciprocal,
      title={Reciprocal Adversarial Learning for Brain Tumor Segmentation: A Solution to BraTS Challenge 2021 Segmentation Task}, 
      author={Himashi Peiris and Zhaolin Chen and Gary Egan and Mehrtash Harandi},
      year={2022},
      eprint={2201.03777},
      archivePrefix={arXiv},
      primaryClass={eess.IV}
   }
    
You might also like...
 Meli Data Challenge 2021 - First Place Solution
Meli Data Challenge 2021 - First Place Solution

My solution for the Meli Data Challenge 2021

The sixth place winning solution (6/220) in 2021 Gaofen Challenge.
The sixth place winning solution (6/220) in 2021 Gaofen Challenge.

SwinTransformer + OBBDet The sixth place winning solution (6/220) in the track of Fine-grained Object Recognition in High-Resolution Optical Images, 2

Codebase for the solution that won first place and was awarded the most human-like agent in the 2021 NeurIPS Competition MineRL BASALT Challenge.

KAIROS MineRL BASALT Codebase for the solution that won first place and was awarded the most human-like agent in the 2021 NeurIPS Competition MineRL B

1st place solution in CCF BDCI 2021 ULSEG challenge

1st place solution in CCF BDCI 2021 ULSEG challenge This is the source code of the 1st place solution for ultrasound image angioma segmentation task (

Code for 1st place solution in Sleep AI Challenge SNU Hospital
Code for 1st place solution in Sleep AI Challenge SNU Hospital

Sleep AI Challenge SNU Hospital 2021 Code for 1st place solution for Sleep AI Challenge (Note that the code is not fully organized) Refer to the notio

My personal code and solution to the Synacor Challenge from 2012 OSCON.

Synacor OSCON Challenge Solution (2012) This repository contains my code and solution to solve the Synacor OSCON 2012 Challenge. If you are interested

PyTorch Implementation of Small Lesion Segmentation in Brain MRIs with Subpixel Embedding (ORAL, MICCAIW 2021)
PyTorch Implementation of Small Lesion Segmentation in Brain MRIs with Subpixel Embedding (ORAL, MICCAIW 2021)

Small Lesion Segmentation in Brain MRIs with Subpixel Embedding PyTorch implementation of Small Lesion Segmentation in Brain MRIs with Subpixel Embedd

2nd solution of ICDAR 2021 Competition on Scientific Literature Parsing, Task B.
2nd solution of ICDAR 2021 Competition on Scientific Literature Parsing, Task B.

TableMASTER-mmocr Contents About The Project Method Description Dependency Getting Started Prerequisites Installation Usage Data preprocess Train Infe

1st Solution For NeurIPS 2021 Competition on ML4CO Dual Task

KIDA: Knowledge Inheritance in Data Aggregation This project releases our 1st place solution on NeurIPS2021 ML4CO Dual Task. Slide and model weights a

Comments
  • test

    test

    Hello, author, I run according to your test.py. The following problems occur. What is the reason? We look forward to you.

    Working with 1 GPUs invalid literal for int() with base 10: '' using default group number [24, 48, 96, 192] total number of trainable parameters 4793895 Validation Input Directory /input Bench Test dataset number of batch: 1 => loading checkpoint runs/brats_2021/model_1/model_best.pth.tar => loaded checkpoint 'runs/brats_2021/model_1/model_best.pth.tar' (epoch 3) Traceback (most recent call last): File "test.py", line 117, in main(arguments) File "test.py", line 111, in main generate_segmentations(bench_loader, model_1, args) File "test.py", line 40, in generate_segmentations for i, batch in enumerate(data_loader): File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 530, in next data = self._next_data() File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1224, in _next_data return self._process_data(data) File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1250, in _process_data data.reraise() File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/_utils.py", line 457, in reraise raise exception RuntimeError: Caught RuntimeError in DataLoader worker process 0. Original Traceback (most recent call last): File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/worker.py", line 287, in _worker_loop data = fetcher.fetch(index) File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch data = [self.dataset[idx] for idx in possibly_batched_index] File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/utils/data/_utils/fetch.py", line 49, in data = [self.dataset[idx] for idx in possibly_batched_index] File "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/dataset/brats.py", line 39, in getitem patient_image = {key: self.load_nii(_patient[key]) for key in _patient if key not in ["id", "seg"]} File "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/dataset/brats.py", line 39, in patient_image = {key: self.load_nii(_patient[key]) for key in _patient if key not in ["id", "seg"]} File "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/dataset/brats.py", line 67, in load_nii return sitk.GetArrayFromImage(sitk.ReadImage(str(path_folder))) File "/home/hkw/anaconda3/envs/pytorch/lib/python3.7/site-packages/SimpleITK/SimpleITK.py", line 8876, in ReadImage return _SimpleITK.ReadImage(*args) RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK/Code/IO/src/sitkImageReaderBase.cxx:99: sitk::ERROR: The file "/media/hkw/hkwdisk/viv-test/vizviva_brats_2021-main (1)/vizviva_brats_2021-main/BRATS2021/Data/valid/BraTS2021_00046_t1.nii.gz" does not exist.

    opened by H-CODE6 32
  • Couldn't understand how to test on one instance

    Couldn't understand how to test on one instance

    Hello i was trying to implement this model on a small application im having two problems: 1- is there a function that i d give the model and the niftii of one patient or the multiple niftii of one patient and it returns a segmented nifti something like test( OneData,Model) : segmentation or isn't there anything like that in this git. 2- Can this run on cpu only or do i need a gpu

    Thanks in advance Great work

    opened by JustAnotherNerdHeHeHe 8
  • performance

    performance

    Hello, the author, recently reading your vizviva_ Brats_ 2021 code, found in brats_ When validating in the train, add the patient as the above training code_ Image, patient_ Label = pad_ Or_ Crop_ Image (patient_image, patient\u label, target\u size= (128, 128, 128)), I found that the performance decreased a lot. I don't know why.

    opened by H-CODE6 6
  • Pretrained Model

    Pretrained Model

    Hello, first of all, great job. I am trying to use this model and implement it in an app I'm working on. I can't find the pre-trained model if you didn't share it yet is there anyway you can share it with me. My computer isn't strong enough to run the training. Thanks in advance.

    opened by KarikalStrom 2
Owner
Himashi Amanda Peiris
Former Senior Software Engineer at Pearson. Currently a PhD Candidate in Monash University
Himashi Amanda Peiris
This repo provides the official code for TransBTS: Multimodal Brain Tumor Segmentation Using Transformer (https://arxiv.org/pdf/2103.04430.pdf).

TransBTS: Multimodal Brain Tumor Segmentation Using Transformer This repo is the official implementation for TransBTS: Multimodal Brain Tumor Segmenta

Raymond 247 Dec 28, 2022
Cancer-and-Tumor-Detection-Using-Inception-model - In this repo i am gonna show you how i did cancer/tumor detection in lungs using deep neural networks, specifically here the Inception model by google.

Cancer-and-Tumor-Detection-Using-Inception-model In this repo i am gonna show you how i did cancer/tumor detection in lungs using deep neural networks

Deepak Nandwani 1 Jan 1, 2022
Self-supervised Multi-modal Hybrid Fusion Network for Brain Tumor Segmentation

JBHI-Pytorch This repository contains a reference implementation of the algorithms described in our paper "Self-supervised Multi-modal Hybrid Fusion N

FeiyiFANG 5 Dec 13, 2021
TumorInsight is a Brain Tumor Detection and Classification model built using RESNET50 architecture.

A Brain Tumor Detection and Classification Model built using RESNET50 architecture. The model is also deployed as a web application using Flask framework.

Pranav Khurana 0 Aug 17, 2021
VGG16 model-based classification project about brain tumor detection.

Brain-Tumor-Classification-with-MRI VGG16 model-based classification project about brain tumor detection. First, you can check what people are doing o

Atakan Erdoğan 2 Mar 21, 2022
Xview3 solution - XView3 challenge, 2nd place solution

Xview3, 2nd place solution https://iuu.xview.us/ test split aggregate score publ

Selim Seferbekov 24 Nov 23, 2022
Code for A Volumetric Transformer for Accurate 3D Tumor Segmentation

VT-UNet This repo contains the supported pytorch code and configuration files to reproduce 3D medical image segmentaion results of VT-UNet. Environmen

Himashi Amanda Peiris 7 Dec 3, 2021
The 1st place solution of track2 (Vehicle Re-Identification) in the NVIDIA AI City Challenge at CVPR 2021 Workshop.

AICITY2021_Track2_DMT The 1st place solution of track2 (Vehicle Re-Identification) in the NVIDIA AI City Challenge at CVPR 2021 Workshop. Introduction

Hao Luo 91 Dec 21, 2022
Waymo motion prediction challenge 2021: 3rd place solution

Waymo motion prediction challenge 2021: 3rd place solution ?? Technical report ??️ Presentation ?? Announcement ??Motion Prediction Channel Website ??

null 158 Jan 8, 2023
4th place solution for the SIGIR 2021 challenge.

SIGIR-2021 (Tinkoff.AI) How to start Download train and test data: https://sigir-ecom.github.io/data-task.html Place it under sigir-2021/data/. Run py

Tinkoff.AI 4 Jul 1, 2022