GithubHelp home page GithubHelp logo

nikhilroxtomar / human-image-segmentation-with-deeplabv3plus-in-tensorflow Goto Github PK

View Code? Open in Web Editor NEW
54.0 1.0 20.0 44.47 MB

DeepLabV3+ with squeeze and excitation network for human image segmentation in TensorFlow 2.5.0

Python 100.00%
tensorflow unet deeplab-v3-plus deeplabv3 human-image-segmentation people-segmentation semantic-segmentation image-segmentation-tensorflow

human-image-segmentation-with-deeplabv3plus-in-tensorflow's Introduction

Human Image Segmentation with DeepLabV3+ in TensorFlow

DeepLabV3+ with squeeze and excitation network for human image segmentation in TensorFlow 2.5.0

Watch the YouTube video for better explaination: https://youtu.be/4LhUpCWBzT8

Dataset

Download the dataset: Person Segmentation

Weight file

Download the weight files from here: model.h5

Quantitative results

These results are on the validation/test set.

Accuacy F1 Jaccard Recall Precision
0.97404 0.95379 0.92124 0.95885 0.95683

Qualtiative results

These qualitative results are on the validation/test set. The figure consists of a) Input Image b) Ground Truth Mask c) Predicted Mask d) Masked Image

These qualitative results are on random images taken from https://wallpapercave.com. The figure consists of a) Input Image b) Masked Image.

Contact

For any query contact below:

human-image-segmentation-with-deeplabv3plus-in-tensorflow's People

Contributors

marouaneman avatar nikhilroxtomar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

human-image-segmentation-with-deeplabv3plus-in-tensorflow's Issues

Model does not converge

I tried to run your code base but after a few epochs the loss stops decreasing and the precision stops increasing.
I'm stuck at
loss: 0.6718 - dice_coef: 0.4866 - iou: 0.3382 - recall: 0.6190 - precision: 0.5947

Could you check if you can spot the bug ? after a few hours of digging i couldn't success.

I used the same dataset as you mentioned in the Youtube video.

Thank you.

model parameters and inference time

Hi,
Thanks for providing this code. Have you calculated your model parameters and inference time? Inference time means how long it take to predict the image. Kindly let me know about these as soon as possible.

Adaptation to Multiclass Segmentation

Hi! I hope to leave a public record here to help others that are struggling to convert binary semantic segmentation code to multi-class semantic segmentation code. I reached out to you and have done other research as to how to go about adapting your code and I have come to the conclusion that I must change the deeplabv3_plus function definition's last four lines of code to be this

x = Conv2D(4,(1, 1))(x) ## 4 is the number of classes
x = Activation("softmax")(x) ## The activation function has been changed from sigmoid to softmax
model = Model(inputs, x)
return model

Then the loss function must be changed as well, I found recommendations to change it to CrossEntropyLoss. The adaptation occurs in the train.py file on line 99

criterion = torch.nn.CrossEntropyLoss()
model.compile(loss=dice_loss, optimizer=Adam(lr), metrics=[dice_coef, iou, Recall(), Precision()])

I believe the metrics must be changed also to Jaccard Score (IOU), and Dice Score.

I am receiving errors such as shapes being incorrect once I attempt to train the model and I am not sure what tensor object to insert in the loss function. If there is any advice you can give that'd be much appreciated. I know by myself and many others. Thanks!

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.