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
13b4f82e
Commit
13b4f82e
authored
Feb 13, 2019
by
Rodrigo Berriel
Committed by
Francisco Massa
Feb 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace with get_img_info on coco_eval (#411)
parent
a694420e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
coco_eval.py
...rcnn_benchmark/data/datasets/evaluation/coco/coco_eval.py
+9
-9
No files found.
maskrcnn_benchmark/data/datasets/evaluation/coco/coco_eval.py
View file @
13b4f82e
...
@@ -75,9 +75,9 @@ def prepare_for_coco_detection(predictions, dataset):
...
@@ -75,9 +75,9 @@ def prepare_for_coco_detection(predictions, dataset):
if
len
(
prediction
)
==
0
:
if
len
(
prediction
)
==
0
:
continue
continue
# TODO replace with get_img_info?
img_info
=
dataset
.
get_img_info
(
image_id
)
image_width
=
dataset
.
coco
.
imgs
[
original_id
]
[
"width"
]
image_width
=
img_info
[
"width"
]
image_height
=
dataset
.
coco
.
imgs
[
original_id
]
[
"height"
]
image_height
=
img_info
[
"height"
]
prediction
=
prediction
.
resize
((
image_width
,
image_height
))
prediction
=
prediction
.
resize
((
image_width
,
image_height
))
prediction
=
prediction
.
convert
(
"xywh"
)
prediction
=
prediction
.
convert
(
"xywh"
)
...
@@ -113,9 +113,9 @@ def prepare_for_coco_segmentation(predictions, dataset):
...
@@ -113,9 +113,9 @@ def prepare_for_coco_segmentation(predictions, dataset):
if
len
(
prediction
)
==
0
:
if
len
(
prediction
)
==
0
:
continue
continue
# TODO replace with get_img_info?
img_info
=
dataset
.
get_img_info
(
image_id
)
image_width
=
dataset
.
coco
.
imgs
[
original_id
]
[
"width"
]
image_width
=
img_info
[
"width"
]
image_height
=
dataset
.
coco
.
imgs
[
original_id
]
[
"height"
]
image_height
=
img_info
[
"height"
]
prediction
=
prediction
.
resize
((
image_width
,
image_height
))
prediction
=
prediction
.
resize
((
image_width
,
image_height
))
masks
=
prediction
.
get_field
(
"mask"
)
masks
=
prediction
.
get_field
(
"mask"
)
# t = time.time()
# t = time.time()
...
@@ -223,9 +223,9 @@ def evaluate_box_proposals(
...
@@ -223,9 +223,9 @@ def evaluate_box_proposals(
for
image_id
,
prediction
in
enumerate
(
predictions
):
for
image_id
,
prediction
in
enumerate
(
predictions
):
original_id
=
dataset
.
id_to_img_map
[
image_id
]
original_id
=
dataset
.
id_to_img_map
[
image_id
]
# TODO replace with get_img_info?
img_info
=
dataset
.
get_img_info
(
image_id
)
image_width
=
dataset
.
coco
.
imgs
[
original_id
]
[
"width"
]
image_width
=
img_info
[
"width"
]
image_height
=
dataset
.
coco
.
imgs
[
original_id
]
[
"height"
]
image_height
=
img_info
[
"height"
]
prediction
=
prediction
.
resize
((
image_width
,
image_height
))
prediction
=
prediction
.
resize
((
image_width
,
image_height
))
# sort predictions in descending order
# sort predictions in descending order
...
...
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