Coder Social home page Coder Social logo

jinbang129 / person-segmentation-keras Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tianzhongsong/person-segmentation-keras

0.0 1.0 0.0 1.54 MB

Person segmentation with Keras (SegNet, Unet, etc.)

License: Apache License 2.0

Python 100.00%

person-segmentation-keras's Introduction

Person-Segmentation-Keras

Person segmentation with Keras (SegNet, Unet, etc.)

Dataset

Person segmentation

HumanParsing-Dataset is adopted in this repo.

Origin HumanParsing-Dataset contains 16+1 object classes. But in this repo, i just segment person which is a binary classification task.

I generate new label images by my self, you can download new label imgages at https://pan.baidu.com/s/1Y6bKUznsVc7xNWb9tqWaHA passwd: p8ks

Of course you can generate label images by yourself using convert_labels.py , gen_train_test_list.py.

I use 12706 images of HumanParsing-Dataset as training set, the remaining images as test set.

During training, i resize images with unchanged aspect ratio using padding, for details you can see this script.

Human parsing

Origin HumanParsing-Dataset contains 16+1 object classes.

background     0
hat            1
hair           2 
sunglass       3
upper-clothes  4
skirt          5
pants          6
dress          7
belt           8
left-shoe      9
right-shoe     10
face           11
left-leg       12
right-leg      13
left-arm       14
right-arm      15
bag            16
scarf          17

I have simplified the parsing task. Now it contains 4 + 1 classes.

background     0 (background, bag)
head           1 (hat, hair, sunglass, face, scarf)
upper body     2 (upper-clothes)
both hands     3 (left-arm, right-arm)
lower body     4 (skirt, pants, dress, belt, left-shoe, right-shoe, left-leg, right-leg)

New label images can be downloaded from this link https://pan.baidu.com/s/1jhqpOn8oBmiJiwzohhkfww passwd: gamc

Usage

All models are defined in 'models' directory.

An example for training Unet.

python train_segmentation.py --model='unet'

For visiualsizing the predictions, you can use the follow command

python predict.py --model='unet'

Results

Unet

Person segmentation

mIU: 0.8918

Origin images, ground truth images and predictions.

predictions

Val accuracy during training.

val acc unet

Val loss during training.

val loss unet

Human parsing

Part mIoU
Unet head 0.66476
upper body 0.48639
both hands 0.27016
lower body 0.66536
mean 0.52167

Origin images, ground truth images and predictions.

predictions

SegNet

Todo

Reference

image-segmentation-keras

SegNet-Tutorial

person-segmentation-keras's People

Contributors

tianzhongsong avatar

Watchers

James Cloos 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.