yindaz / DeepCompletionRelease

Deep Depth Completion of a Single RGB-D Image
http://deepcompletion.cs.princeton.edu/
563 stars 141 forks source link

Get all the same data after depth2depth #16

Closed densechen closed 5 years ago

densechen commented 5 years ago

I have compiled and run the code in scannet. But I couldn't get the correct improved depth image. And all the value in the image is same. The output as follows:

../gaps/bin/x86_64/depth2depth /home/dsc/Downloads/scannet_test/scene0011_00/depth/000000002.png ../results/scannet/scene0011_00_000000002_suffix_1.png -xres 320.000000 -yres 240.000000 -fx 577.590698 -fy 578.729797 -cx 318.905426 -cy 242.683609 -inertia_weight 1000.000000 -smoothness_weight 0.001000 -normal_weight 1.000000 -input_normals ../torch/result/normal_scannet_scannet_test/scene0011_00_000000002_suffix_normal_est.h5 -input_normal_weight ../torch/result/bound_scannet_weight/scene0011_00_000000002_suffix_weight.png Read image from /home/dsc/Downloads/scannet_test/scene0011_00/depth/000000002.png Time = 0.01 seconds Resolution = 640 480 Spacing = 1 Cardinality = 221228 Minimum = 0 Maximum = 1.00975 L1Norm = 89149.6 L2Norm = 199.071 Read images from ../torch/result/normal_scannet_scannet_test/scene0011_00_000000002_suffix_normal_est.h5 Time = 0.07 seconds Resolution = 320 240 Cardinality = 76800 Minimum = -0.83625 Maximum = 0.77635 L1Norm = 11053.4 L2Norm = 95.9391 Read image from ../torch/result/bound_scannet_weight/scene0011_00_000000002_suffix_weight.png Time = 0.00 seconds Resolution = 320 240 Spacing = 1 Cardinality = 76066 Minimum = 0 Maximum = 1 L1Norm = 51001.6 L2Norm = 197.557 Read images ... Time = 0.09 seconds Resolution = 320 240

Images = 4

Solved for depth image Time = 21.81 seconds

Variables = 76800

Equations = 1576920

Inertia Equations = 55313
Smoothness Equations = 306080
Derivative Equations = 0
Normal Equations = 909447
Tangent Equations = 306080
Range Equations = 0

Initial SSD = 5.24935e+10 Final SSD = 5.16869e+10 Wrote image to ../results/scannet/scene0011_00_000000002_suffix_1.png Time = 0.01 seconds Resolution = 320 240 Spacing = 1 Cardinality = 76800 Minimum = -0.333333 -<<<<<<<<<<<< this is the problem. Maximum = -0.333083 -<<<<<<<<<<<<this is the problem. L1Norm = -25600 L2Norm = 92.376

The data input have different Minimum and Maximum value, but the output doesn't.

I have check the source code, and find out that CreateDepthImage() can not work well.

how can I debug this?

yindaz commented 5 years ago

There can be many possible issues. I cannot lead you through all possibility, but could you run the Quick Test? If so, could you check with every step over there and make sure all intermediate make sense. I guess this is the best way.