Giter VIP home page Giter VIP logo

deeplabv3-tf2.0's Introduction

DeeplabV3-tf2.0

This project implements the SOTA image segmentation algorithm deeplab V3+ with tensorflow2

dataset preparation

download COCO2017 dataset from here. unzip directory train2017, val2017 and annotations. generate dataset with the following command.

python3 create_dataset.py </path/to/train2017> </path/to/val2017> </path/to/annotations>

upon executing the script successfully, there will directory trainset and testset generated under the root directory of the source code.

train with dataset

train with multiple GPU with executing command

python3 train_eager_distributed.py

train with single GPU with executing command

python3 train_eager.py

or

python3 train_keras.py

save model

save model with command

python3 save_model.py

experimental results

here are some results of my model which can be downloaded here, pass code is nh9u. note that "bad marshal data (unknown type code)" error occurs when you load the model file deeplabv3plus.h5 with python3.7 or above version. the model is saved with python 3.6.9. you can load weights file deeplabv3plus_weights.h5 with any version of python.

Loss
train loss
train accuracy

Segmentation results

the result is not perfect. I just use the pretrained Resnet for other purpose. if you want to use deeplabv3+ seriously. you are welcome to tune the model base on this project.

how to predict with the pretrained model

segment your image with the following command

python3 test.py </path/to/image>

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.