CVLAB-Unibo/Unsupervised-Adaptation-for-Deep-Stereo

Inference results from tensorflow version

Opened this issue · 3 comments

Hi, I tried with the tensorflow verision and ran the inference code with the pretrained model you provide. I run with the command line --fullRes.

The images of the disparity map look pretty well. But when I save the disparity as a numpy array directly, I realized compared with ground truth, it seems to have some scaling problems: It looks like that the disparity values have been divided by 2. I have no idea why it happens.

I have two examples to explain my question. One from Flyingthings and one from KITTI
https://drive.google.com/open?id=12ddoPxYLgetrO9KsmmLKzicPFA__uHhD
https://drive.google.com/open?id=1xW3IX5Ys225cxBsAY5fjTP1Q_ReyzvUE

How have you serialized the predicitons to numpy?
Have you rescaled the input images?

To get the predictions in numpy, I just run

disparity = full_res_prediction_np if args.fullRes else raw_prediction_np
np.save(dest[:-4], np.squeeze(disparity))

in your inference.py

The inputs are not rescaled. I run with command line --fullRes, and I also get the same size prediction as groud truth, which might confirm this.

As far as I remember there was no scaling in the tensorflow version of the code. If you are only interested in inference with dispnet you can also refer to this codebase as the implementation (and weights) of dispnet should be the same.
https://github.com/CVLAB-Unibo/Real-time-self-adaptive-deep-stereo