open-mmlab / mmdetection3d

OpenMMLab's next-generation platform for general 3D object detection.
https://mmdetection3d.readthedocs.io/en/latest/
Apache License 2.0
5.31k stars 1.54k forks source link

请问下新版本是取消了DataContainer吗 #2523

Open 51762344 opened 1 year ago

51762344 commented 1 year ago

有什么比较好的方法打包输入不同长度的GT呢

mm-assistant[bot] commented 1 year ago

We recommend using English or English & Chinese for issues so that we could have broader discussion.

JingweiZhang12 commented 1 year ago

The metainfo, such as camera calibration, is recorded in Det3dDataSample data structure in the new version. In the old version, it is recorded into DataContainer.

1uciusy commented 1 year ago

The metainfo, such as camera calibration, is recorded in Det3dDataSample data structure in the new version. In the old version, it is recorded into DataContainer.

@JingweiZhang12 Hi, when I use Pack3DDetInputs as the last transform of a pipeline in the dataset, if I try to use the data loader like dl = DataLoader(dataset, batch_size=2) and run next(tier(dl)) to have a look at a batch of data, exception traceback would appear like:

TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class 'mmdet3d.structures.det3d_data_sample.Det3DDataSample'>

But I saw many sample codes use Pack3DDetInputs last in the pipeline, do I use it wrong? Or the class Det3DDataSample could be transferred to tensor in some certain situation I have not learnt?

Ekko82 commented 2 weeks ago

Actually, you can directly migrate mmcv.parallel.data_container.DataContainer to the desired location, as it does not depend on the mm-series libraries.