unet网络python代码详解_unet-demo

unet

Keras implementation of unet.

Data

You can download:

How to use

Requirement

OpenCV

Python 3.6

Tensorflow-gpu-1.8.0

Keras-2.2.4

train and test

Before you start training, you must make sure your dataset have the right format

If you just two classes to classify, you should set flag_multi_class equal to False and num_class=2

if you have many classes to classify, you should set flag_multi_class equal to True and num_class=number of your classes

Then you should set image type , image_color_mode and label_color_mode.

change the data path and run the train.py to train you own model and test.py to predict the test images

Results

The binary classify model is trained for 30 epochs(300 step per epoch) in Kitti dataset.

After 30 epochs, calculated accuracy is about 0.989, the loss is about 0.02

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

The multi classify model is trained for 30 epochs(300 step per epoch) in Camvid dataset.

After 30 epochs, calculated valid accuracy is about 0.768, the loss is about 1.43

Loss function for the training is categorical_crossentropy.

and the loss and accuracy curve in there:

Then you also can use label_visualization.py to visual your resut like this:

About

Unet is More commonly used in medical areas.

Reference

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值