JiaRenChang / PSMNet

Pyramid Stereo Matching Network (CVPR2018)
MIT License
1.44k stars 423 forks source link

Issue about submission #151

Open XuZikang opened 5 years ago

XuZikang commented 5 years ago

I tried your submission.py to calculate disparity map of my own image, however it didn't work well. My environment is: python 2.7, pytorch 0.4.0, torchvision 0.2.0, scikit-image 0.13.0. Pretrained model: KITTI 2015

Could you please help me find the problem, thank you!

f1 f2 f1

waychin-weiqin commented 5 years ago

Hi, the work done by the author was trained on KITTI dataset, which means it will only perform well with KITTI dataset and similar dataset. Your images is very different from KITTI dataset and that's why it will not perform well.

You will have to train the network on similar dataset in order to obtain "good" results. This is considered as generalization problem with deep learning

XuZikang commented 5 years ago

Hi, thank you for your reply. I know that my images are not similar to KITTI dataset, but in a previous reply a user used similar images but got bad result. My result is as "bad" as his. So I guess may be there's something wrong in my code besides the input imges.(The disparity map only contains white and black, shouldn't it be red+green+blue?)

waychin-weiqin commented 5 years ago

The output should be greyscale image because it is just one dimensional image with disparity values as the greyscale values for each pixel. You can then either use the matlab code provided by KITTI or someone else's work to convert the greyscale disparity image into a 3 dimensional RGB image

JiaRenChang commented 5 years ago

@XuZikang My test result of your images pairs was also "bad" because of generalization problem. disparity

XuZikang commented 5 years ago

@JiaRenChang Thank you for your reply! Maybe I need to generate more images and train this network first. Could you tell me why my result is so different from yours? I wonder if the problem occurred in my environment or my code.

JiaRenChang commented 5 years ago

@XuZikang I upload a new script to test stereo pairs. You would to try again.

SuLiXY commented 2 years ago

@XuZikang 你好,你自己的数据集怎么做视差图的真值呢

XuZikang commented 2 years ago

类似于使用深度相机的方法