JiaRenChang / PSMNet

Pyramid Stereo Matching Network (CVPR2018)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Avert about weird behaviors with Pretrained models in the README

ferreram opened this issue · comments

Hi there,

First I would like to thank you for your work and releasing your code and pre-trained models!

I have been playing with the code and ran into some troubles in the results obtained with the pre-trained models. This is due to three facts. First, "align_corners=True" should be added to the upsample functions for Pytorch version higher than 0.4. Second, with SceneFlow and the pre-trained model, the output disparities should be multiplied by 1.17. And finally, with torchvision > 0.2.0, RGB images should be loaded without adding ".astype('float32'))".

I think you should add these pieces of information in the README.md, so people don't get confuse and don't lose too much time trying to fix these issues.

Thansk again for sharing your code.

Cheers,
Maxime

Hi@ferreram,
My torchvision is 0.2.1. I got " AttributeError:'Nonetype' object has no attribute 'size' " ,when I loaded images.
I rewrite dataL = np.ascontiguousarray(dataL,dtype=np.float32) to dataL = np.ascontiguousarray(dataL) But it doesn't work.
Which other codes should I rewrite?

Hi @Ihiceu,
The "astype(np.float32)" to remove is in the submission.py file. Beside that, the dataloader works well. From the error you're getting, I'd say that images are not loaded correctly as dataL is empty in your case. You should check if you provide the good path to your dataset and if the images are organized as expected.
Cheers

commented

@ferreram Why the factor of 1.17? How does it come into existence?

@WASCHMASCHINE I have no idea and did not have the time to dive into this but it was reported by other as well #64

@ferreram
Thanks for your comment!
I will add those notices to README.

commented

@ferreram
Thanks for your comment!
I will add those notices to README.

This may also explain my error: #113