yindaz / DeepCompletionRelease

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

Input image resolution #12

Closed SunshineDou closed 5 years ago

SunshineDou commented 5 years ago

Hello, as I want to get the output completion depth image in 640x480, now it's 320x240. I have searched all the files but not find where to modify the resolution, could you please tell me how to modify it into 640x480? Thank you very much

yindaz commented 5 years ago

If you talk about Mitsuba, there is a way to set it up in XML I believe. If you talk about GAPS, you can feed the resolution in command line.

On Thu, Dec 20, 2018 at 12:53 AM SunshineDou notifications@github.com wrote:

Hello, as I want to get the output completion depth image in 640x480, now it's 320x240. I have searched all the files but not find where to modify the resolution, could you please tell me how to modify it into 640x480? Thank you very much

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/yindaz/DeepCompletionRelease/issues/12, or mute the thread https://github.com/notifications/unsubscribe-auth/AI3mv_MvDtI2AQqhI9ndT07o147GyuHyks5u61AcgaJpZM4ZbwVY .

SunshineDou commented 5 years ago

@yindaz Thanks very much for your replying. Yeah, I have cd into the /gaps/bin/x86_64, and run the following command ./depth2depth 494_depth_open.png output_depth.png -xres 640 -yres 480 -fx 385 -fy 385 -cx 322 -cy 239 -inertia_weight 1000 -smoothness_weight 0.001 -tangent_weight 1 -input_normals realsense_494_normal_est.h5 -input_tangent_weight realsense_494_weight.png

but it failed, it report error as follows:Mismatching resolution in input_normals_filename.

as the input depth image is 640x480, but the normal and weight image are 320x240 generated before. so How to generate normal, depth and bound images in 640x480 to get completed depth image in size of 640x480? Thanks again for your help

yindaz commented 5 years ago

You need to make sure all the input are in the same resolution. While the best way is to change the testing script, you can always directly upsampling (nearest neighbor based or bilinear) the low-res result.

On Thu, Dec 20, 2018 at 6:41 PM SunshineDou notifications@github.com wrote:

@yindaz https://github.com/yindaz Thanks very much for your replying. Yeah, I have cd into the /gaps/bin/x86_64, and run the following command ./depth2depth 494_depth_open.png output_depth.png -xres 640 -yres 480 -fx 385 -fy 385 -cx 322 -cy 239 -inertia_weight 1000 -smoothness_weight 0.001 -tangent_weight 1 -input_normals realsense_494_normal_est.h5 -input_tangent_weight realsense_494_weight.png

but it failed, it report error as follows:Mismatching resolution in input_normals_filename.

as the input depth image is 640x480, but the normal and weight image are 320x240 generated before. so How to generate normal, depth and bound images in 640x480 to get completed depth image in size of 640x480? Thanks again for your help

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yindaz/DeepCompletionRelease/issues/12#issuecomment-449221745, or mute the thread https://github.com/notifications/unsubscribe-auth/AI3mvyCrz1CZEa7sWCvei1UqpTJV3LIKks5u7EpvgaJpZM4ZbwVY .

SunshineDou commented 5 years ago

@yindaz Thank you very much for your helping. as I want to use the completion depth image to do 3D reconstruction. Is the unsampling of the low-res result suitable for me? as I think it will lower the accuracy of the depth image which will not be suitable for 3D reconstruction. if I want to change the test script to get 640x480 images directly, How to change the script code?could you please give me a more detailed description? Thanks again for your replying

yindaz commented 5 years ago

I can imagine that would require quite a bit of labor. First of all, the model is trained to work on only small resolution, so for the best performance, you would need to retrain the model using large resolution images as input. Second, the camera intrisics, network testing code, and depth optimization code may all need to be modified to incorporate the high res images/estimations.

Actually, I don't think the upsampling would dramatically change the performance. Your depth are still mostly from the input/incomplete depth, and normal only acts as a continuous function for interpolation. So I would recommend you to give the upsampling idea a try and only touch the network part if that's not work.

On Thu, Dec 20, 2018 at 11:46 PM SunshineDou notifications@github.com wrote:

@yindaz https://github.com/yindaz Thank you very much for your helping. as I want to use the completion depth image to do 3D reconstruction. Is the unsampling of the low-res result suitable for me? as I think it will lower the accuracy of the depth image which will not be suitable for 3D reconstruction. if I want to change the test script to get 640x480 images directly, How to change the script code?could you please give me a more detailed description? Thanks again for your replying

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yindaz/DeepCompletionRelease/issues/12#issuecomment-449294343, or mute the thread https://github.com/notifications/unsubscribe-auth/AI3mv1LEXJZRsOt9QSbwhP775BAU7W-4ks5u7JG6gaJpZM4ZbwVY .

SunshineDou commented 5 years ago

@yindaz Ok,I will give upsampling a try. Thank you very much for your help

SunshineDou commented 5 years ago

@yindaz I have another question is that what is the impact the camera intrinsic has on the result? as I changed the camera intrinsic, but I don't see any difference after changing the intrinsic

yindaz commented 5 years ago

It is true that change intrinsic matrix a little bit does not affect the performance visually dramatically. But intrinsic guarantees all the computation to be geometrically correct. So you should never change the intrinsic. You may see book " https://play.google.com/store/books/details?id=e30hAwAAQBAJ&source=productsearch&utm_source=HA_Desktop_US&utm_medium=SEM&utm_campaign=PLA&pcampaignid=MKTAD0930BO1&gclid=Cj0KCQiAgf3gBRDtARIsABgdL3lifla9Hk2mfBpCBx3_v_BmYk6GYSmytYHAGew-fg5ulKRAyfydcRIaAnHuEALw_wcB&gclsrc=aw.ds" for more about intrinsics.

On Sat, Dec 22, 2018 at 11:09 PM SunshineDou notifications@github.com wrote:

@yindaz https://github.com/yindaz I have another question is that what is the impact the camera intrinsic has on the result? as I changed the camera intrinsic, but I don't see any difference after changing the intrinsic

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/yindaz/DeepCompletionRelease/issues/12#issuecomment-449618872, or mute the thread https://github.com/notifications/unsubscribe-auth/AI3mv_igF_DupohpQael5YEXYugKv5XUks5u7yw1gaJpZM4ZbwVY .

SunshineDou commented 5 years ago

@yindaz ok, I will have a look at the book, Thank you very much sincerely