Coder Social home page Coder Social logo

Cityscapes inference about efficientps HOT 2 CLOSED

deepsceneseg avatar deepsceneseg commented on August 17, 2024
Cityscapes inference

from efficientps.

Comments (2)

mohan1914 avatar mohan1914 commented on August 17, 2024

-Ln 49 and 50 define the color palette in tools/cityscapes_save_predictions.py which is defined for the 18 (stuff and thing classes). You will have to first define a color palette of maybe 256 (or even 30 should be enough depending on the image or you can run np.unique to find the total number of instances+stuff_classes pan_pred has)

-remove lines from 70-71 to 75-83 and 86
modify ln 72 and 73 as
pan_pred = pan_pred.numpy()
panoptic_col[pan_pred==0] = colors.shape[0] - 1
panoptic_col = Image.fromarray(colors[panoptic_col])
(assuming the colors array last row stores the void pixel color)

-replace sem_img with panoptic_col in Ln 85 with panoptic_col

from efficientps.

gmvincent avatar gmvincent commented on August 17, 2024

@mohan1914 Do you have suggestions on how to properly define the palette?

from efficientps.

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.