Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting segmentation mask and class name predictions for ADE20k inference #31

Closed
jin-zhe opened this issue Apr 9, 2018 · 3 comments
Closed

Comments

@jin-zhe
Copy link

jin-zhe commented Apr 9, 2018

Hi I'm running inference based on the model trained on ADE20K dataset and I would like to:
(1) Derive the segmentation mask. i.e. matrix with same rows x cols as image but each cell reflected the class id prediction for the pixel
(2) Get the corresponding ADE20K class name given a class id

@jin-zhe
Copy link
Author

jin-zhe commented Apr 9, 2018

I found my answer here: https://github.com/CSAILVision/sceneparsing

@jin-zhe jin-zhe closed this as completed Apr 9, 2018
@shadydiaa
Copy link

but this coded in maltab can you share the code in python to get mask and class name , Thanks
@jin-zhe

@jin-zhe
Copy link
Author

jin-zhe commented May 2, 2018

Hey @shadydiaa

  • To get mask, at line 111 of inference.py, simply do seg_map = sess.run(raw_output_up)
  • For class names, you just have to look at objectInfo150 in the repo which comes in .txt, .csv, and .mat (any one will do). There's no need for matlab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants