A small bug in concat_batcher.py
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 365
- Avg merge
- 4h 6m
- Merged PRs (30d)
- 1
Description
In the [concat_batcher.py](https://github.com/isl-org/Open3D-ML/blob/main/ml3d/torch/dataloaders/concat_batcher.py) file, in the implementation of the class ObjectDetectBatch,
```
class ObjectDetectBatch:
def __init__(self, batches):
"""Initialize.
Args:
batches: A batch of data
Returns:
class: The corresponding class.
"""
self.point = []
self.labels = []
self.bboxes = []
self.bbox_objs = []
self.calib = []
self.attr = []
for batch in batches:
data = batch['data']
self.point.append(torch.tensor(data['point'], dtype=torch.float32))
self.labels.append(
torch.tensor(data['labels'], dtype=torch.int64) if 'labels' in
data else None)
if len(data.get('bboxes', [])) > 0:
self.bboxes.append(
torch.tensor(data['bboxes'], dtype=torch.float32
) if 'bboxes' in data else None)
else:
self.bboxes.append(torch.zeros((0, 7)))
self.bbox_objs.append(data.get('bbox_objs'))
self.calib.append(data.get('calib'))
```
shouldn't we add a line
`self.attr.append(batch['attr'])`
in the end of the `__init__` function? Otherwise the 'attr' field is missing, and it causes `save_test_result()` function in kitti.py not saving anything.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.