NVlabs / FB-BEV

Official PyTorch implementation of FB-BEV & FB-OCC - Forward-backward view transformation for vision-centric autonomous driving perception
Other
608 stars 40 forks source link

Bug when running the testing script #5

Closed cdb342 closed 11 months ago

cdb342 commented 11 months ago

File "FB-BEV/mmdet3d/models/fbbev/detectors/fbocc.py", line 486, in forward_test if num_augs==1 and not img_metas[0][0].get('tta_config', dict(dist_tta=False))['dist_tta']: TypeError: 'DataContainer' object is not subscriptable

zhanghm1995 commented 11 months ago

I also encountered this error, have you solved this problem?

Egozjuer commented 11 months ago

I encounted the same question, @zhiqi-li please teel us the reasons

zhiqi-li commented 11 months ago

I think this is the problem of versions of openmmlab packages. The input img_metas still are wrapped with its DataContainer, and this can be solved by calling .data property of DataContainer to recover the raw data.

Egozjuer commented 11 months ago

mmcls 0.25.0 mmcv-full 1.5.2 mmdet 2.24.0 mmdet3d 1.0.0rc4
mmsegmentation 0.24.0 this is my envs,actually it's created according to your install.md,I have tried the following operation: type(img_metas[0]) <class 'mmcv.parallel.data_container.DataContainer'> img_metas[0].data() Traceback (most recent call last): File "", line 1, in TypeError: 'list' object is not callable

As you can see,.data() seems not to be useful for the question @zhiqi-li

cdb342 commented 11 months ago

mmcls 0.25.0 mmcv-full 1.5.2 mmdet 2.24.0 mmdet3d 1.0.0rc4 mmsegmentation 0.24.0 this is my envs,actually it's created according to your install.md,I have tried the following operation: type(img_metas[0]) <class 'mmcv.parallel.data_container.DataContainer'> img_metas[0].data() Traceback (most recent call last): File "", line 1, in TypeError: 'list' object is not callable

As you can see,.data() seems not to be useful for the question @zhiqi-li

I change the code as this and it works:

# if num_augs==1 and not img_metas[0][0].get('tta_config', dict(dist_tta=False))['dist_tta']:
if num_augs==1 and not img_metas[0].data[0][0].get('tta_config', dict(dist_tta=False))['dist_tta']:
    # return self.simple_test(points[0], img_metas[0], img_inputs[0],
    #                     **kwargs)
    return self.simple_test(points[0], img_metas[0].data[0], img_inputs[0],
                        **kwargs)
else:
Gaaaavin commented 6 months ago

@cdb342 Maybe you should consider submitting a pull request that addresses this problem.