Skip to content
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

How to prepare the Cityscapes data #10

Closed
arash-ashra opened this issue Apr 23, 2020 · 15 comments
Closed

How to prepare the Cityscapes data #10

arash-ashra opened this issue Apr 23, 2020 · 15 comments

Comments

@arash-ashra
Copy link

Hello. I'm trying to reproduce your CityScapes results for our BMVC paper.

after I followed the data directory format in the config.profile file and running bash ./scripts/cityscapes/hrnet/run_h_48_d_4_ocr.sh val 1 I get this error:

ERROR: Found no prediction for ground truth /home/arash/openseg.pytorch/dataset/cityscapes/val/label/munster_000027_000019_gtFine_labelIds.png

could you explain how did you prepare the data?
Thanks

@PkuRainBow
Copy link
Contributor

According to the error information, it seems that you have not downloaded the prediction files of the "HRNet + OCR" method.

As for the data preparation, please refer to the GETTING_STARTED.

@arash-ashra
Copy link
Author

arash-ashra commented Apr 23, 2020

where can I find these prediction files of the HRNet + OCR method? and why it is needed?
This is my full traceback:
Traceback (most recent call last): File "main.py", line 212, in <module> model = Tester(configer) File "/home/arash/openseg.pytorch/segmentor/tester.py", line 69, in __init__ self._init_model() File "/home/arash/openseg.pytorch/segmentor/tester.py", line 72, in _init_model self.seg_net = self.model_manager.semantic_segmentor() File "/home/arash/openseg.pytorch/lib/models/model_manager.py", line 81, in semantic_segmentor model = SEG_MODEL_DICT[model_name](self.configer) File "/home/arash/openseg.pytorch/lib/models/nets/hrnet.py", line 105, in __init__ self.backbone = BackboneSelector(configer).get_backbone() File "/home/arash/openseg.pytorch/lib/models/backbones/backbone_selector.py", line 34, in get_backbone model = HRNetBackbone(self.configer)(**params) File "/home/arash/openseg.pytorch/lib/models/backbones/hrnet/hrnet_backbone.py", line 598, in __call__ bn_momentum=0.1) File "/home/arash/openseg.pytorch/lib/models/backbones/hrnet/hrnet_backbone.py", line 307, in __init__ self.bn1 = ModuleHelper.BatchNorm2d(bn_type=bn_type)(64, momentum=bn_momentum) TypeError: 'NoneType' object is not callable evaluate the result... ERROR: Found no prediction for ground truth /home/arash/openseg.pytorch/dataset/cityscapes/val/label/munster_000113_000019_leftImg8bit.png

@PkuRainBow
Copy link
Contributor

PkuRainBow commented Apr 23, 2020

bash ./scripts/cityscapes/hrnet/run_h_48_d_4_ocr.sh val 1

The above command is used to evaluate the performance of HRNet + OCR, so you need to generate the predictions of HRNet + OCR by yourself in the first place. Please download the pre-trained checkpoints provided in the MODEL_ZOO.md

@fabio-cancio-sena
Copy link

bash ./scripts/cityscapes/hrnet/run_h_48_d_4_ocr.sh val 1

The above command is used to evaluate the performance of HRNet + OCR, so you need to generate the predictions of HRNet + OCR by yourself in the first place. Please download the pre-trained checkpoints provided in the MODEL_ZOO.md

Hello,

I've been reading through the getting started, model zoo and some scripts and I'm still a little confused about the workflow to run segfix. Does segfix run HRNet + OCR during training after I convert the dataset? What are the steps and expected inputs and outputs? What are this pre-trained checkpoints? Are they pretrained HRNet + OCR (for example) or HRNet + OCR + SegFix or just SegFix?

@PkuRainBow
Copy link
Contributor

SegFix is independent of the segmentation models and you can apply any segmentation models to predict the coarse segmentation maps.

SegFix predicts an offset map and we can apply the offset map to refine the coarse segmentation maps.

Hope the above explanation helps you!

@PkuRainBow PkuRainBow reopened this Sep 3, 2020
@AxMM
Copy link

AxMM commented Nov 10, 2020

bash ./scripts/cityscapes/hrnet/run_h_48_d_4_ocr.sh val 1

The above command is used to evaluate the performance of HRNet + OCR, so you need to generate the predictions of HRNet + OCR by yourself in the first place. Please download the pre-trained checkpoints provided in the MODEL_ZOO.md

Hello.
I´m getting the same error as @arashash
I did the Data Preparation step for cityscapes.

  • My save_dir is openseg.pytorch-master/dataroot/cityscapes,
  • my ori_root_dir is openseg.pytorch-master/dataroot/cityscapes/original_cityscapes with 2 folders from the cityscapes website the folders are: gtCoarse (with train, train_extra and val) and leftImg8bit. Inside leftImg8bit I have: test, train, train_extra and val

I downloaded the checkpoint (hrnet_w48_ocr_1_latest.pth) then I put it in the folder openseg.pytorch-master/checkpoints/cityscapes/

I downloaded ImageNet pretrained model to openseg.pytorch-master/pretrained_model/:

  • hrnetv2_w48_imagenet_pretrained.pth
  • hr_rnet_bt_w20_imagenet_pretrained.pth

