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
A implemetation of the LRCN in mxnet

A implemetation of the LRCN in mxnet ##Abstract LRCN is a combination of CNN and RNN ##Installation Download UCF101 dataset ./avi2jpg.sh to split the

44 Aug 25, 2022
3D-aware GANs based on NeRF (arXiv).

CIPS-3D This repository will contain the code of the paper, CIPS-3D: A 3D-Aware Generator of GANs Based on Conditionally-Independent Pixel Synthesis.

Peterou 563 Dec 31, 2022
Official PyTorch implementation of the paper "Recycling Discriminator: Towards Opinion-Unaware Image Quality Assessment Using Wasserstein GAN", accepted to ACM MM 2021 BNI Track.

RecycleD Official PyTorch implementation of the paper "Recycling Discriminator: Towards Opinion-Unaware Image Quality Assessment Using Wasserstein GAN

Yunan Zhu 23 Nov 05, 2022
Python scripts performing class agnostic object localization using the Object Localization Network model in ONNX.

ONNX Object Localization Network Python scripts performing class agnostic object localization using the Object Localization Network model in ONNX. Ori

Ibai Gorordo 15 Oct 14, 2022
Joint project of the duo Hacker Ninjas

Project Smoothie Společný projekt dua Hacker Ninjas. První pokus o hříčku po třech týdnech učení se programování. Jakub Kolář e:\

Jakub Kolář 2 Jan 07, 2022
Good Semi-Supervised Learning That Requires a Bad GAN

Good Semi-Supervised Learning that Requires a Bad GAN This is the code we used in our paper Good Semi-supervised Learning that Requires a Bad GAN Ziha

Zhilin Yang 177 Dec 12, 2022
Revisiting Temporal Alignment for Video Restoration

Revisiting Temporal Alignment for Video Restoration [arXiv] Kun Zhou, Wenbo Li, Liying Lu, Xiaoguang Han, Jiangbo Lu We provide our results at Google

52 Dec 25, 2022
source code for 'Finding Valid Adjustments under Non-ignorability with Minimal DAG Knowledge' by A. Shah, K. Shanmugam, K. Ahuja

Source code for "Finding Valid Adjustments under Non-ignorability with Minimal DAG Knowledge" Reference: Abhin Shah, Karthikeyan Shanmugam, Kartik Ahu

Abhin Shah 1 Jun 03, 2022
ICCV2021 Papers with Code

ICCV2021 Papers with Code

Amusi 1.4k Jan 02, 2023
The source code for the Cutoff data augmentation approach proposed in this paper: "A Simple but Tough-to-Beat Data Augmentation Approach for Natural Language Understanding and Generation".

Cutoff: A Simple Data Augmentation Approach for Natural Language This repository contains source code necessary to reproduce the results presented in

Dinghan Shen 49 Dec 22, 2022
The official PyTorch implementation of Curriculum by Smoothing (NeurIPS 2020, Spotlight).

Curriculum by Smoothing (NeurIPS 2020) The official PyTorch implementation of Curriculum by Smoothing (NeurIPS 2020, Spotlight). For any questions reg

PAIR Lab 36 Nov 23, 2022
RITA is a family of autoregressive protein models, developed by LightOn in collaboration with the OATML group at Oxford and the Debora Marks Lab at Harvard.

RITA: a Study on Scaling Up Generative Protein Sequence Models RITA is a family of autoregressive protein models, developed by a collaboration of Ligh

LightOn 69 Dec 22, 2022
An official repository for Paper "Uformer: A General U-Shaped Transformer for Image Restoration".

Uformer: A General U-Shaped Transformer for Image Restoration Zhendong Wang, Xiaodong Cun, Jianmin Bao and Jianzhuang Liu Paper: https://arxiv.org/abs

Zhendong Wang 497 Dec 22, 2022
[CVPR 2021] Official PyTorch Implementation for "Iterative Filter Adaptive Network for Single Image Defocus Deblurring"

IFAN: Iterative Filter Adaptive Network for Single Image Defocus Deblurring Checkout for the demo (GUI/Google Colab)! The GUI version might occasional

Junyong Lee 173 Dec 30, 2022
A collection of resources on GAN Inversion.

This repo is a collection of resources on GAN inversion, as a supplement for our survey

Python Auto-ML Package for Tabular Datasets

Tabular-AutoML AutoML Package for tabular datasets Tabular dataset tuning is now hassle free! Run one liner command and get best tuning and processed

Sagnik Roy 18 Nov 20, 2022
Library for implementing reservoir computing models (echo state networks) for multivariate time series classification and clustering.

Framework overview This library allows to quickly implement different architectures based on Reservoir Computing (the family of approaches popularized

Filippo Bianchi 249 Dec 21, 2022
Python tools for 3D face: 3DMM, Mesh processing(transform, camera, light, render), 3D face representations.

face3d: Python tools for processing 3D face Introduction This project implements some basic functions related to 3D faces. You can use this to process

Yao Feng 2.3k Dec 30, 2022
piSTAR Lab is a modular platform built to make AI experimentation accessible and fun. (pistar.ai)

piSTAR Lab WARNING: This is an early release. Overview piSTAR Lab is a modular deep reinforcement learning platform built to make AI experimentation a

piSTAR Lab 0 Aug 01, 2022
This is the implementation of the paper "Self-supervised Outdoor Scene Relighting"

Self-supervised Outdoor Scene Relighting This is the implementation of the paper "Self-supervised Outdoor Scene Relighting". The model is implemented

Ye Yu 24 Dec 17, 2022