fangchangma / self-supervised-depth-completion

ICRA 2019 "Self-supervised Sparse-to-Dense: Self-supervised Depth Completion from LiDAR and Monocular Camera"
MIT License
623 stars 135 forks source link

How to test with KITTI object detection dataset #16

Open JenningsL opened 5 years ago

JenningsL commented 5 years ago

I am trying to use your code with KITTI object detection dataset.

  1. Generate depth map by projecting the Lidar points to image plane
  2. Put image_2 and generated depth map to test_depth_completion_anonymous folder
  3. Run with test_completion mode

However, I got the following error

Traceback (most recent call last):
  File "main.py", line 248, in <module>
    main()
  File "main.py", line 231, in main
    result, is_best = iterate("test_completion", args, val_loader, model, None, logger, checkpoint['epoch'])
  File "main.py", line 105, in iterate
    pred = model(batch_data)
  File "/data/ssd/public/jlliu/pythonlib/lib/python2.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/data/ssd/public/jlliu/pythonlib/lib/python2.7/site-packages/torch/nn/parallel/data_parallel.py", line 141, in forward
    return self.module(*inputs[0], **kwargs[0])
  File "/data/ssd/public/jlliu/pythonlib/lib/python2.7/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/data/ssd/public/jlliu/depth_completion/self-supervised-depth-completion/model.py", line 126, in forward
    y = torch.cat((convt5, conv5), 1)
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 1. Got 47 and 48 in dimension 2 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:83

Did I miss something?

Rajat-Mehta commented 4 years ago

@JenningsL @fangchangma did you find the solution?

I also want to do inference on test data using the model I trained. But I couldn't find any documentation on how to do that.

And what is this test_completion mode and how to use it?

Thanks in advance.