yasaminjafarian / HDNet_TikTok

MIT License
335 stars 36 forks source link

Tang et. al. Dataset Groundtruth Visualization #16

Closed terteros closed 3 years ago

terteros commented 3 years ago

Hello, first of all congratulations on this great work. I would like to know how you generated to 3d mesh from tang. et. al. groundtruth depth file as in the following figure Screenshot from 2021-10-11 11-49-27 :

yasaminjafarian commented 3 years ago

Hi. Thanks a lot for your message. This figure was made in MATLAB using surfl. You can take a look at the MATLAB visualization code for more information. Note that we do not generate the mesh for this visualization.

However, Tang et al. also provide a code to generate mesh from the depth that might be useful for your case, which we also adopt in our inference code here.

terteros commented 3 years ago

Yasamin hi again, I know the issue is closed but I don't think I could convey my problem properly. I can visualize your results with your depth2mesh function (which is interestingly very different from the matlab visualization code), and they seem pretty accurate geometrically. Tang et al. uses the same code but to visualize their prediction results. However, The depth data inside Tang et. al. training set is a grayscale image with values between 0-255. How did you transform those values to be similar to your predictions? If I happen to write those values to a depth.txt and run make_video.m, would I obtain geometrically plausible results?

yasaminjafarian commented 3 years ago

Hi. The Tang data is stored in uint16, not uint8 so the range is bigger than 0-255. You may want to double-check the data with their authors but what I do is: I read the uint16 data and divide it by 1000 then store it in a txt file. You can do the same if you want. Again the Matlab code is completely different from the depth2mesh. depth2mesh gives you back a .obj mesh but the Matlab code only visualizes the depth using surfl Matlab function (The results you see in the paper) and it won't return a mesh. (You can read more about this function in Matlab docs)

terteros commented 3 years ago

Ohh, right it is in uint16, they are the raw Kinect2 values ranging between 0-4500. Since Kinect2 depth capture works between 0.5-4.5 meters, it makes sense to divide the values by 1000. I did the same and meshes were fine, thanks!