GithubHelp home page GithubHelp logo

Comments (4)

sebastian-woessner avatar sebastian-woessner commented on June 23, 2024 3

Thank you for your response,

To be clear, the issue that I originally posted is currently not hindering me since I applied the fixes that I proposed above. I opened this issue to highlight 2 problems/bugs which might come up when a semantic-only dataset is used.
The code requires the semantic label to be encoded as a one-channel image and that panoptic_label_divisor is set to 1, unless the label is multiplied by panoptic_label_divisor during encoding. Users who encode the labels as RGB images will run into a β€œsilent” bug.
I am closing the issue since this is not a bug in the code but rather a matter of usage.

from deeplab2.

markweberdev avatar markweberdev commented on June 23, 2024

Thanks Sebastian for your comment! We do not regularly use semantic segmentation, so we're always looking for feedback!

Regarding your 2nd issue, I'd recommend to use a panoptic_label_divisor of 1, if you don't want to rescale your labels. This way, we make sure that there are no other side-effects in the code.

Regarding your 1st issue: Could you provide some more information on how you encoded the labels into tfrecords? If my understanding is correct, the issue is that you encode the image as a 3 channel image, but it's read out as 1 channel which leads to issues?

Best,
Mark

from deeplab2.

sebastian-woessner avatar sebastian-woessner commented on June 23, 2024

Regarding the 1st issue:
I encoded the images as 3 channel images. The problem is that setting channels=1 as arg for tf.io.decode_image() controls the number of channels after decoding rather than the expected number of channels of the input. Thus, a 3 channel image is converted to a 1 channel grayscale image. This leads to an error if users follow the standard practice of encoding images as 3 channel images as in data/build_cityscapes_data.py.
Regarding the 2nd issue:
I agree that setting panoptic_label_divisor to 1 is the best solution. However, the code block before requires panoptic_label_divisor to be greater than 1 if ignore_label is greater than 1.

from deeplab2.

aquariusjay avatar aquariusjay commented on June 23, 2024

Hi @sebastian-woessner,

Thank you for reporting the issue.
Most of our codes assume panoptic label format (panoptic = semantic * label_divisor + instance).
As a quick workaround for training pure semantic segmentation datasets, you could (1) set panptic_label_divisor to be a large value (say 1000), which should be compatible with ignore_label 255 (assume you are using PASCAL or Cityscapes), and (2) encode instance identity 0 when converting the dataset.

Cheers,

from deeplab2.

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.