Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
SOLOv2-pytorch
Commits
52496f55
Commit
52496f55
authored
Oct 20, 2018
by
Kai Chen
Browse files
rename *RoIHead to *BBoxHead
parent
bac11303
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
11 deletions
+11
-11
configs/fast_mask_rcnn_r50_fpn_1x.py
configs/fast_mask_rcnn_r50_fpn_1x.py
+1
-1
configs/fast_rcnn_r50_fpn_1x.py
configs/fast_rcnn_r50_fpn_1x.py
+1
-1
configs/faster_rcnn_r50_fpn_1x.py
configs/faster_rcnn_r50_fpn_1x.py
+1
-1
configs/mask_rcnn_r50_fpn_1x.py
configs/mask_rcnn_r50_fpn_1x.py
+1
-1
mmdet/models/bbox_heads/__init__.py
mmdet/models/bbox_heads/__init__.py
+2
-2
mmdet/models/bbox_heads/convfc_bbox_head.py
mmdet/models/bbox_heads/convfc_bbox_head.py
+5
-5
No files found.
configs/fast_mask_rcnn_r50_fpn_1x.py
View file @
52496f55
...
@@ -20,7 +20,7 @@ model = dict(
...
@@ -20,7 +20,7 @@ model = dict(
out_channels
=
256
,
out_channels
=
256
,
featmap_strides
=
[
4
,
8
,
16
,
32
]),
featmap_strides
=
[
4
,
8
,
16
,
32
]),
bbox_head
=
dict
(
bbox_head
=
dict
(
type
=
'SharedFC
RoI
Head'
,
type
=
'SharedFC
BBox
Head'
,
num_fcs
=
2
,
num_fcs
=
2
,
in_channels
=
256
,
in_channels
=
256
,
fc_out_channels
=
1024
,
fc_out_channels
=
1024
,
...
...
configs/fast_rcnn_r50_fpn_1x.py
View file @
52496f55
...
@@ -20,7 +20,7 @@ model = dict(
...
@@ -20,7 +20,7 @@ model = dict(
out_channels
=
256
,
out_channels
=
256
,
featmap_strides
=
[
4
,
8
,
16
,
32
]),
featmap_strides
=
[
4
,
8
,
16
,
32
]),
bbox_head
=
dict
(
bbox_head
=
dict
(
type
=
'SharedFC
RoI
Head'
,
type
=
'SharedFC
BBox
Head'
,
num_fcs
=
2
,
num_fcs
=
2
,
in_channels
=
256
,
in_channels
=
256
,
fc_out_channels
=
1024
,
fc_out_channels
=
1024
,
...
...
configs/faster_rcnn_r50_fpn_1x.py
View file @
52496f55
...
@@ -30,7 +30,7 @@ model = dict(
...
@@ -30,7 +30,7 @@ model = dict(
out_channels
=
256
,
out_channels
=
256
,
featmap_strides
=
[
4
,
8
,
16
,
32
]),
featmap_strides
=
[
4
,
8
,
16
,
32
]),
bbox_head
=
dict
(
bbox_head
=
dict
(
type
=
'SharedFC
RoI
Head'
,
type
=
'SharedFC
BBox
Head'
,
num_fcs
=
2
,
num_fcs
=
2
,
in_channels
=
256
,
in_channels
=
256
,
fc_out_channels
=
1024
,
fc_out_channels
=
1024
,
...
...
configs/mask_rcnn_r50_fpn_1x.py
View file @
52496f55
...
@@ -30,7 +30,7 @@ model = dict(
...
@@ -30,7 +30,7 @@ model = dict(
out_channels
=
256
,
out_channels
=
256
,
featmap_strides
=
[
4
,
8
,
16
,
32
]),
featmap_strides
=
[
4
,
8
,
16
,
32
]),
bbox_head
=
dict
(
bbox_head
=
dict
(
type
=
'SharedFC
RoI
Head'
,
type
=
'SharedFC
BBox
Head'
,
num_fcs
=
2
,
num_fcs
=
2
,
in_channels
=
256
,
in_channels
=
256
,
fc_out_channels
=
1024
,
fc_out_channels
=
1024
,
...
...
mmdet/models/bbox_heads/__init__.py
View file @
52496f55
from
.bbox_head
import
BBoxHead
from
.bbox_head
import
BBoxHead
from
.convfc_bbox_head
import
ConvFC
RoI
Head
,
SharedFC
RoI
Head
from
.convfc_bbox_head
import
ConvFC
BBox
Head
,
SharedFC
BBox
Head
__all__
=
[
'BBoxHead'
,
'ConvFC
RoI
Head'
,
'SharedFC
RoI
Head'
]
__all__
=
[
'BBoxHead'
,
'ConvFC
BBox
Head'
,
'SharedFC
BBox
Head'
]
mmdet/models/bbox_heads/convfc_bbox_head.py
View file @
52496f55
...
@@ -4,7 +4,7 @@ from .bbox_head import BBoxHead
...
@@ -4,7 +4,7 @@ from .bbox_head import BBoxHead
from
..utils
import
ConvModule
from
..utils
import
ConvModule
class
ConvFC
RoI
Head
(
BBoxHead
):
class
ConvFC
BBox
Head
(
BBoxHead
):
"""More general bbox head, with shared conv and fc layers and two optional
"""More general bbox head, with shared conv and fc layers and two optional
separated branches.
separated branches.
...
@@ -24,7 +24,7 @@ class ConvFCRoIHead(BBoxHead):
...
@@ -24,7 +24,7 @@ class ConvFCRoIHead(BBoxHead):
fc_out_channels
=
1024
,
fc_out_channels
=
1024
,
*
args
,
*
args
,
**
kwargs
):
**
kwargs
):
super
(
ConvFC
RoI
Head
,
self
).
__init__
(
*
args
,
**
kwargs
)
super
(
ConvFC
BBox
Head
,
self
).
__init__
(
*
args
,
**
kwargs
)
assert
(
num_shared_convs
+
num_shared_fcs
+
num_cls_convs
+
num_cls_fcs
assert
(
num_shared_convs
+
num_shared_fcs
+
num_cls_convs
+
num_cls_fcs
+
num_reg_convs
+
num_reg_fcs
>
0
)
+
num_reg_convs
+
num_reg_fcs
>
0
)
if
num_cls_convs
>
0
or
num_reg_convs
>
0
:
if
num_cls_convs
>
0
or
num_reg_convs
>
0
:
...
@@ -116,7 +116,7 @@ class ConvFCRoIHead(BBoxHead):
...
@@ -116,7 +116,7 @@ class ConvFCRoIHead(BBoxHead):
return
branch_convs
,
branch_fcs
,
last_layer_dim
return
branch_convs
,
branch_fcs
,
last_layer_dim
def
init_weights
(
self
):
def
init_weights
(
self
):
super
(
ConvFC
RoI
Head
,
self
).
init_weights
()
super
(
ConvFC
BBox
Head
,
self
).
init_weights
()
for
module_list
in
[
self
.
shared_fcs
,
self
.
cls_fcs
,
self
.
reg_fcs
]:
for
module_list
in
[
self
.
shared_fcs
,
self
.
cls_fcs
,
self
.
reg_fcs
]:
for
m
in
module_list
.
modules
():
for
m
in
module_list
.
modules
():
if
isinstance
(
m
,
nn
.
Linear
):
if
isinstance
(
m
,
nn
.
Linear
):
...
@@ -162,11 +162,11 @@ class ConvFCRoIHead(BBoxHead):
...
@@ -162,11 +162,11 @@ class ConvFCRoIHead(BBoxHead):
return
cls_score
,
bbox_pred
return
cls_score
,
bbox_pred
class
SharedFC
RoI
Head
(
ConvFC
RoI
Head
):
class
SharedFC
BBox
Head
(
ConvFC
BBox
Head
):
def
__init__
(
self
,
num_fcs
=
2
,
fc_out_channels
=
1024
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
num_fcs
=
2
,
fc_out_channels
=
1024
,
*
args
,
**
kwargs
):
assert
num_fcs
>=
1
assert
num_fcs
>=
1
super
(
SharedFC
RoI
Head
,
self
).
__init__
(
super
(
SharedFC
BBox
Head
,
self
).
__init__
(
num_shared_convs
=
0
,
num_shared_convs
=
0
,
num_shared_fcs
=
num_fcs
,
num_shared_fcs
=
num_fcs
,
num_cls_convs
=
0
,
num_cls_convs
=
0
,
...
...
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