项目作者: clemkoa

项目描述 :
Simple pytorch implementation of the u-net model for image segmentation
高级语言: Python
项目地址: git://github.com/clemkoa/u-net.git
创建时间: 2019-06-30T21:12:05Z
项目社区:https://github.com/clemkoa/u-net

开源协议:MIT License

下载


U-net

A simple pytorch implementation of U-net, as described in the paper: https://arxiv.org/abs/1505.04597

Output image 1

This project is meant to be a dead-simple implementation of the model.
The only dependencies are pytorch, numpy and pillow.

The main differences with the paper are:

  • no padding in the pooling, which makes handling dimensions easier
  • no weight balancing in the softmax to deal with class inbalance

Example dataset

The example dataset is from the ISBI Challenge. More information here: http://brainiac2.mit.edu/isbi_challenge/.

A few outputs from the test dataset, after 300 iterations:

Output image 2

Output image 3

Download and put the files in the data directory. It should be like this:

  1. data
  2. ├── test-volume.tif
  3. ├── train-labels.tif
  4. └── train-volume.tif

Installation

  1. pip install torch numpy pillow
  2. mkdir model

Training

  1. python train.py

Prediction on test dataset

  1. python predict.py

Bibliography: