Code Monkey home page Code Monkey logo

Comments (5)

davidtvs avatar davidtvs commented on June 7, 2024

Sorry for the late reply. Somehow I never noticed your issue until now.

Yes, your understanding is correct, the unlabeled class is ignored by setting its weight to 0. Does the same problem happen with training images? i.e. with a trained model, if you run inference on the training images do you see the same issues?

from pytorch-enet.

 avatar commented on June 7, 2024

yep, it seems to be the same..I tried two version, one is to set unlabeled class to have weight 0, the other one is include unlabeled class during training.. but both seem to have this problem..I couldn't come up with any idea why this happened because my pole class is 2, sign class is 6, they are not either first number or the last number...

from pytorch-enet.

davidtvs avatar davidtvs commented on June 7, 2024

After looking into this a bit more, seems that you are right.
figure_1
The top row of images are ground-truth labels and the bottom row are the predictions. The model is indeed making predictions for unlabeled pixels.

from pytorch-enet.

davidtvs avatar davidtvs commented on June 7, 2024

Apparently, this behaviour is expected. After looking at the author's implementation of ENet and other segmentation networks my conclusion is that there is no way to stop the network from predicting a class for the unlabeled pixels. Those pixels are simply ignored when computing metrics, but a prediction is always made.

I have pushed a few changes to the IoU metric that add an additional argument (ignore_index) which allows for a class to be ignored when computing metrics.

If you want unlabeled pixels to be predicted as unlabeled, use the flag --with-unlabeled. @wzhouuu make sure you are using the current version of this repository as the old flag (--ignore_unlabeled) had no effect.

from pytorch-enet.

 avatar commented on June 7, 2024

Thanks for the update!

from pytorch-enet.

Related Issues (20)

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.