랭킹으로 돌아가기

zhixuhao/unet

Jupyter Notebook

unet for image segmentation

unetkerassegmentation
스타 성장
스타
4.9k
포크
2k
주간 성장
이슈
196
2k4k
2017년 4월2020년 5월2023년 6월2026년 7월
README

Implementation of deep learning framework -- Unet, using Keras

The architecture was inspired by U-Net: Convolutional Networks for Biomedical Image Segmentation.


Overview

Data

The original dataset is from isbi challenge, and I've downloaded it and done the pre-processing.

You can find it in folder data/membrane.

Data augmentation

The data for training contains 30 512*512 images, which are far not enough to feed a deep learning neural network. I use a module called ImageDataGenerator in keras.preprocessing.image to do data augmentation.

See dataPrepare.ipynb and data.py for detail.

Model

img/u-net-architecture.png

This deep neural network is implemented with Keras functional API, which makes it extremely easy to experiment with different interesting architectures.

Output from the network is a 512*512 which represents mask that should be learned. Sigmoid activation function makes sure that mask pixels are in [0, 1] range.

Training

The model is trained for 5 epochs.

After 5 epochs, calculated accuracy is about 0.97.

Loss function for the training is basically just a binary crossentropy.


How to use

Dependencies

This tutorial depends on the following libraries:

  • Tensorflow
  • Keras >= 1.0

Also, this code should be compatible with Python versions 2.7-3.5.

Run main.py

You will see the predicted results of test image in data/membrane/test

Or follow notebook trainUnet

Results

Use the trained model to do segmentation on test images, the result is statisfactory.

img/0test.png

img/0label.png

About Keras

Keras is a minimalist, highly modular neural networks library, written in Python and capable of running on top of either TensorFlow or Theano. It was developed with a focus on enabling fast experimentation. Being able to go from idea to result with the least possible delay is key to doing good research.

Use Keras if you need a deep learning library that:

allows for easy and fast prototyping (through total modularity, minimalism, and extensibility). supports both convolutional networks and recurrent networks, as well as combinations of the two. supports arbitrary connectivity schemes (including multi-input and multi-output training). runs seamlessly on CPU and GPU. Read the documentation Keras.io

Keras is compatible with: Python 2.7-3.5.

관련 저장소
Zeyi-Lin/HivisionIDPhotos

⚡️HivisionIDPhotos: a lightweight and efficient AI ID photos tools. 一个轻量级的AI证件照制作算法。

PythonPyPIApache License 2.0demogradio
modelscope.cn/studios/SwanLab/HivisionIDPhotos
21.3k2.4k
qubvel-org/segmentation_models.pytorch

Semantic segmentation models with 500+ pretrained convolutional and transformer-based backbones.

PythonPyPIMIT Licensesegmentationimage-processing
smp.readthedocs.io
11.7k1.8k
milesial/Pytorch-UNet

PyTorch implementation of the U-Net for image semantic segmentation with high quality images

PythonPyPIGNU General Public License v3.0pytorchunet
11.6k2.8k
MirrorNetworking/Mirror

#1 Open Source Unity Networking Library

C#MIT Licenseunityunet
mirror-networking.com
6.3k860
qubvel/segmentation_models

Segmentation models with pretrained backbones. Keras and TensorFlow Keras.

PythonPyPIMIT Licenseunetfpn
4.9k1k
MrGiovanni/UNetPlusPlus

[IEEE TMI Best Paper Award] Official Implementation for UNet++

PythonPyPIOthermedical-imagingsegmentation
2.7k570
ShawnBIT/UNet-family

Paper and implementation of UNet-related model.

PythonPyPIsegmentationunet
2.6k499
wolny/pytorch-3dunet

3D U-Net model for volumetric semantic segmentation written in pytorch

Jupyter NotebookMIT Licensesemantic-segmentationunet
2.4k564
bigmb/Unet-Segmentation-Pytorch-Nest-of-Unets

Implementation of different kinds of Unet Models for Image Segmentation - Unet , RCNN-Unet, Attention Unet, RCNN-Attention Unet, Nested Unet

PythonPyPIMIT Licenseunetpytorch
2.2k365
black0017/MedicalZooPytorch

A pytorch-based deep learning framework for multi-modal 2D/3D medical image segmentation

PythonPyPIMIT Licensesegmentationdeep-learning
1.9k306
yeyun111/dlcv_for_beginners

《深度学习与计算机视觉》配套代码

PythonPyPIBSD 3-Clause "New" or "Revised" Licensecomputer-visionbook
frombeijingwithlove.github.io/dlcv_for_beginners/
1.5k630
The-AI-Summer/Deep-Learning-In-Production

Build, train, deploy, scale and maintain deep learning models. Understand ML infrastructure and MLOps using hands-on examples.

Jupyter Notebookmachine-learningproduction
amzn.to/3oa50Vj
1.3k266