xy-guo / LIGA-Stereo

Code for LIGA-Stereo Detector, ICCV'21
Apache License 2.0
91 stars 18 forks source link

'stereo_kitti_dataset.py' has no function 'create_kitti_infos()' and 'create_gt_database_only'. How can I generate the data infos and gt_database? #6

Closed zjwzcx closed 2 years ago

zjwzcx commented 2 years ago

Hi, Xiaoyang! I'm trying to reimplement your awesome work.

In 'Getting Started', you mentioned 'Generate the data infos by running the following command:'

python -m liga.datasets.kitti.kitti_dataset create_kitti_infos
python -m liga.datasets.kitti.kitti_dataset create_gt_database_only

Unfortunately, these are only 'lidar_kitti_dataset' and 'stereo_kitti_dataset' in './liga/datasets/kitti/'. I successfully created kitti_infos and gt_database by running python -m liga.datasets.kitti.lidar_kitti_dataset create_kitti_infos and python -m liga.datasets.kitti.lidar_kitti_dataset create_gt_database_only.

However, I don't know how to create kitti_infos for the stereo detector. When I ran python -m liga.datasets.kitti.stereo_kitti_dataset create_kitti_infos, I found that I can't get the .pkl files (kitti_infos) because there is no 'create_kitti_infos()' and 'create_gt_database_only' in stereo_kitti_dataset create_kitti_infos.py.

More directly, if I want to train the whole LIGA-Stereo instead of just the modified SECOND, should I first create kitti_infos for the Stereo detector and then run ./scripts/dist_train.sh ${NUM_GPUS} 'exp_name' ./configs/stereo/kitti_models/liga.3d-and-bev.yaml?

Look forward to your answer!

zjwzcx commented 2 years ago

To add, I ran ./scripts/dist_train.sh 4 'exp_name' ./configs/stereo/kitti_models/liga.3d-and-bev.yaml and there is an error:

Traceback (most recent call last):                                                                                                                                               
  File "tools/train.py", line 211, in <module>
    main()
  File "tools/train.py", line 186, in main
    logger=logger
  File "/home/myname/LIGA-Stereo/tools/train_utils/train_utils.py", line 120, in train_model
    logger=logger
  File "/home/myname/LIGA-Stereo/tools/train_utils/train_utils.py", line 21, in train_one_epoch
    batch = next(dataloader_iter)
  File "/home/myname/anaconda3/envs/liga/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 363, in __next__
    data = self._next_data()
  File "/home/myname/anaconda3/envs/liga/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 989, in _next_data
    return self._process_data(data)
  File "/home/myname/anaconda3/envs/liga/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 1014, in _process_data
    data.reraise()
  File "/home/myname/anaconda3/envs/liga/lib/python3.7/site-packages/torch/_utils.py", line 395, in reraise
    raise self.exc_type(msg)
AssertionError: Caught AssertionError in DataLoader worker process 0.

Is this because I did not successfully create the dataset information?

sim-lab-dev commented 2 years ago

@zjwzcx I have met the same problem when I run this command. It seems that the files kitti_infos_train.pkl and kitti_infos_val.pkl are needed. But it's also not provided, do you have any idea to solved the problem?

zjwzcx commented 2 years ago

@RXWein Hi! Just run

python -m liga.datasets.kitti.lidar_kitti_dataset create_kitti_infos

and

python -m liga.datasets.kitti.lidar_kitti_dataset create_gt_database_only

to generate .pkl files. NOTE: These two commands are a little different from those provided by the author.

zcspike commented 1 year ago

略 dataset_cfg = EasyDict(yaml.load(open(args.cfg))) TypeError: load() missing 1 required positional argument: 'Loader'我执行这个报错了这个,请问有什么好的解决方案吗,谢谢