-
Notifications
You must be signed in to change notification settings - Fork 158
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
Setting panoptic_label_divisor=None gives error #37
Comments
Hi mi2celis, Thanks for the question. To train the model on Cityscaspes semantic segmentation, you do not need to change anything except use the resnet50_os32_semseg.textproto. The dataset name in the textproto should still be "cityscapes_panoptic" (as shown here) and the dataset is converted in the same way as the tutorial. The code currently only reads panoptic dataset format, as shown in this line. Hope that helps. Cheers, |
Got it! Thank you for the prompt reply. So, if my dataset only contains semantic segmentation annotations, can I still use DeepLab2 to train as explained in the section to convert your own dataset ? |
Hi mi2celis, Yes, that is correct. Basically, you consider your dataset as the one that contains only Additionally, you may first want to make sure if you could successfully train Cityscapes semantic segmentation. Cheers, |
Hi mi2celis, Let me add a bit more details here which may be helpful when you will be converting your own dataset. Since the code only reads panoptic data at the moment, you need to set We will update the doc to include this information soon. Please feel free to report some more issues afterwards. Cheers, |
We current only support reading panoptic data format. To train with only semantic segmentation, we treat them as `stuff` classes and still need to set the panoptic_label_divisor. The same issue has been discussed at #37 PiperOrigin-RevId: 386383549
Closing the issue as there is no active discussion for a while. |
I am trying to run training with the cityscapes dataset with only semantic segmentation annotations.
I have set panoptic_label_divisor=None in dataset.py. I'm using ${DEEPLAB2}/configs/cityscapes/panoptic_deeplab/ resnet50_os32_semseg.textproto, where the instance branch is not initiated.
When running:
python trainer/train.py
--config_file= deeplab2/configs/cityscapes/panoptic_deeplab/resnet50_os32_semseg.textproto
--mode=train
--model_dir=deeplab2/model
--num_gpus=1
I get the following error
Traceback (most recent call last):
File "trainer/train.py", line 81, in
app.run(main)
File "/home/mimi/Envs/deeplab2/lib/python3.6/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/home/mimi/Envs/deeplab2/lib/python3.6/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "trainer/train.py", line 77, in main
FLAGS.num_gpus)
File "/home/mimi/code/deeplab2_proj/deeplab2/trainer/train_lib.py", line 137, in run_experiment
trainer = trainer_lib.Trainer(config, deeplab_model, losses, global_step)
File "/home/mimi/code/deeplab2_proj/deeplab2/trainer/trainer.py", line 137, in init
only_semantic_annotations=not support_panoptic)
File "/home/mimi/code/deeplab2_proj/deeplab2/trainer/runner_utils.py", line 122, in create_dataset
focus_small_instances=focus_small_instances)
File "/home/mimi/code/deeplab2_proj/deeplab2/data/sample_generator.py", line 127, in init
*self._dataset_info['panoptic_label_divisor'],
TypeError: unsupported operand type(s) for : 'int' and 'NoneType'
Any suggestions of what may be the problem.
The text was updated successfully, but these errors were encountered: