Skip to content

Instantly share code, notes, and snippets.

@mponty
Created July 14, 2019 22:51
Show Gist options
  • Save mponty/8ba6b7a6c8a33d849f944f50b55368b0 to your computer and use it in GitHub Desktop.
Save mponty/8ba6b7a6c8a33d849f944f50b55368b0 to your computer and use it in GitHub Desktop.
cfg['model']['mask_head']['num_classes'] = N_CLASSES + 1
if isinstance(cfg['model']['bbox_head'], list):
for i in range(len(cfg['model']['bbox_head'])):
cfg['model']['bbox_head'][i]['num_classes'] = N_CLASSES + 1
else:
cfg['model']['bbox_head']['num_classes'] = N_CLASSES + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment