zju3dv / disprcnn

Code release for Stereo 3D Object Detection via Shape Prior Guided Instance Disparity Estimation (CVPR 2020, TPAMI 2021)
Apache License 2.0
213 stars 36 forks source link

How to create or acquire training/label_3 directory? #11

Closed maheriya closed 4 years ago

maheriya commented 4 years ago

I am trying to run eval using

sh scripts/eval_with_trained_model.sh

I have downloaded the pre-trained pob model, and moved to data/kitti/pob as per instruction. However, the eval script fails as it doesn't find 'training/label_3' directory. Where can I find this directory? KITTI dataset doesn't have this. Are you generating this somehow?

Here is the excerpt of the output with errors:

...
...
TEST:
  DETECTIONS_PER_IMG: 100
  EXPECTED_RESULTS: []
  EXPECTED_RESULTS_SIGMA_TOL: 4
  FORCE_RECOMPUTE: True
  IMS_PER_BATCH: 4
2020-05-29 16:05:50,813 disprcnn.utils.checkpoint INFO: Loading checkpoint from models/kitti/pob/smrcnn.pth
2020-05-29 16:05:51,135 disprcnn.data.build WARNING: When using more than one image per GPU you may encounter an out-of-memory (OOM) error if your GPU does not have sufficient memory. If this happens, you can reduce SOLVER.IMS_PER_BATCH (for training) or TEST.IMS_PER_BATCH (for inference). For training, you must also adjust the learning rate and schedule length according to the linear scaling rule. See for example: https://github.com/facebookresearch/Detectron/blob/master/configs/getting_started/tutorial_1gpu_e2e_faster_rcnn_R-50-FPN.yaml#L14
generating /IMAGESETS/work/DispRCNN/data/kitti/object/training/label_3/annotations.pkl
  0%|                                                                                                                      | 0/7481 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "tools/test_net.py", line 97, in <module>
    main()
  File "tools/test_net.py", line 80, in main
    data_loaders_val = make_data_loader(cfg, is_train=False, is_distributed=distributed)
  File "/IMAGESETS/work/DispRCNN/disprcnn/data/build.py", line 147, in make_data_loader
    cfg.SOLVER.OFFLINE_2D_PREDICTIONS)
  File "/IMAGESETS/work/DispRCNN/disprcnn/data/build.py", line 45, in build_dataset
    dataset = factory(**args)
  File "/IMAGESETS/work/DispRCNN/disprcnn/data/datasets/kitti.py", line 323, in __init__
    super().__init__(root, split, transforms, filter_empty, offline_2d_predictions_path, 'pob')
  File "/IMAGESETS/work/DispRCNN/disprcnn/data/datasets/kitti.py", line 47, in __init__
    self.annotations = self.read_annotations()
  File "/IMAGESETS/work/DispRCNN/disprcnn/data/datasets/kitti.py", line 173, in read_annotations
    anno_per_img = load_label_3(self.root, 'training', i)
  File "/IMAGESETS/work/DispRCNN/disprcnn/utils/kitti_utils.py", line 262, in load_label_3
    with open(absolute_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/IMAGESETS/work/DispRCNN/data/kitti/object/training/label_3/000000.txt'
Traceback (most recent call last):
  File "tools/split_predictions.py", line 36, in <module>
    main()
  File "tools/split_predictions.py", line 32, in main
    split(dir_name, split_path)
  File "tools/split_predictions.py", line 11, in split
    predictions = torch.load(os.path.join(dir_name, 'predictions.pth'), 'cpu')
  File "/IMAGESETS/work/anaconda/envs/disprcnn/lib/python3.7/site-packages/torch/serialization.py", line 381, in load
    f = open(f, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'models/kitti/pob/inference/kitti_val_pob/predictions.pth'
2020-05-29 16:05:53,418 disprcnn INFO: Using 1 GPUs
...
...

I don't have 'data/kitti/object/training/label_3' directory. Could you help?

ootts commented 4 years ago

Duplicate issue. See here for detail.

maheriya commented 4 years ago

Thanks. I should have searched harder before opening the issue!