Giter Site home page Giter Site logo

Comments (4)

DrSleep avatar DrSleep commented on July 18, 2024

https://github.com/DrSleep/light-weight-refinenet/blob/master/utils/cmap.npy is the colourmap I am using

If you want to see the network's outputs before colouring, simply comment out segm = cmap[segm.argmax(axis=2).astype(np.uint8)] in the notebook

from light-weight-refinenet.

hyclover avatar hyclover commented on July 18, 2024

I recently loaded the cmap.npy through numpy tool. I found that it was an array of form (256,3). However, should it be an array of form (40, 3) since it is the colourmap ? I am curious about what "256" means ?

from light-weight-refinenet.

DrSleep avatar DrSleep commented on July 18, 2024

256 just means that there are 256 different colours available.
the NYUD colours only use the first 40 values; VOC -- 20 and etc.

what happens is the network predicts indices from 0 to num_classes, then each predicted index is replaced by a corresponding RGB vector from the cmap file; say, your network predicted indices [2, 3, 1] and the colourmap is [[0, 0, 0], [0, 0, 1], [0, 0, 2], [0, 0, 3]], then the output would be [[0, 0, 2], [0, 0, 3], [0, 0, 1]]

hope that makes it clearer

from light-weight-refinenet.

Frozenheart1998 avatar Frozenheart1998 commented on July 18, 2024

Thank you for your helping!

from light-weight-refinenet.

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.