Code Monkey home page Code Monkey logo

instance-segmentation-with-discriminative-loss's Introduction

Instance-Segmentation-with-Discriminative-Loss

This code is pytorch implementation of Semantic Instance Segmentation with a Discriminative Loss Function (https://arxiv.org/abs/1708.02551) with CVPPP-2017 Dataset (https://www.plant-phenotyping.org/CVPPP2017)

I slightly updated and revised the code of https://github.com/Wizaron/instance-segmentation-pytorch which does not match with python3. The updated content is as follows.

  • compatibility with python3

  • revised the dataset which does not use lmdb

  • added other networks (UNet, UNet with CBAM, DeepLabV3)

    • unfortunately semantic & instance segmentation result of DeepLabV3 are very bad
  • ReSeg with CoordConv(with r) is possible

My paper 'Leaf Instance Segmentation with Attention Based U-Net & Discriminative Loss' which utilizes this code was submitted for participation at 'Summer Annual conference of IEIE, 2022 (https://conf.theieie.org/2022s/)'


Notification

  • You should execute python -m visdom.server before training

  • train3.py -> pred_list2.py -> evaluation.ipynb

  • I couldn't solve the error of training Stacked Recurrent Hourglass. The training does not proceed from 2 epochs due to errors in the back-propagation process.

  • Updated(23/06/19)

    • If you use the latest version of pytorch (torch==2.1.1+cu121), please use train3_update.py & model_update.py instead of train3.py & model.py
      • .next() method was deprecated (line 257 of model.py)

UNet-CBAM

CBAM (Convolutional Block Attention Module)

image

Architecture

image

  • Instance Counter : predicts normalized # of leaf instances
  • Semantic Head : predicts semantic mask (f.g / b.g)
  • Instance Head : predicts 32 dims embedding space which has to be clustered by K-Means

Results

CVPPP

Scores on validation subset (28 images)

Model Loss Mean SBD Mean FG Dice Dic
ReSeg 0.1425 0.8599 0.9669 0.7143
SegNet 0.1295 0.8645 0.9695 0.6071
UNet 0.1137 0.8656 0.9703 0.5713
UNet-CBAM 0.1031 0.8813 0.9708 0.7143

Sample Predictions (UNet-CBAM)

input / pred / GT

image

image

image


References

ReNet (used in ReSeg) : https://arxiv.org/abs/1505.00393

ReSeg : https://arxiv.org/abs/1511.07053

SegNet : https://arxiv.org/pdf/1511.00561.pdf

CBAM (Convolutional Block Attention Module) : https://arxiv.org/abs/1807.06521

instance-segmentation-with-discriminative-loss's People

Contributors

gymoon10 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

instance-segmentation-with-discriminative-loss's Issues

Environment

Hi, great work!
¿Is there anywhere I could look up the environment requirements or dependencies to run the code?

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.