Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify model initialization #235

Merged
merged 11 commits into from
Aug 10, 2021
5 changes: 3 additions & 2 deletions configs/_base_/models/cascade_mask_rcnn_r50_fpn.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
model = dict(
detector=dict(
type='CascadeRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
@@ -11,7 +10,9 @@
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch'),
style='pytorch',
init_cfg=dict(
type='Pretrained', checkpoint='torchvision://resnet50')),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
5 changes: 3 additions & 2 deletions configs/_base_/models/cascade_rcnn_r50_fpn.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
model = dict(
detector=dict(
type='CascadeRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
@@ -11,7 +10,9 @@
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch'),
style='pytorch',
init_cfg=dict(
type='Pretrained', checkpoint='torchvision://resnet50')),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
6 changes: 4 additions & 2 deletions configs/_base_/models/faster_rcnn_r50_caffe_c4.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,6 @@
model = dict(
detector=dict(
type='FasterRCNN',
pretrained='open-mmlab://detectron2/resnet50_caffe',
backbone=dict(
type='ResNet',
depth=50,
@@ -14,7 +13,10 @@
frozen_stages=1,
norm_cfg=norm_cfg,
norm_eval=True,
style='caffe'),
style='caffe',
init_cfg=dict(
type='Pretrained',
checkpoint='open-mmlab://detectron2/resnet50_caffe')),
rpn_head=dict(
type='RPNHead',
in_channels=1024,
5 changes: 3 additions & 2 deletions configs/_base_/models/faster_rcnn_r50_dc5.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
model = dict(
detector=dict(
type='FasterRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
@@ -12,7 +11,9 @@
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch'),
style='pytorch',
init_cfg=dict(
type='Pretrained', checkpoint='torchvision://resnet50')),
neck=dict(
type='ChannelMapper',
in_channels=[2048],
5 changes: 3 additions & 2 deletions configs/_base_/models/faster_rcnn_r50_fpn.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
model = dict(
detector=dict(
type='FasterRCNN',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
@@ -10,7 +9,9 @@
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch'),
style='pytorch',
init_cfg=dict(
type='Pretrained', checkpoint='torchvision://resnet50')),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
5 changes: 3 additions & 2 deletions configs/_base_/models/retinanet_r50_fpn.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
model = dict(
detector=dict(
type='RetinaNet',
pretrained='torchvision://resnet50',
backbone=dict(
type='ResNet',
depth=50,
@@ -11,7 +10,9 @@
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch'),
style='pytorch',
init_cfg=dict(
type='Pretrained', checkpoint='torchvision://resnet50')),
neck=dict(
type='FPN',
in_channels=[256, 512, 1024, 2048],
13 changes: 9 additions & 4 deletions configs/det/faster-rcnn_r101_fpn_4e_mot17-half.py
Original file line number Diff line number Diff line change
@@ -2,7 +2,12 @@
_base_ = ['./faster-rcnn_r50_fpn_4e_mot17-half.py']
model = dict(
detector=dict(
pretrained='torchvision://resnet101', backbone=dict(depth=101)))
load_from = ('http://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/'
'faster_rcnn_r101_fpn_2x_coco/faster_rcnn_r101_fpn_2x_coco_bbox_'
'mAP-0.398_20200504_210455-1d2dac9c.pth')
backbone=dict(
depth=101,
init_cfg=dict(
type='Pretrained', checkpoint='torchvision://resnet101')),
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'http://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r101_fpn_2x_coco/faster_rcnn_r101_fpn_2x_coco_bbox_mAP-0.398_20200504_210455-1d2dac9c.pth' # noqa: E501
)))
11 changes: 6 additions & 5 deletions configs/det/faster-rcnn_r50_fpn_4e_mot17-half.py
Original file line number Diff line number Diff line change
@@ -7,8 +7,12 @@
detector=dict(
rpn_head=dict(bbox_coder=dict(clip_border=False)),
roi_head=dict(
bbox_head=dict(bbox_coder=dict(
clip_border=False), num_classes=1))))
bbox_head=dict(bbox_coder=dict(clip_border=False), num_classes=1)),
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'http://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_2x_coco/faster_rcnn_r50_fpn_2x_coco_bbox_mAP-0.384_20200504_210434-a5d8aa15.pth' # noqa: E501
)))
# learning policy
lr_config = dict(
policy='step',
@@ -18,6 +22,3 @@
step=[3])
# runtime settings
total_epochs = 4
load_from = ('http://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/'
'faster_rcnn_r50_fpn_2x_coco/faster_rcnn_r50_fpn_2x_coco_'
'bbox_mAP-0.384_20200504_210434-a5d8aa15.pth')
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
_base_ = [
'../mot/tracktor/tracktor_faster-rcnn_r50_fpn_4e_mot17-private-half.py'
]

model = dict(
pretrains=dict(
detector= # noqa: E251
'https://download.openmmlab.com/mmtracking/fp16/faster-rcnn_r50_fpn_fp16_4e_mot17-half_20210730_002436-f4ba7d61.pth', # noqa: E501
reid= # noqa: E251
'https://download.openmmlab.com/mmtracking/fp16/reid_r50_fp16_8x32_6e_mot17_20210731_033055-4747ee95.pth' # noqa: E501
))
detector=dict(
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/fp16/faster-rcnn_r50_fpn_fp16_4e_mot17-half_20210730_002436-f4ba7d61.pth' # noqa: E501
)),
reid=dict(
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/fp16/reid_r50_fp16_8x32_6e_mot17_20210731_033055-4747ee95.pth' # noqa: E501
)))
fp16 = dict(loss_scale=512.)
Original file line number Diff line number Diff line change
@@ -4,17 +4,15 @@
]
model = dict(
type='DeepSORT',
pretrains=dict(
detector= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-half-64ee2ed4.pth', # noqa: E501
reid= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/reid/tracktor_reid_r50_iter25245-a452f51f.pth' # noqa: E501
),
detector=dict(
rpn_head=dict(bbox_coder=dict(clip_border=False)),
roi_head=dict(
bbox_head=dict(bbox_coder=dict(
clip_border=False), num_classes=1))),
bbox_head=dict(bbox_coder=dict(clip_border=False), num_classes=1)),
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-half-64ee2ed4.pth' # noqa: E501
)),
motion=dict(type='KalmanFilter', center_only=False),
reid=dict(
type='BaseReID',
@@ -36,7 +34,12 @@
loss_pairwise=dict(
type='TripletLoss', margin=0.3, loss_weight=1.0),
norm_cfg=dict(type='BN1d'),
act_cfg=dict(type='ReLU'))),
act_cfg=dict(type='ReLU')),
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/reid/tracktor_reid_r50_iter25245-a452f51f.pth' # noqa: E501
)),
tracker=dict(
type='SortTracker',
obj_score_thr=0.5,
Original file line number Diff line number Diff line change
@@ -4,15 +4,15 @@
]
model = dict(
type='DeepSORT',
pretrains=dict(
detector= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-half-64ee2ed4.pth' # noqa: E501
),
detector=dict(
rpn_head=dict(bbox_coder=dict(clip_border=False)),
roi_head=dict(
bbox_head=dict(bbox_coder=dict(
clip_border=False), num_classes=1))),
bbox_head=dict(bbox_coder=dict(clip_border=False), num_classes=1)),
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-half-64ee2ed4.pth' # noqa: E501
)),
motion=dict(type='KalmanFilter', center_only=False),
tracker=dict(
type='SortTracker', obj_score_thr=0.5, match_iou_thr=0.5, reid=None))
10 changes: 6 additions & 4 deletions configs/mot/deepsort/sort_faster-rcnn_fpn_4e_mot17-private.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
_base_ = ['./sort_faster-rcnn_fpn_4e_mot17-private-half.py']
model = dict(
pretrains=dict(
detector= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-ffa52ae7.pth' # noqa: E501
))
detector=dict(
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-ffa52ae7.pth' # noqa: E501
)))
data_root = 'data/MOT17/'
test_set = 'train'
data = dict(
10 changes: 6 additions & 4 deletions configs/mot/deepsort/sort_faster-rcnn_fpn_4e_mot17-public.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
_base_ = ['./sort_faster-rcnn_fpn_4e_mot17-public-half.py']
model = dict(
pretrains=dict(
detector= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-ffa52ae7.pth' # noqa: E501
))
detector=dict(
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot17-ffa52ae7.pth' # noqa: E501
)))
data_root = 'data/MOT17/'
test_set = 'train'
data = dict(
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
_base_ = ['./tracktor_faster-rcnn_r50_fpn_4e_mot17-private-half.py']

model = dict(
pretrains=dict(
detector= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot15-half_20210804_001040-ae733d0c.pth', # noqa: E501
reid= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/reid/reid_r50_6e_mot15_20210803_192157-65b5e2d7.pth' # noqa: E501
),
reid=dict(head=dict(num_classes=375)))
detector=dict(
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot15-half_20210804_001040-ae733d0c.pth' # noqa: E501
)),
reid=dict(
head=dict(num_classes=375),
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/reid/reid_r50_6e_mot15_20210803_192157-65b5e2d7.pth' # noqa: E501
)))
# data
data_root = 'data/MOT15/'
data = dict(
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
_base_ = ['./tracktor_faster-rcnn_r50_fpn_4e_mot17-private-half.py']

model = dict(
pretrains=dict(
detector= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot15-half_20210804_001040-ae733d0c.pth', # noqa: E501
reid= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/reid/reid_r50_6e_mot15_20210803_192157-65b5e2d7.pth' # noqa: E501
),
reid=dict(head=dict(num_classes=375)))
detector=dict(
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot15-half_20210804_001040-ae733d0c.pth' # noqa: E501
)),
reid=dict(
head=dict(num_classes=375),
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/reid/reid_r50_6e_mot15_20210803_192157-65b5e2d7.pth' # noqa: E501
)))
# data
data_root = 'data/MOT15/'
img_norm_cfg = dict(
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
_base_ = ['./tracktor_faster-rcnn_r50_fpn_4e_mot17-private-half.py']

model = dict(
pretrains=dict(
detector= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot16-half_20210804_001054-73477869.pth', # noqa: E501
reid= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/reid/reid_r50_6e_mot16_20210803_204826-1b3e3cfd.pth' # noqa: E501
),
reid=dict(head=dict(num_classes=375)))
detector=dict(
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot16-half_20210804_001054-73477869.pth' # noqa: E501
)),
reid=dict(
head=dict(num_classes=375),
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/reid/reid_r50_6e_mot16_20210803_204826-1b3e3cfd.pth' # noqa: E501
)))
# data
data_root = 'data/MOT16/'
data = dict(
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
_base_ = ['./tracktor_faster-rcnn_r50_fpn_4e_mot17-private-half.py']

model = dict(
pretrains=dict(
detector= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot16-half_20210804_001054-73477869.pth', # noqa: E501
reid= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/reid/reid_r50_6e_mot16_20210803_204826-1b3e3cfd.pth' # noqa: E501
),
reid=dict(head=dict(num_classes=375)))
detector=dict(
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/faster_rcnn/faster-rcnn_r50_fpn_4e_mot16-half_20210804_001054-73477869.pth' # noqa: E501
)),
reid=dict(
head=dict(num_classes=375),
init_cfg=dict(
type='Pretrained',
checkpoint= # noqa: E251
'https://download.openmmlab.com/mmtracking/mot/reid/reid_r50_6e_mot16_20210803_204826-1b3e3cfd.pth' # noqa: E501
)))
# data
data_root = 'data/MOT16/'
img_norm_cfg = dict(
Loading