U-Net for GBM

Overview

My Final Year Project(FYP) In National University of Singapore(NUS)

You need

Pytorch(stable 1.9.1) 

Both cuda version and cpu version are OK

File Structure

📦FYP-U-Net
 ┣ 📂data
 ┃ ┣ 📂imgs
 ┃ ┃ ┣ 📌···.tif
 ┃ ┃ ┗ ···
 ┃ ┣ 📂masks
 ┃ ┃ ┣ 📌···_mask.tif
 ┃ ┃ ┗ ···
 ┃ ┣ 📂PredictImage 
 ┃ ┃ ┣ 📌0.tif
 ┃ ┃ ┣ 📌1.tif
 ┃ ┃ ┗ ···
 ┃ ┣ 📂SaveImage
 ┃ ┃ ┣ 📌0.tif
 ┃ ┃ ┣ 📌1.tif
 ┃ ┃ ┗ ···
 ┃ ┗ 📂Source
 ┃ ┃ ┣ 📂TCGA_CS_4941_19960909
 ┃ ┃ ┃ ┣ 📌TCGA_CS_4941_19960909_1.tif
 ┃ ┃ ┃ ┣ 📌TCGA_CS_4941_19960909_1_mask.tif 
 ┃ ┃ ┃ ┣ 📌TCGA_CS_4941_19960909_2.tif
 ┃ ┃ ┃ ┣ 📌TCGA_CS_4941_19960909_2_mask.tif 
 ┃ ┃ ┃ ┗ ···
 ┃ ┃ ┣ 📂TCGA_CS_4942_19970222
 ┃ ┃ ┗ ···
 ┣ 📂params
 ┃ ┗ 📜unet.pth
 ┣ 📓README,md
 ┣ 📄data.py
 ┣ 📄net.py
 ┣ 📄utils.py
 ┗ 📄train.py
  • 'data' dir contains the origin dataset in 'Source' dir. And the dataset can be download in Kaggle (https://www.kaggle.com/c/rsna-miccai-brain-tumor-radiogenomic-classification/). And also you can use different dataset.
  • 'imgs' contains images and 'masks' contains corresponding masks to images. Corresponding masks have a _mask suffix. More inforamtion you can check in kaggle.
  • 'SaveImage' is meant for store train results and 'PredictImage' is meant for store test results.
  • 'params' is meant for store model.

Quick Up

Run train.py

Change DataSet

  • Delte all images in data dir and its subdir.

  • Install dataset from kaggle or anything you like(PS. Corresponding masks must have a _mask suffix) into 'Source' dir

  • Run data.py

    python3 data.py
    

    Remember change the path. After this, you will get images and masks in imgs dir and masks dir.

  • Run train.py

    python3 train.py
    

    Remember change the path. And you can see the results in 'SaveImage' dir and 'PredictImage' dir.

Results

Segment Image

Pre-trained model

https://drive.google.com/file/d/1yyrITv7BQf9kDnP__g6Qa3_wUPD1c_i_/view?usp=sharing

Owner
PinkR1ver
Artist, go with the flow, stay up late
PinkR1ver
Official code for "EagerMOT: 3D Multi-Object Tracking via Sensor Fusion" [ICRA 2021]

EagerMOT: 3D Multi-Object Tracking via Sensor Fusion Read our ICRA 2021 paper here. Check out the 3 minute video for the quick intro or the full prese

Aleksandr Kim 276 Dec 30, 2022
BuildingNet: Learning to Label 3D Buildings

BuildingNet This is the implementation of the BuildingNet architecture described in this paper: Paper: BuildingNet: Learning to Label 3D Buildings Arx

16 Nov 07, 2022
This repo holds code for TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation

TransUNet This repo holds code for TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation Usage

1.4k Jan 04, 2023
MILK: Machine Learning Toolkit

MILK: MACHINE LEARNING TOOLKIT Machine Learning in Python Milk is a machine learning toolkit in Python. Its focus is on supervised classification with

Luis Pedro Coelho 610 Dec 14, 2022
Pytorch Implementation of Spiking Neural Networks Calibration, ICML 2021

SNN_Calibration Pytorch Implementation of Spiking Neural Networks Calibration, ICML 2021 Feature Comparison of SNN calibration: Features SNN Direct Tr

Yuhang Li 60 Dec 27, 2022
Deep learning models for change detection of remote sensing images

Change Detection Models (Remote Sensing) Python library with Neural Networks for Change Detection based on PyTorch. âš¡ âš¡ âš¡ I am trying to build this pr

Kaiyu Li 176 Dec 24, 2022
NAACL2021 - COIL Contextualized Lexical Retriever

COIL Repo for our NAACL paper, COIL: Revisit Exact Lexical Match in Information Retrieval with Contextualized Inverted List. The code covers learning

Luyu Gao 108 Dec 31, 2022
Code of paper "Compositionally Generalizable 3D Structure Prediction"

Compositionally Generalizable 3D Structure Prediction In this work, We bring in the concept of compositional generalizability and factorizes the 3D sh

Songfang Han 30 Dec 17, 2022
FIGARO: Generating Symbolic Music with Fine-Grained Artistic Control

FIGARO: Generating Symbolic Music with Fine-Grained Artistic Control by Dimitri von Rütte, Luca Biggio, Yannic Kilcher, Thomas Hofmann FIGARO: Generat

Dimitri 83 Jan 07, 2023
Code to reproduce the results for Compositional Attention

Compositional-Attention This repository contains the official implementation for the paper Compositional Attention: Disentangling Search and Retrieval

Sarthak Mittal 58 Nov 30, 2022
AVD Quickstart Containerlab

AVD Quickstart Containerlab WARNING This repository is still under construction. It's fully functional, but has number of limitations. For example: RE

Carl Buchmann 3 Apr 10, 2022
Weakly Supervised End-to-End Learning (NeurIPS 2021)

WeaSEL: Weakly Supervised End-to-end Learning This is a PyTorch-Lightning-based framework, based on our End-to-End Weak Supervision paper (NeurIPS 202

Auton Lab, Carnegie Mellon University 131 Jan 06, 2023
Phonetic PosteriorGram (PPG)-Based Voice Conversion (VC)

ppg-vc Phonetic PosteriorGram (PPG)-Based Voice Conversion (VC) This repo implements different kinds of PPG-based VC models. Pretrained models. More m

Liu Songxiang 227 Dec 28, 2022
PanopticBEV - Bird's-Eye-View Panoptic Segmentation Using Monocular Frontal View Images

Bird's-Eye-View Panoptic Segmentation Using Monocular Frontal View Images This r

63 Dec 16, 2022
Space Invaders For Python

Space-Invaders Just download or clone the git repository. To run the Space Invader game you need to have pyhton installed in you system. If you dont h

Fei 5 Jul 27, 2022
SiT: Self-supervised vIsion Transformer

This repository contains the official PyTorch self-supervised pretraining, finetuning, and evaluation codes for SiT (Self-supervised image Transformer).

Sara Ahmed 275 Dec 28, 2022
MOOSE (Multi-organ objective segmentation) a data-centric AI solution that generates multilabel organ segmentations to facilitate systemic TB whole-person research

MOOSE (Multi-organ objective segmentation) a data-centric AI solution that generates multilabel organ segmentations to facilitate systemic TB whole-person research.The pipeline is based on nn-UNet an

QIMP team 30 Jan 01, 2023
On the Adversarial Robustness of Visual Transformer

On the Adversarial Robustness of Visual Transformer Code for our paper "On the Adversarial Robustness of Visual Transformers"

Rulin Shao 35 Dec 14, 2022
Earthquake detection via fiber optic cables using deep learning

Earthquake detection via fiber optic cables using deep learning Author: Fantine Huot Getting started Update the submodules After cloning the repositor

Fantine 4 Nov 30, 2022
PyTorch version of Stable Baselines, reliable implementations of reinforcement learning algorithms.

PyTorch version of Stable Baselines, reliable implementations of reinforcement learning algorithms.

DLR-RM 4.7k Jan 01, 2023