google-research / deeplab2

DeepLab2 is a TensorFlow library for deep labeling, aiming to provide a unified and state-of-the-art TensorFlow codebase for dense pixel labeling tasks.
Apache License 2.0
1.01k stars 159 forks source link

Some question about the eval codes on on Cityscapes test datasets? #55

Closed pingjun18-li closed 2 years ago

pingjun18-li commented 3 years ago

Hello, thank you for you codes,firstly. Now I want to use this code(axial_deeplab) to generate panoptic segmentation results on unlabeled data such as test set, and then generate test tfRecord, but when I use the following command to test,

python trainer/train.py --config_file="/home/sr6/yi0813.zhou/pingjun/deeplab2/configs/cityscapes/axial_deeplab/axial_swidernet_1_1_4.5_os16.textproto" --mode='eval' --model_dir="/home/sr6/yi0813.zhou/pingjun/deeplab2/init_checkpoints/axial_swidernet_1_1_4_5/" --num_gpus=1

I get the following error: - ***** TopKCrossEntropyLoss, gt_key: semantic_gt, pred_key: semantic_logits, weight_key: semantic_loss_weight, self._dynamic_weight: False ****** TopKCrossEntropyLoss, gt: (1, 1025, 2049, 19), pred: (1, 1025, 2049, 19), weights: (1, 1025, 2049), _top_k_percent_pixels: 0.20000000298023224 2021-09-16 17:29:34.622250: W tensorflow/core/framework/op_kernel.cc:1692] OP_REQUIRES failed at example_parsing_ops.cc:94 : Invalid argument: Feature: image/segmentation/class/encoded (data type: string) is required but could not be found. 2021-09-16 17:29:34.624420: W tensorflow/core/framework/op_kernel.cc:1692] OP_REQUIRES failed at example_parsing_ops.cc:94 : Invalid argument: Feature: image/segmentation/class/encoded (data type: string) is required but could not be found. Traceback (most recent call last): File "trainer/train.py", line 83, in <module> 2021-09-16 17:29:34.625410: W tensorflow/core/framework/op_kernel.cc:1692] OP_REQUIRES failed at example_parsing_ops.cc:94 : Invalid argument: Feature: image/segmentation/class/encoded (data type: string) is required but could not be found. 2021-09-16 17:29:34.626488: W tensorflow/core/framework/op_kernel.cc:1692] OP_REQUIRES failed at example_parsing_ops.cc:94 : Invalid argument: Feature: image/segmentation/class/encoded (data type: string) is required but could not be found. app.run(main) File "/home/sr6/yi0813.zhou/pingjun/python3.7.3/python3.7.3/lib/python3.7/site-packages/absl/app.py", line 312, in run 2021-09-16 17:29:34.627536: W tensorflow/core/framework/op_kernel.cc:1692] OP_REQUIRES failed at example_parsing_ops.cc:94 : Invalid argument: Feature: image/segmentation/class/encoded (data type: string) is required but could not be found. 2021-09-16 17:29:34.628701: W tensorflow/core/framework/op_kernel.cc:1692] OP_REQUIRES failed at example_parsing_ops.cc:94 : Invalid argument: Feature: image/segmentation/class/encoded (data type: string) is required but could not be found. So I think the prediction process for unlabel data shouldn't use this command, could you guide me or provide the correct test code? Someone have same question or have solved ? thank you teach.

Thank you again!

aquariusjay commented 3 years ago

Hi @pingjun18-li,

Based on the provided error log, it seems that the code tries to read the segmentation groundtruth but they are not provided. Since you would like to generate panoptic segmentation results on unlabeled data such as test set, maybe you could take a look at this tutorial.

Cheers,

pingjun18-li commented 3 years ago

Thank you for the guidance! it's working now. and one more question, i want to use this project to generate high quality pseudo label on the unlabel data, is this project support multi-scales test? or which config options I should change for that?

Best regards!

aquariusjay commented 3 years ago

Hi @pingjun18-li,

We currently only support multi-scale test for Panoptic-DeepLab. You could specify the eval_scales and left-right flips. Here is the link to the place where multi-scale inference is performed.

Cheers,

pingjun18-li commented 3 years ago

Ok,I know the multi-scale test for Panoptic-DeepLab, which is add by me and changed by bowen for troch version^_^, thank you again, i will try the multi-scale by myself. Best regards!

aquariusjay commented 2 years ago

Closing the issue since it is not active for a while. Please feel free to reopen it if needed.