I´m getting the error ERROR: Found no prediction for ground truth /home/mysusername/openseg.pytorch-master/dataroot/cityscapes/val/label/munster_000119_000019_leftImg8bit.png

What I´m missing? can you help me?
Thank you in advance

@PkuRainBow
Copy link
Contributor

@hsfzxjy Please help @AxMM to address the problem.

@hsfzxjy
Copy link
Contributor

hsfzxjy commented Nov 11, 2020

@AxMM

Seems that the script didn't perform inference. Could you provide the full output of bash ./scripts/cityscapes/hrnet/run_h_48_d_4_ocr.sh val 1?

@AxMM
Copy link

AxMM commented Nov 12, 2020

@AxMM

Seems that the script didn't perform inference. Could you provide the full output of bash ./scripts/cityscapes/hrnet/run_h_48_d_4_ocr.sh val 1?

Hello,
Thank you for the fast reply.
I figure it out. My problem is because I'm using Windows 10. I tried to solve it by installing WSL (Windows Subsystem for Linux) with that I got the error that I'm reporting.
There is any chance to put your project working on Windows?

@hsfzxjy
Copy link
Contributor

hsfzxjy commented Nov 12, 2020

@AxMM It's not on the plan. Adapting Windows will be too time-consuming and troublesome. Instead Linux is more mature and stable.

@AxMM
Copy link

AxMM commented Nov 13, 2020

@AxMM It's not on the plan. Adapting Windows will be too time-consuming and troublesome. Instead Linux is more mature and stable.

I understand, thank you very much. I will switch for Linux.

@AxMM
Copy link

AxMM commented Nov 21, 2020

Hello,
Running bash ./scripts/cityscapes/hrnet/run_h_48_d_4_ocr.sh val 1 I got this error:
FileNotFoundError: [Errno 2] No such file or directory: '/msravcshare/dataset/cityscapes/val/image' evaluate the result... ERROR: Found no prediction for ground truth /dl/openseg.pytorch-master/DATA_ROOT/cityscapes/val/label/lindau_000011_000019_leftImg8bit.png

I don´t recognize this folder msravcshare.
What is the purpose of this folder?
My DATA_ROOT is DATA_ROOT=/dl/openseg.pytorch-master/DATA_ROOT

Thank you in advance.

@hsfzxjy
Copy link
Contributor

hsfzxjy commented Nov 22, 2020

@AxMM Fixed. You may checkout the latest commit to see the update.

@xiximelon
Copy link

xiximelon commented Oct 10, 2021

where can I find these prediction files of the HRNet + OCR method? and why it is needed? This is my full traceback: Traceback (most recent call last): File "main.py", line 212, in <module> model = Tester(configer) File "/home/arash/openseg.pytorch/segmentor/tester.py", line 69, in __init__ self._init_model() File "/home/arash/openseg.pytorch/segmentor/tester.py", line 72, in _init_model self.seg_net = self.model_manager.semantic_segmentor() File "/home/arash/openseg.pytorch/lib/models/model_manager.py", line 81, in semantic_segmentor model = SEG_MODEL_DICT[model_name](self.configer) File "/home/arash/openseg.pytorch/lib/models/nets/hrnet.py", line 105, in __init__ self.backbone = BackboneSelector(configer).get_backbone() File "/home/arash/openseg.pytorch/lib/models/backbones/backbone_selector.py", line 34, in get_backbone model = HRNetBackbone(self.configer)(**params) File "/home/arash/openseg.pytorch/lib/models/backbones/hrnet/hrnet_backbone.py", line 598, in __call__ bn_momentum=0.1) File "/home/arash/openseg.pytorch/lib/models/backbones/hrnet/hrnet_backbone.py", line 307, in __init__ self.bn1 = ModuleHelper.BatchNorm2d(bn_type=bn_type)(64, momentum=bn_momentum) TypeError: 'NoneType' object is not callable evaluate the result... ERROR: Found no prediction for ground truth /home/arash/openseg.pytorch/dataset/cityscapes/val/label/munster_000113_000019_leftImg8bit.png

@arashash Hello .I met the same question.Could u tell me how to solve the problem? I follow the pipeline the author provided. Seems I can't get the prediction of models. How can I get the predictions? Thanks!

@xiximelon
Copy link

xiximelon commented Oct 10, 2021

bash ./scripts/cityscapes/hrnet/run_h_48_d_4_ocr.sh val 1

The above command is used to evaluate the performance of HRNet + OCR, so you need to generate the predictions of HRNet + OCR by yourself in the first place. Please download the pre-trained checkpoints provided in the MODEL_ZOO.md

@PkuRainBow Hello I met the same question as the qustioner. You say "you need to generate the predictions of HRNet + OCR by yourself". Does this mean the code can't perform the inference operation? According to the GETTING_STARTED. I think it means by running the command bash ./scripts/cityscapes/hrnet/run_h_48_d_4_ocr.sh val 1 ,it can do the inference.But now I met the error ERROR: Found no prediction for ground truth .Please help me . Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants