Comments (5)
Hi ilaripih,
You can refer to how we created the panoptic map for KITTI-STEP dataset:
deeplab2/data/utils/create_step_panoptic_maps.py
Lines 106 to 112 in e038967
Here we encode the panoptic map with the following PNG format:
R: semantic
G: instance // 256
B: instance % 256
And we decode the png here:
deeplab2/data/build_step_data.py
Lines 181 to 186 in e038967
from deeplab2.
Thanks for the quick response. To me it looks like the encode_panoptic_map
code you're referring to is meant for creating intermediate PNG files before creating the final TFRecord dataset which uses the "raw" (int32) format. I'm creating the TFRecord dataset directly from my own dataset, skipping the intermediate steps.
I successfully encoded the panoptic labels in PNG format in "image/segmentation/class/encoded" and set the "image/segmentation/class/format" field to "png" but it looks like the Deeplab2 code still wants to use the raw format and is complaining about the PNG data:
Traceback (most recent call last):
File "deeplab2/trainer/train.py", line 76, in <module>
app.run(main)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "deeplab2/trainer/train.py", line 72, in main
FLAGS.num_gpus)
File "/workspace/deeplab2/trainer/train_lib.py", line 191, in run_experiment
steps=config.trainer_options.solver_options.training_number_of_steps)
File "/workspace/models/orbit/controller.py", line 240, in train
self._train_n_steps(num_steps)
File "/workspace/models/orbit/controller.py", line 439, in _train_n_steps
train_output = self.trainer.train(num_steps_tensor)
File "/workspace/models/orbit/standard_runner.py", line 146, in train
self._train_loop_fn(self._train_iter, num_steps)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/def_function.py", line 885, in __call__
result = self._call(*args, **kwds)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/def_function.py", line 950, in _call
return self._stateless_fn(*args, **kwds)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py", line 3040, in __call__
filtered_flat_args, captured_inputs=graph_function.captured_inputs) # pylint: disable=protected-access
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py", line 1964, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/function.py", line 596, in call
ctx=ctx)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute
inputs, attrs, num_outputs)
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
(0) Invalid argument: Input to DecodeRaw has length 18802 that is not a multiple of 4, the size of int32
[[{{node DecodeRaw}}]]
[[MultiDeviceIteratorGetNextFromShard]]
[[RemoteCall]]
[[while/body/_1/IteratorGetNext]]
[[while/body/_1/DeepLabFamilyLoss/MaXDeepLabLoss/maximum_bipartite_matching/while/body/_8657/DeepLabFamilyLoss/MaXDeepLabLoss/maximum_bipartite_matching/while/find_augmenting_path/while/body/_8938/DeepLabFamilyLoss/MaXDeepLabLoss/maximum_bipartite_matching/while/find_augmenting_path/while/mul/_724]]
(1) Invalid argument: Input to DecodeRaw has length 18802 that is not a multiple of 4, the size of int32
[[{{node DecodeRaw}}]]
[[MultiDeviceIteratorGetNextFromShard]]
[[RemoteCall]]
[[while/body/_1/IteratorGetNext]]
I think I'm hitting this line that forces the use of the "raw" format in panoptic datasets: https://github.com/google-research/deeplab2/blob/main/data/data_utils.py#L353
I'll try the raw/int32 format.
from deeplab2.
With the "raw" format I can run the training code.
from deeplab2.
Yes, current we only support "raw" format creating tfrecord dataset.
You might need to either try with raw format or modify the _decode_label
in data_utils to decode png data.
from deeplab2.
Thanks. I can manage with the raw format, it's working.
from deeplab2.
Related Issues (20)
- Error when compiling custom ops(CPU or GPU) HOT 3
- 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
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.