mileyan / pseudo_lidar

(CVPR 2019) Pseudo-LiDAR from Visual Depth Estimation: Bridging the Gap in 3D Object Detection for Autonomous Driving
https://mileyan.github.io/pseudo_lidar/
MIT License
976 stars 216 forks source link

Getting no point clouds when converting disparity map of monocular image #34

Closed sarimmehdi closed 3 years ago

sarimmehdi commented 4 years ago

Hello. My monocular image looks like this: 000000000000000 Following is my P2 matrix:

[[2.083091e+03 0.000000e+00 9.572938e+02 0.000000e+00]
 [0.000000e+00 2.083091e+03 6.505698e+02 0.000000e+00]
 [0.000000e+00 0.000000e+00 1.000000e+00 0.000000e+00]]

Following is my V2C matrix:

[[ 0.9999152   0.0083809   0.00996961 -1.565187  ]
 [-0.00828053  0.999915   -0.01006629  0.05696378]
 [-0.01005313  0.00998289  0.9998996  -2.099987  ]]

Following is my C2V matrix:

[[ 0.9999152  -0.00828053 -0.01005313  1.54441452]
 [ 0.0083809   0.999915    0.00998289 -0.02287734]
 [ 0.00996961 -0.01006629  0.9998996   2.11595389]]

Following is my R0 matrix:

[[1. 0. 0.]
 [0. 1. 0.]
 [0. 0. 1.]]

I run your code in preprocessing/generate_lidar.py but I get no point clouds in return (I get an empty np.array). Can you please have a look at my above data and see what could be wrong here. The extrinsic and intrinsic parameters are from the Waymo dataset.

Waymo uses the vehicle reference axis where the y-axis is positive in the opposite direction (gets positive from left to right instead of being positive from right to left as in kitti)

mileyan commented 4 years ago

Hi @sarimmehdi , when you use generate_lidar.py, if your image is depth image, you have to add --is_depth argument. Please let me know if it doesn't help.