Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
maskrcnn
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
人工智能
maskrcnn
Commits
519e8dd4
Commit
519e8dd4
authored
Feb 04, 2019
by
Levi Viana
Committed by
Francisco Massa
Feb 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding support to Caffe2 ResNeXt-152-32x8d-FPN-IN5k backbone for Mask R-CNN (#405)
parent
ebc593a2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
1 deletion
+48
-1
e2e_mask_rcnn_X-152-32x8d-FPN-IN5k_1.44x_caffe2.yaml
...ffe2/e2e_mask_rcnn_X-152-32x8d-FPN-IN5k_1.44x_caffe2.yaml
+38
-0
paths_catalog.py
maskrcnn_benchmark/config/paths_catalog.py
+1
-0
backbone.py
maskrcnn_benchmark/modeling/backbone/backbone.py
+1
-0
resnet.py
maskrcnn_benchmark/modeling/backbone/resnet.py
+6
-1
c2_model_loading.py
maskrcnn_benchmark/utils/c2_model_loading.py
+2
-0
No files found.
configs/caffe2/e2e_mask_rcnn_X-152-32x8d-FPN-IN5k_1.44x_caffe2.yaml
0 → 100644
View file @
519e8dd4
MODEL
:
META_ARCHITECTURE
:
"
GeneralizedRCNN"
WEIGHT
:
"
catalog://Caffe2Detectron/COCO/37129812/e2e_mask_rcnn_X-152-32x8d-FPN-IN5k_1.44x"
BACKBONE
:
CONV_BODY
:
"
R-152-FPN"
OUT_CHANNELS
:
256
RPN
:
USE_FPN
:
True
ANCHOR_STRIDE
:
(4, 8, 16, 32, 64)
PRE_NMS_TOP_N_TRAIN
:
2000
PRE_NMS_TOP_N_TEST
:
1000
POST_NMS_TOP_N_TEST
:
1000
FPN_POST_NMS_TOP_N_TEST
:
1000
ROI_HEADS
:
USE_FPN
:
True
ROI_BOX_HEAD
:
POOLER_RESOLUTION
:
7
POOLER_SCALES
:
(0.25, 0.125, 0.0625, 0.03125)
POOLER_SAMPLING_RATIO
:
2
FEATURE_EXTRACTOR
:
"
FPN2MLPFeatureExtractor"
PREDICTOR
:
"
FPNPredictor"
ROI_MASK_HEAD
:
POOLER_SCALES
:
(0.25, 0.125, 0.0625, 0.03125)
FEATURE_EXTRACTOR
:
"
MaskRCNNFPNFeatureExtractor"
PREDICTOR
:
"
MaskRCNNC4Predictor"
POOLER_RESOLUTION
:
14
POOLER_SAMPLING_RATIO
:
2
RESOLUTION
:
28
SHARE_BOX_FEATURE_EXTRACTOR
:
False
RESNETS
:
STRIDE_IN_1X1
:
False
NUM_GROUPS
:
32
WIDTH_PER_GROUP
:
8
MASK_ON
:
True
DATASETS
:
TEST
:
("coco_2014_minival",)
DATALOADER
:
SIZE_DIVISIBILITY
:
32
maskrcnn_benchmark/config/paths_catalog.py
View file @
519e8dd4
...
@@ -137,6 +137,7 @@ class ModelCatalog(object):
...
@@ -137,6 +137,7 @@ class ModelCatalog(object):
"35858933/e2e_mask_rcnn_R-50-FPN_1x"
:
"01_48_14.DzEQe4wC"
,
"35858933/e2e_mask_rcnn_R-50-FPN_1x"
:
"01_48_14.DzEQe4wC"
,
"35861795/e2e_mask_rcnn_R-101-FPN_1x"
:
"02_31_37.KqyEK4tT"
,
"35861795/e2e_mask_rcnn_R-101-FPN_1x"
:
"02_31_37.KqyEK4tT"
,
"36761843/e2e_mask_rcnn_X-101-32x8d-FPN_1x"
:
"06_35_59.RZotkLKI"
,
"36761843/e2e_mask_rcnn_X-101-32x8d-FPN_1x"
:
"06_35_59.RZotkLKI"
,
"37129812/e2e_mask_rcnn_X-152-32x8d-FPN-IN5k_1.44x"
:
"09_35_36.8pzTQKYK"
,
}
}
@staticmethod
@staticmethod
...
...
maskrcnn_benchmark/modeling/backbone/backbone.py
View file @
519e8dd4
...
@@ -21,6 +21,7 @@ def build_resnet_backbone(cfg):
...
@@ -21,6 +21,7 @@ def build_resnet_backbone(cfg):
@registry.BACKBONES.register
(
"R-50-FPN"
)
@registry.BACKBONES.register
(
"R-50-FPN"
)
@registry.BACKBONES.register
(
"R-101-FPN"
)
@registry.BACKBONES.register
(
"R-101-FPN"
)
@registry.BACKBONES.register
(
"R-152-FPN"
)
def
build_resnet_fpn_backbone
(
cfg
):
def
build_resnet_fpn_backbone
(
cfg
):
body
=
resnet
.
ResNet
(
cfg
)
body
=
resnet
.
ResNet
(
cfg
)
in_channels_stage2
=
cfg
.
MODEL
.
RESNETS
.
RES2_OUT_CHANNELS
in_channels_stage2
=
cfg
.
MODEL
.
RESNETS
.
RES2_OUT_CHANNELS
...
...
maskrcnn_benchmark/modeling/backbone/resnet.py
View file @
519e8dd4
...
@@ -71,7 +71,11 @@ ResNet101FPNStagesTo5 = tuple(
...
@@ -71,7 +71,11 @@ ResNet101FPNStagesTo5 = tuple(
StageSpec
(
index
=
i
,
block_count
=
c
,
return_features
=
r
)
StageSpec
(
index
=
i
,
block_count
=
c
,
return_features
=
r
)
for
(
i
,
c
,
r
)
in
((
1
,
3
,
True
),
(
2
,
4
,
True
),
(
3
,
23
,
True
),
(
4
,
3
,
True
))
for
(
i
,
c
,
r
)
in
((
1
,
3
,
True
),
(
2
,
4
,
True
),
(
3
,
23
,
True
),
(
4
,
3
,
True
))
)
)
# ResNet-152-FPN (including all stages)
ResNet152FPNStagesTo5
=
tuple
(
StageSpec
(
index
=
i
,
block_count
=
c
,
return_features
=
r
)
for
(
i
,
c
,
r
)
in
((
1
,
3
,
True
),
(
2
,
8
,
True
),
(
3
,
36
,
True
),
(
4
,
3
,
True
))
)
class
ResNet
(
nn
.
Module
):
class
ResNet
(
nn
.
Module
):
def
__init__
(
self
,
cfg
):
def
__init__
(
self
,
cfg
):
...
@@ -407,4 +411,5 @@ _STAGE_SPECS = Registry({
...
@@ -407,4 +411,5 @@ _STAGE_SPECS = Registry({
"R-101-C5"
:
ResNet101StagesTo5
,
"R-101-C5"
:
ResNet101StagesTo5
,
"R-50-FPN"
:
ResNet50FPNStagesTo5
,
"R-50-FPN"
:
ResNet50FPNStagesTo5
,
"R-101-FPN"
:
ResNet101FPNStagesTo5
,
"R-101-FPN"
:
ResNet101FPNStagesTo5
,
"R-152-FPN"
:
ResNet152FPNStagesTo5
,
})
})
maskrcnn_benchmark/utils/c2_model_loading.py
View file @
519e8dd4
...
@@ -146,6 +146,7 @@ def _load_c2_pickled_weights(file_path):
...
@@ -146,6 +146,7 @@ def _load_c2_pickled_weights(file_path):
_C2_STAGE_NAMES
=
{
_C2_STAGE_NAMES
=
{
"R-50"
:
[
"1.2"
,
"2.3"
,
"3.5"
,
"4.2"
],
"R-50"
:
[
"1.2"
,
"2.3"
,
"3.5"
,
"4.2"
],
"R-101"
:
[
"1.2"
,
"2.3"
,
"3.22"
,
"4.2"
],
"R-101"
:
[
"1.2"
,
"2.3"
,
"3.22"
,
"4.2"
],
"R-152"
:
[
"1.2"
,
"2.7"
,
"3.35"
,
"4.2"
],
}
}
C2_FORMAT_LOADER
=
Registry
()
C2_FORMAT_LOADER
=
Registry
()
...
@@ -157,6 +158,7 @@ C2_FORMAT_LOADER = Registry()
...
@@ -157,6 +158,7 @@ C2_FORMAT_LOADER = Registry()
@C2_FORMAT_LOADER.register
(
"R-101-C5"
)
@C2_FORMAT_LOADER.register
(
"R-101-C5"
)
@C2_FORMAT_LOADER.register
(
"R-50-FPN"
)
@C2_FORMAT_LOADER.register
(
"R-50-FPN"
)
@C2_FORMAT_LOADER.register
(
"R-101-FPN"
)
@C2_FORMAT_LOADER.register
(
"R-101-FPN"
)
@C2_FORMAT_LOADER.register
(
"R-152-FPN"
)
def
load_resnet_c2_format
(
cfg
,
f
):
def
load_resnet_c2_format
(
cfg
,
f
):
state_dict
=
_load_c2_pickled_weights
(
f
)
state_dict
=
_load_c2_pickled_weights
(
f
)
conv_body
=
cfg
.
MODEL
.
BACKBONE
.
CONV_BODY
conv_body
=
cfg
.
MODEL
.
BACKBONE
.
CONV_BODY
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment