Open3D-ML icon indicating copy to clipboard operation
Open3D-ML copied to clipboard

to_kitti_format() does not return correct 2d box image label

Open ma7555 opened this issue 3 years ago • 1 comments

Checklist

Describe the issue

When running to_kitti_format() on the Object3d object, the returned output does not match the original 2d bounding box on Kitti

Steps to reproduce the bug

import pandas as pd
x = pd.read_pickle('KITTI/bboxes.pkl')
x[0].to_kitti_format()

Output: 'Pedestrian -1.00 -1 -0.21 765.82 225.93 875.76 389.62 1.89 0.48 1.20 1.84 1.47 8.41 0.01 1.00'

Expected behavior

Expected Output (Should match actual label in the txt file): 'Pedestrian -1.00 -1 -0.20 712.40 143.00 810.73 307.92 1.89 0.48 1.20 1.84 1.47 8.41 0.01 1.00'

Open3D, Python and System information

- Operating system: Ubuntu 20.04
- Python version: Python 3.8 
- Open3D version: 0.15.1

image

ma7555 avatar Mar 24 '22 13:03 ma7555

Also running this produces boxes not in the actual image coordinates

cfg_file = "Open3D-ML/ml3d/configs/pointpillars_kitti.yml"
Dataset = _ml3d.utils.get_module("dataset", cfg.dataset.name)
cfg.dataset['dataset_path'] = "KITTI"
dataset = Dataset(cfg.dataset.pop('dataset_path', None), **cfg.dataset)
train = dataset.get_split('training')
sample = train.get_data(0)
sample['bounding_boxes'][0].to_img()

array([765.82352447, 225.93224989, 109.94009787, 163.68462702]) assuming this is in the format of x1, y1, w, l

Which is not equal to the actual targets (after adding x1+w and y1+l)

ma7555 avatar Mar 24 '22 16:03 ma7555