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
839c74b7
"rust/git@developer.sourcefind.cn:change/sglang.git" did not exist on "6387098f5f98101ee103732efe8da9d6cb54d92d"
Commit
839c74b7
authored
Oct 10, 2018
by
pangjm
Browse files
fix fast rcnn bugs
parent
630687f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
mmdet/datasets/coco.py
mmdet/datasets/coco.py
+10
-3
No files found.
mmdet/datasets/coco.py
View file @
839c74b7
...
@@ -53,8 +53,14 @@ class CocoDataset(Dataset):
...
@@ -53,8 +53,14 @@ class CocoDataset(Dataset):
# color channel order and normalize configs
# color channel order and normalize configs
self
.
img_norm_cfg
=
img_norm_cfg
self
.
img_norm_cfg
=
img_norm_cfg
# proposals
# proposals
self
.
proposals
=
mmcv
.
load
(
# TODO: revise _filter_imgs to be more flexible
proposal_file
)
if
proposal_file
is
not
None
else
None
if
proposal_file
is
not
None
:
self
.
proposals
=
mmcv
.
load
(
proposal_file
)
ori_ids
=
self
.
coco
.
getImgIds
()
sorted_idx
=
[
ori_ids
.
index
(
id
)
for
id
in
self
.
img_ids
]
self
.
proposals
=
[
self
.
proposals
[
idx
]
for
idx
in
sorted_idx
]
else
:
self
.
proposals
=
None
self
.
num_max_proposals
=
num_max_proposals
self
.
num_max_proposals
=
num_max_proposals
# flip ratio
# flip ratio
self
.
flip_ratio
=
flip_ratio
self
.
flip_ratio
=
flip_ratio
...
@@ -271,7 +277,8 @@ class CocoDataset(Dataset):
...
@@ -271,7 +277,8 @@ class CocoDataset(Dataset):
scale_factor
=
scale_factor
,
scale_factor
=
scale_factor
,
flip
=
flip
)
flip
=
flip
)
if
proposal
is
not
None
:
if
proposal
is
not
None
:
_proposal
=
self
.
bbox_transform
(
proposal
,
scale_factor
,
flip
)
_proposal
=
self
.
bbox_transform
(
proposal
,
img_shape
,
scale_factor
,
flip
)
_proposal
=
to_tensor
(
_proposal
)
_proposal
=
to_tensor
(
_proposal
)
else
:
else
:
_proposal
=
None
_proposal
=
None
...
...
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