GithubHelp home page GithubHelp logo

hejun888 / unet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wuyang0329/unet

0.0 0.0 0.0 95.65 MB

this is a simple demo for image segmentation.----unet网络进行语义分割的demo,用的数据集是KITTI

Python 100.00%

unet's Introduction

unet

Keras implementation of unet.

Data

You can download:

Kitti dataset from here:http://www.cvlibs.net/download.php?file=data_road.zip

CamVid dataset from here:https://github.com/preddy5/segnet/tree/master/CamVid

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. image/test.png image/test_predict.png

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. image/camvid.png image/camvid_predict.png

and the loss and accuracy curve in there: image/acc&loss.png

Then you also can use label_visualization.py to visual your resut like this: image/mask.png

About

Unet is More commonly used in medical areas.

Reference

https://github.com/zhixuhao/unet

unet's People

Contributors

wuyang0329 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.