Skip to content

Commit

Permalink
[Fix] Fix RegNet pretrained weight loading (#889)
Browse files Browse the repository at this point in the history
* Fix regnet pretrained weight loading

* Remove unused file
  • Loading branch information
yezhen17 committed Aug 29, 2021
1 parent 08dae04 commit 93de7c2
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
_base_ = './hv_pointpillars_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py'

model = dict(
pretrained=dict(pts='open-mmlab://regnetx_1.6gf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch='regnetx_1.6gf',
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://regnetx_1.6gf'),
out_indices=(1, 2, 3),
frozen_stages=-1,
strides=(1, 2, 2, 2),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
_base_ = './hv_pointpillars_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py'

model = dict(
pretrained=dict(pts='open-mmlab://regnetx_1.6gf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch='regnetx_1.6gf',
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://regnetx_1.6gf'),
out_indices=(1, 2, 3),
frozen_stages=-1,
strides=(1, 2, 2, 2),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
_base_ = './hv_pointpillars_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py'

model = dict(
pretrained=dict(pts='open-mmlab://regnetx_3.2gf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch='regnetx_3.2gf',
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://regnetx_3.2gf'),
out_indices=(1, 2, 3),
frozen_stages=-1,
strides=(1, 2, 2, 2),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
_base_ = './hv_pointpillars_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py'

model = dict(
pretrained=dict(pts='open-mmlab://regnetx_3.2gf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch='regnetx_3.2gf',
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://regnetx_3.2gf'),
out_indices=(1, 2, 3),
frozen_stages=-1,
strides=(1, 2, 2, 2),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
_base_ = './hv_pointpillars_fpn_sbn-all_free-anchor_4x8_2x_nus-3d.py'

model = dict(
pretrained=dict(pts='open-mmlab://regnetx_400mf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch='regnetx_400mf',
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://regnetx_400mf'),
out_indices=(1, 2, 3),
frozen_stages=-1,
strides=(1, 2, 2, 2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# model settings
model = dict(
type='MVXFasterRCNN',
pretrained=dict(pts='open-mmlab://regnetx_1.6gf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch='regnetx_1.6gf',
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://regnetx_1.6gf'),
out_indices=(1, 2, 3),
frozen_stages=-1,
strides=(1, 2, 2, 2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# model settings
model = dict(
type='MVXFasterRCNN',
pretrained=dict(pts='open-mmlab://regnetx_400mf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch=dict(w0=24, wa=24.48, wm=2.54, group_w=16, depth=22, bot_mul=1.0),
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://regnetx_400mf'),
out_indices=(1, 2, 3),
frozen_stages=-1,
strides=(1, 2, 2, 2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# model settings
model = dict(
type='MVXFasterRCNN',
pretrained=dict(pts='open-mmlab://regnetx_400mf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch=dict(w0=24, wa=24.48, wm=2.54, group_w=16, depth=22, bot_mul=1.0),
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://regnetx_400mf'),
out_indices=(1, 2, 3),
frozen_stages=-1,
strides=(1, 2, 2, 2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
# model settings
model = dict(
type='MVXFasterRCNN',
pretrained=dict(pts='open-mmlab://regnetx_400mf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch=dict(w0=24, wa=24.48, wm=2.54, group_w=16, depth=22, bot_mul=1.0),
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://regnetx_400mf'),
out_indices=(1, 2, 3),
frozen_stages=-1,
strides=(1, 2, 2, 2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
# model settings
model = dict(
type='MVXFasterRCNN',
pretrained=dict(pts='open-mmlab://regnetx_400mf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch=dict(w0=24, wa=24.48, wm=2.54, group_w=16, depth=22, bot_mul=1.0),
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://regnetx_400mf'),
out_indices=(1, 2, 3),
frozen_stages=-1,
strides=(1, 2, 2, 2),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
# model settings
model = dict(
type='MVXFasterRCNN',
pretrained=dict(pts='open-mmlab://regnetx_400mf'),
pts_backbone=dict(
_delete_=True,
type='NoStemRegNet',
arch=dict(w0=24, wa=24.48, wm=2.54, group_w=16, depth=22, bot_mul=1.0),
init_cfg=dict(
type='Pretrained', checkpoint='open-mmlab://regnetx_400mf'),
out_indices=(1, 2, 3),
frozen_stages=-1,
strides=(1, 2, 2, 2),
Expand Down
4 changes: 2 additions & 2 deletions mmdet3d/models/detectors/mvx_two_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ def __init__(self,
type='Pretrained', checkpoint=img_pretrained)

if self.with_pts_backbone:
if img_pretrained is not None:
if pts_pretrained is not None:
warnings.warn('DeprecationWarning: pretrained is a deprecated '
'key, please consider using init_cfg.')
'key, please consider using init_cfg')
self.pts_backbone.init_cfg = dict(
type='Pretrained', checkpoint=pts_pretrained)

Expand Down

0 comments on commit 93de7c2

Please sign in to comment.