# Implementation of deep learning framework -- Unet, using Keras
The architecture was inspired by [U-Net: Convolutional Networks for Biomedical Image Segmentation](http://lmb.informatik.uni-freiburg.de/people/ronneber/u-net/).
---
## Overview
### Data
The original dataset is from [isbi challenge](http://brainiac2.mit.edu/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](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/0test.png)
![img/0label.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](http://keras.io/)
Keras is compatible with: Python 2.7-3.5.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
发表SegNet网络的论文为:Badrinarayanan V, Kendall A, Cipolla R.SegNet: A Deep Convolutional Encoder-Decoder Architecture for SceneSegmentation[J]. IEEE Transactions on Pattern Analysis & MachineIntelligence, 2017, PP(99):1-1。 来源于美国加州大学伯克利分校的这项工作为语义分割引入了端到端的全卷积网络,在构建的网络结构中,重新利用ImageNet的预训练网络用于语义分割,并使用了反卷积层进行上采样并且引入跳跃连接来改善上采样粗糙的像素定位。
资源推荐
资源详情
资源评论
收起资源包目录
图像语义分割网络:SegNet (252个子文件)
trainUnet.ipynb 10KB
dataPrepare.ipynb 4KB
README.md 2KB
0test.png 391KB
21.png 218KB
23.png 218KB
24.png 218KB
28.png 218KB
25.png 216KB
29.png 216KB
26.png 215KB
15.png 215KB
7.png 215KB
27.png 214KB
22.png 214KB
19.png 213KB
12.png 213KB
18.png 213KB
17.png 213KB
13.png 212KB
10.png 211KB
16.png 211KB
14.png 211KB
20.png 211KB
25.png 210KB
0.png 210KB
15.png 208KB
1.png 208KB
11.png 207KB
6.png 207KB
21.png 207KB
4.png 206KB
5.png 206KB
18.png 206KB
9.png 206KB
16.png 206KB
17.png 206KB
29.png 205KB
24.png 205KB
19.png 204KB
26.png 204KB
20.png 204KB
3.png 204KB
22.png 203KB
2.png 203KB
28.png 203KB
8.png 203KB
27.png 202KB
23.png 202KB
6.png 188KB
9.png 185KB
4.png 185KB
10.png 185KB
2.png 185KB
13.png 184KB
1.png 184KB
14.png 184KB
3.png 184KB
0.png 183KB
12.png 182KB
11.png 181KB
5.png 179KB
7.png 177KB
0label.png 175KB
8.png 174KB
18_predict.png 61KB
image_16_7404918.png 60KB
image_16_9397072.png 60KB
image_14_8620165.png 60KB
image_14_3602105.png 60KB
image_17_3911616.png 60KB
image_17_5677330.png 60KB
image_21_8506147.png 60KB
image_21_3732585.png 60KB
image_18_7670894.png 60KB
image_18_1533065.png 60KB
image_22_1880892.png 59KB
image_22_2808126.png 59KB
image_7_9599882.png 59KB
image_7_236371.png 59KB
24_predict.png 59KB
image_19_5366147.png 59KB
image_19_2043583.png 59KB
image_20_3601991.png 59KB
image_20_7053067.png 59KB
image_15_7797249.png 59KB
image_15_7856748.png 59KB
image_10_4725015.png 59KB
image_10_6658724.png 59KB
image_9_6936014.png 59KB
image_9_7535981.png 59KB
image_11_9762238.png 59KB
image_11_7305766.png 59KB
11_predict.png 59KB
23_predict.png 58KB
image_8_3936874.png 58KB
image_8_4974953.png 58KB
image_13_3027714.png 58KB
image_13_8372481.png 58KB
12_predict.png 57KB
共 252 条
- 1
- 2
- 3
资源评论
huyiqun6
- 粉丝: 1
- 资源: 40
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功