Replace deprecated 'pretrained' with 'init_cfg' in NuImages configs#3141
Open
dhruvildarji wants to merge 1 commit intoopen-mmlab:mainfrom
Open
Replace deprecated 'pretrained' with 'init_cfg' in NuImages configs#3141dhruvildarji wants to merge 1 commit intoopen-mmlab:mainfrom
dhruvildarji wants to merge 1 commit intoopen-mmlab:mainfrom
Conversation
…model configs In mmdet v3.x, the model-level 'pretrained' argument was removed in favor of 'init_cfg' inside the backbone dict. This caused a TypeError when running inference on NuImages models (e.g., MaskRCNN, CascadeRCNN, HybridTaskCascade). Fixes open-mmlab#3136 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
I just signed it. Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pretrainedargument withinit_cfginside thebackbonedict across all NuImages configs and base model configspretrainedparameter was removed from detector constructors (e.g.,MaskRCNN,CascadeRCNN,HybridTaskCascade) in favor ofbackbone.init_cfgTypeError: MaskRCNN.__init__() got an unexpected keyword argument 'pretrained'when running NuImages inference/testingAffected Files
Base model configs:
configs/_base_/models/mask-rcnn_r50_fpn.pyconfigs/_base_/models/cascade-mask-rcnn_r50_fpn.pyNuImages configs (9 files):
mask-rcnn_r101_fpn_1x_nuim.pymask-rcnn_x101_32x4d_fpn_1x_nuim.pymask-rcnn_r50_caffe_fpn_1x_nuim.pymask-rcnn_r50_caffe_fpn_coco-3x_1x_nuim.pymask-rcnn_r50_caffe_fpn_coco-3x_20e_nuim.pycascade-mask-rcnn_r101_fpn_1x_nuim.pycascade-mask-rcnn_x101_32x4d_fpn_1x_nuim.pyhtc_r50_fpn_head-without-semantic_1x_nuim.pyhtc_x101_64x4d_fpn_dconv_c3-c5_coco-20e-1xb16_nuim.pyMigration Pattern
Before:
After:
Fixes #3136