bradenhurl / DeepGTAV-PreSIL

GNU General Public License v3.0
76 stars 16 forks source link

Problem in Public Available Data #11

Open TWJianNuo opened 4 years ago

TWJianNuo commented 4 years ago

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!

bradenhurl commented 4 years ago

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 commented 2 years ago

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 commented 1 year ago

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