dvlab-research / VoxelNeXt

VoxelNeXt: Fully Sparse VoxelNet for 3D Object Detection and Tracking (CVPR 2023)
https://arxiv.org/abs/2303.11301
Apache License 2.0
735 stars 64 forks source link

KeyError 'model_state' while loading checkpoint #50

Open ArseniuML opened 1 year ago

ArseniuML commented 1 year ago

I am trying to start inference on Argoverse2 dataset via the next command:

python test.py --cfg_file cfgs/argo2_models/cbgs_voxel01_voxelnext.yam --ckpt ../../VoxelNeXt_Argo2.pth --set DATA_CONFIG.DATA_SPLIT.test val

However, there is an error while loading checkpoint:

KeyError: 'model_state'

This code produces as error:

def load_params_from_file(self, filename, logger, to_cpu=False, pre_trained_path=None):
    if not os.path.isfile(filename):
        raise FileNotFoundError

    logger.info('==> Loading parameters from checkpoint %s to %s' % (filename, 'CPU' if to_cpu else 'GPU'))
    loc_type = torch.device('cpu') if to_cpu else None
    checkpoint = torch.load(filename, map_location=loc_type)
    model_state_disk = checkpoint['model_state']

VoxelNeXt_Argo2.pth is the file, downloaded from your website link. What am I doing wrong?

ChunZheng2022 commented 7 months ago

I have encountered the same problem. Have you resolved it