Unsupervised-Adaptation-for-Deep-Stereo icon indicating copy to clipboard operation
Unsupervised-Adaptation-for-Deep-Stereo copied to clipboard

Inference results from tensorflow version

Open horizon0408 opened this issue 5 years ago • 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

horizon0408 avatar Oct 07 '19 18:10 horizon0408

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

AlessioTonioni avatar Oct 08 '19 09:10 AlessioTonioni

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.

horizon0408 avatar Oct 08 '19 10:10 horizon0408

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

AlessioTonioni avatar Oct 13 '19 18:10 AlessioTonioni