SPengLiang / LPCG

[ECCV 2022] Lidar Point Cloud Guided Monocular 3D Object Detection.
74 stars 3 forks source link

[Errno 2] No such file or directory: './data/kitti/kitti_merge/training/calib_cam2cam/000000.txt' #2

Open 870181985 opened 1 year ago

870181985 commented 1 year ago

I meet some troubles, can you give me some advice? thanks


100%|██████████| 33530/33530 [00:04<00:00, 7491.90it/s] 0%| | 0/33530 [00:00<?, ?it/s] Traceback (most recent call last): File "/media/optobot-02/document/haosenWang/code/LPCG-master/link_kitti_raw.py", line 55, in with open(calib_cam2cam_path, encoding='utf-8') as fw: FileNotFoundError: [Errno 2] No such file or directory: './data/kitti/kitti_merge/training/calib_cam2cam/000000.txt'

Process finished with exit code 1


It seems that the path is wrong, but I tried to change the .Py file path to the data file path. It still doesn't work

SPengLiang commented 1 year ago

You can check the dir path (e.g., "./data/kitti/kitti_merge/training/calib_cam2cam", "./data/kitti/kitti_merge" and so on) to locate the path problem.

Muyiyunzi commented 1 year ago

I also met this error, this is a wrong use of os.symlink since the source path is relative to the linked path, so here's how I solved it:

  1. add lpcgdir = os.getcwd() at the beginning of 'link_kitti_raw.py'.
  2. revise the for-loop at line 39 to
    os.symlink(os.path.join(lpcgdir, img_list[i][2:]), os.path.join(image_dst_dir, base_name+'.png'))
    os.symlink(os.path.join(lpcgdir, lidar_list[i][2:]), os.path.join(lidar_dst_dir, base_name+'.bin'))
    os.symlink(os.path.join(lpcgdir, cam2cam[i][3:]), os.path.join(cam2cam_dst_dir, base_name+'.txt'))
    os.symlink(os.path.join(lpcgdir, vel2cam[i][3:]), os.path.join(vel2cam_dst_dir, base_name+'.txt'))

    (adjust the tabs yourself)

SPengLiang commented 1 year ago

Thanks for your feedback! I will check and revise the code.