mrharicot / monodepth

Unsupervised single image depth prediction with CNNs
Other
2.21k stars 628 forks source link

A error happend when I evaluate the Eigen Split #224

Open xiaohythu opened 5 years ago

xiaohythu commented 5 years ago

when I execute following code: python ~/depth/monodepth/code/monodepth/utils/evaluate_kitti.py --split eigen --predicted_disp_path ~/depth/monodepth/trained_models/model_eigen/disparities.npy \ --gt_path ~/depth/monodepth/datasets/KITTI/ --garg_crop

A error happend : 0 files missing Traceback (most recent call last): File "/home/xhy/depth/monodepth/code/monodepth/utils/evaluate_kitti.py", line 37, in depth = generate_depth_map(gt_calib[t_id], gt_files[t_id], im_sizes[t_id], camera_id, False, True) File "/home/xhy/depth/monodepth/code/monodepth/utils/evaluation_utils.py", line 173, in generate_depth_map velo2cam = np.hstack((velo2cam['R'].reshape(3,3), velo2cam['T'][..., np.newaxis])) ValueError: cannot reshape array of size 1 into shape (3,3)

Can anyone give me some instructions?

xy1999729 commented 5 years ago

Hello, I have the same question unfortunately. Do you have any solutions?

sungheonpark commented 5 years ago

Hi, I encountered the same problem, and changed the following line of code in evaluation_utils.py data[key] = np.array(map(float, value.split(' '))) to data[key] = np.array(list(map(float, value.split(' '))))

I also changed Counter(inds).iteritems() to Counter(inds).items()

This worked for me.

olgapeled commented 4 years ago

Hi, I encountered the same problem, and changed the following line of code in evaluation_utils.py data[key] = np.array(map(float, value.split(' '))) to data[key] = np.array(list(map(float, value.split(' '))))

I also changed Counter(inds).iteritems() to Counter(inds).items()

This worked for me.

Thank You!

BellZk commented 3 months ago

Hi, I encountered the same problem, and changed the following line of code in evaluation_utils.py data[key] = np.array(map(float, value.split(' '))) to data[key] = np.array(list(map(float, value.split(' '))))

I also changed Counter(inds).iteritems() to Counter(inds).items()

This worked for me.

Oh my god, that's a lot help. Thank you buddy