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
48647f79
Commit
48647f79
authored
Nov 22, 2018
by
Kai Chen
Browse files
Merge branch 'master' into single-stage
parents
e84af8ce
3f5df4f0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
8 deletions
+11
-8
mmdet/datasets/coco.py
mmdet/datasets/coco.py
+2
-2
mmdet/datasets/loader/build_loader.py
mmdet/datasets/loader/build_loader.py
+4
-4
mmdet/models/bbox_heads/convfc_bbox_head.py
mmdet/models/bbox_heads/convfc_bbox_head.py
+1
-1
mmdet/models/detectors/two_stage.py
mmdet/models/detectors/two_stage.py
+3
-0
mmdet/models/rpn_heads/rpn_head.py
mmdet/models/rpn_heads/rpn_head.py
+1
-1
No files found.
mmdet/datasets/coco.py
View file @
48647f79
...
...
@@ -16,14 +16,14 @@ class CocoDataset(CustomDataset):
self
.
img_ids
=
self
.
coco
.
getImgIds
()
img_infos
=
[]
for
i
in
self
.
img_ids
:
info
=
self
.
coco
.
loadImgs
(
i
)[
0
]
info
=
self
.
coco
.
loadImgs
(
[
i
]
)[
0
]
info
[
'filename'
]
=
info
[
'file_name'
]
img_infos
.
append
(
info
)
return
img_infos
def
get_ann_info
(
self
,
idx
):
img_id
=
self
.
img_infos
[
idx
][
'id'
]
ann_ids
=
self
.
coco
.
getAnnIds
(
imgIds
=
img_id
)
ann_ids
=
self
.
coco
.
getAnnIds
(
imgIds
=
[
img_id
]
)
ann_info
=
self
.
coco
.
loadAnns
(
ann_ids
)
return
self
.
_parse_ann_info
(
ann_info
)
...
...
mmdet/datasets/loader/build_loader.py
View file @
48647f79
...
...
@@ -25,13 +25,13 @@ def build_dataloader(dataset,
batch_size
=
imgs_per_gpu
num_workers
=
workers_per_gpu
else
:
sampler
=
GroupSampler
(
dataset
,
imgs_per_gpu
)
if
not
kwargs
.
get
(
'shuffle'
,
True
):
sampler
=
None
else
:
sampler
=
GroupSampler
(
dataset
,
imgs_per_gpu
)
batch_size
=
num_gpus
*
imgs_per_gpu
num_workers
=
num_gpus
*
workers_per_gpu
if
not
kwargs
.
get
(
'shuffle'
,
True
):
sampler
=
None
data_loader
=
DataLoader
(
dataset
,
batch_size
=
batch_size
,
...
...
mmdet/models/bbox_heads/convfc_bbox_head.py
View file @
48647f79
...
...
@@ -11,7 +11,7 @@ class ConvFCBBoxHead(BBoxHead):
/-> cls convs -> cls fcs -> cls
shared convs -> shared fcs
\-> reg convs -> reg fcs -> reg
"""
"""
# noqa: W605
def
__init__
(
self
,
num_shared_convs
=
0
,
...
...
mmdet/models/detectors/two_stage.py
View file @
48647f79
...
...
@@ -65,6 +65,9 @@ class TwoStageDetector(BaseDetector, RPNTestMixin, BBoxTestMixin,
if
self
.
with_bbox
:
self
.
bbox_roi_extractor
.
init_weights
()
self
.
bbox_head
.
init_weights
()
if
self
.
with_mask
:
self
.
mask_roi_extractor
.
init_weights
()
self
.
mask_head
.
init_weights
()
def
extract_feat
(
self
,
img
):
x
=
self
.
backbone
(
img
)
...
...
mmdet/models/rpn_heads/rpn_head.py
View file @
48647f79
...
...
@@ -30,7 +30,7 @@ class RPNHead(nn.Module):
target_stds (Iterable): Std values of regression targets.
use_sigmoid_cls (bool): Whether to use sigmoid loss for classification.
(softmax by default)
"""
"""
# noqa: W605
def
__init__
(
self
,
in_channels
,
...
...
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