Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in Public Available Data #11

Open
TWJianNuo opened this issue Apr 14, 2020 · 3 comments
Open

Problem in Public Available Data #11

TWJianNuo opened this issue Apr 14, 2020 · 3 comments

Comments

@TWJianNuo
Copy link

TWJianNuo commented Apr 14, 2020

Hi, I used your publised data but find several problems. Listed below:

  1. The provided depth map looks like disparity map.
  2. Instance Map around Frame 3056 is incorrect.
  3. Insufficient description in provided code from github repo PreSIL-tools "https://github.com/bradenhurl/PreSIL-tools" . In this repo, you provided python file "vis_presil.py" which seems to do the conversion between depth and raw depth data, however, it is not. The descrpition is insufficient and misguiding.

It is a great work but with some improvment it will be recognized and utilized better, thanks!

@TWJianNuo TWJianNuo changed the title Problem in Generated Sy Problem in Public Available Data Apr 14, 2020
@bradenhurl
Copy link
Owner

Hello! I'm glad you are able to utilize the dataset. I have graduated from my master's and am very busy working at a startup. Feel free to create a PR with any changes you think could improve the repo!

@liortalker
Copy link

Hi,

I also encountered weird artifact in the conversion provided in vis_presil.py between raw depth data and the actual depth in meters. The artifact seems to be radial, so I tried to change

d_nc = math.sqrt(pow(nc_x,2) + pow(nc_y,2) + pow(nc_z,2))
to
d_nc = nc_z
In the function ndcToDepth.

The radial artifact seems to disappear but I'm not sure that the results are actual depth in meters.
Does someone know?

@kwea123
Copy link

kwea123 commented Jul 2, 2023

I think the code is mostly correct, it just misses the conversion from degrees to radians on line 26 for math.tan. Also the code is very inefficient because of the for loops. I wrote a better version:

def ndc2real(depth_ndc):
    # depth_ndc: (1080, 1920) float32
    h, w = depth_ndc.shape
    nc_z = 0.15
    fc_z = 600
    fov_v = 59 #degrees
    nc_h = 2 * nc_z * np.tan(np.radians(fov_v / 2.0))
    nc_w = w / h * nc_h

    nc_x, nc_y = np.mgrid[:h, :w][::-1].astype(np.float32)
    nc_x = (nc_x / (w - 1) * 2 - 1) * nc_w / 2
    nc_y = (nc_y / (h - 1) * 2 - 1) * nc_h / 2
    d_nc = np.sqrt(nc_x ** 2 + nc_y ** 2 + nc_z ** 2)
    depth_real = d_nc / (depth_ndc + (nc_z * d_nc / (2 * fc_z)))

    return depth_real

and the depth looks correct
截圖 2023-07-02 下午12 58 14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@bradenhurl @kwea123 @TWJianNuo @liortalker and others