Comments (4)
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.
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.
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.
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)
- Unstable numeric output for downstream task (moat 4 w/o pos) HOT 1
- Op type not registered 'MergeSemanticAndInstanceMaps' in binary running on wvmgputprseus
- Logits and scores of semantic prediction
- Code compatibility with python < 3.9
- ValueError: Dimensions must be equal
- The architecture of kMaX Transformer Decoder seems not consistent with Fig.1 in the paper HOT 2
- Towards End-to-End Unified Scene Text Detection and Layout Analysis
- test error in macbook m1
- How to export_model on GPU mode ?
- How to identify model is using GPU ?
- How long it takes to train kMaXDeepLab on Cityscapes with batch size = 32? HOT 1
- Keras.optimizers has not attribute "legacy"
- How to train on Waymo?
- MOAT training code
- How many memory do I need for traning a kmax model when I use the resnet50 as the backbone?
- open source date of PolyMaX HOT 2
- Numpy Issue
- Data loading
- TypeError: RepeatedCompositeFieldContainer object does not support item assignment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deeplab2.