Skip to content

yuta-hi/keras_bayesian_unet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bayesian U-Net for Keras

This is a Keras re-implementation for Bayesian U-Net

Currently, this repository only supports epistemic uncertainty...

Requirements

  • Python 3
  • CPU or NVIDIA GPU + CUDA CuDNN
  • Keras and TensorFlow

Installation

  • Install from this repository
git clone https://github.com/yuta-hi/keras_bayesian_unet
cd keras_bayesian_unet
pip install .

Usage

  • Bayesian U-Net
# 2D
from keras_bcnn.models import BayesianUNet2D
input_shape = (512, 512, 1)
output_channles = 23
model = BayesianUNet2D(input_shape, output_channles).build()

# 3D
from keras_bcnn.models import BayesianUNet3D
input_shape = (128, 128, 128, 1)
output_channles = 23
model = BayesianUNet3D(input_shape, output_channles).build()
  • MC sampler
from keras_bcnn.models import MCSampler
mc_iteration = 10
sampler = MCSampler(model, mc_iteration).build()

Related repositories

Releases

No releases published

Packages

No packages published

Languages