Mmdetection: Assigning class names to checkpoint's meta data

Created on 10 Oct 2020  路  1Comment  路  Source: open-mmlab/mmdetection

I'm getting following after initializing a detector.

UserWarning: Class names are not saved in the checkpoint's meta data, use COCO classes by default.
  warnings.warn('Class names are not saved in the checkpoint\'s '

Here is the code snippet:

config_file = './configs/my_conf/myconf.py'
checkpoint_file = 'logs/latest.pth'
model = init_detector(config_file, checkpoint_file, device='cuda:0')

However I do have cfg.classes=('class1','class2','class3'). I could add a dict key after loading checkpoint file for a workaround but I do not wanna do that. Am I missing something out?

enhancement

>All comments

For now, this seems to be the only workaround, we will enhance this part in the future.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

michaelisc picture michaelisc  路  3Comments

BeBeauty picture BeBeauty  路  3Comments

fmassa picture fmassa  路  3Comments

songyuc picture songyuc  路  3Comments

Youngkl0726 picture Youngkl0726  路  3Comments