monodepth icon indicating copy to clipboard operation
monodepth copied to clipboard

A error happend when I evaluate the Eigen Split

Open xiaohythu opened this issue 5 years ago • 4 comments

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?

xiaohythu avatar May 01 '19 09:05 xiaohythu

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

xy1999729 avatar Jul 29 '19 02:07 xy1999729

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.

sungheonpark avatar Aug 22 '19 11:08 sungheonpark

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!

olgapeled avatar Feb 24 '20 10:02 olgapeled

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

BellZk avatar May 19 '24 07:05 BellZk