JiaRenChang / PSMNet

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

Test the pre-trained model with EuRoc Vicon Room #138

Open Zchappie opened 5 years ago

Zchappie commented 5 years ago

HI, Firstly, I want to appreciate your great work and share the code! I try to use your pre-trained model KITTI 2015/2012 to test the EuRoc Vicon Room dataset, I have change the input channel to 1, and padding to (480, 768). And this is (one of them) what I got 1403715329912143104 Do you have any suggestions? Or the models are not suitable for other datasets before transfer learning? Thanks

JiaRenChang commented 5 years ago

@Zchappie Hi. Please notice your torchvision version, you should use 0.2.0.

Zchappie commented 5 years ago

Thanks for the fast reply! I corrected the torchvision version, but the output remain the same.

JiaRenChang commented 5 years ago

@Zchappie Hi, would you provide me a pair of images to test?

Zchappie commented 5 years ago

Sure! 1403715273262142976 1403715273262142976

JiaRenChang commented 5 years ago

Hi, @Zchappie I found that this pair of images is not correctly rectified. test

Zchappie commented 5 years ago

I did the rectification again, these are the new images. 1403715273262142976 1403715273262142976 But the output of disparity seems remain unchanged.

JiaRenChang commented 5 years ago

@Zchappie Here is my result of your image pair. I used trained KITTI2015 model.

test_color

Zchappie commented 5 years ago

@JiaRenChang Cool! Could you please provide how you tune the params?

JiaRenChang commented 5 years ago

Hi, @Zchappie I didn't tune any parameters. I used the KITTI 2015 pre-trained model. You can find the download link on Readme. The only difference is that I loaded the gray images as color images via opencv function. You can modify the image load function to this: yourimg = cv2.cvtColor(cv2.imread('imgpath',0), cv2.COLOR_GRAY2RGB) .

Zchappie commented 5 years ago

@JiaRenChang Thanks for the suggestions! Previously, I tested EuRoc dataset with single channel on my MacBook Pro, it worked (except the result is not correct). But since I loaded the images through OpenCV as you suggested, error ... not supported on CPUType for Byte shows. As discussed in https://github.com/JiaRenChang/PSMNet/issues/44#issuecomment-389499837, is that means it won't work for color images?

JiaRenChang commented 5 years ago

@Zchappie I did not really catch what you means. My system is ubuntu 16.04, and an NVIDIA 1080 ti for inference.

Zchappie commented 5 years ago

@JiaRenChang Sorry, I mean do I need a GPU to do inference?

JiaRenChang commented 5 years ago

@Zchappie Yes, it would be better to have a GPU to infer. BTW, a GPU with 6~8GB memory is a good choice.

Zchappie commented 5 years ago

@JiaRenChang Thanks for you patient explanations and suggestions!

Zchappie commented 5 years ago

@JiaRenChang Hi, I tried on Google Colab with CUDA Version 10.0.130, torchvision-0.2.0, torch-1.1.0, but I am not able to get the result like yours, at least not coloured disparity map. It is gray and similar to the very first post. 1403715317412143104

zhiwenfan commented 5 years ago

@Zchappie hi, I think you should follow the instruction, using pytorch0.4 and torchvision0.2.0

Zchappie commented 5 years ago

@zhiwenfan Thank you for the advise. I did, and it didn't work. That's why I try some other versions as well. I am totally new to set all those things up, but I have never expected it will be so complicated for me.

JiaRenChang commented 5 years ago

@Zchappie It may due to the version of skimage. I am not sure. My skimage version is 0.13.0. scikit-image 0.13.0

Huyhust13 commented 5 years ago

I run submision.py use pretrained model for cityscapes dataset. Size of image (2048x1024) too large with my GPU (6GB). I resize to (1024x512) then it run ok but disparity map seem not good. image

zhiwenfan commented 5 years ago

Hi, @Zchappie I found that this pair of images is not correctly rectified. test

hi @JiaRenChang , could you please provide me your python code to draw this image? many thanks!

mike132129 commented 4 years ago

I did the rectification again, these are the new images. 1403715273262142976 1403715273262142976 But the output of disparity seems remain unchanged.

Hi @Zchappie, did you have a better result? I am trying to test the model with my grayscale image, but the result seems to be not good. And I test your image pair, getting a whole blue disparity map, not like the author's.

huangju91 commented 4 years ago

Hi,I just scanned your chat log, I wonder if the stereo rectification for the test image pair is necessary?

ynma-hanvo commented 2 years ago

nice chat thread; I am wondering how long does it take for 768 * 480 depth inference , and is the output depth value the pixel shift between the left and right image ?