Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
a3272aad
You need to sign in or sign up before continuing.
Commit
a3272aad
authored
Jan 09, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FasterRCNN] fix box clipping (fix #587)
parent
efa492d6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
examples/FasterRCNN/eval.py
examples/FasterRCNN/eval.py
+3
-1
No files found.
examples/FasterRCNN/eval.py
View file @
a3272aad
...
@@ -15,7 +15,7 @@ from pycocotools.cocoeval import COCOeval
...
@@ -15,7 +15,7 @@ from pycocotools.cocoeval import COCOeval
import
pycocotools.mask
as
cocomask
import
pycocotools.mask
as
cocomask
from
coco
import
COCOMeta
from
coco
import
COCOMeta
from
common
import
CustomResize
from
common
import
CustomResize
,
clip_boxes
import
config
import
config
DetectionResult
=
namedtuple
(
DetectionResult
=
namedtuple
(
...
@@ -75,6 +75,8 @@ def detect_one_image(img, model_func):
...
@@ -75,6 +75,8 @@ def detect_one_image(img, model_func):
scale
=
(
resized_img
.
shape
[
0
]
*
1.0
/
img
.
shape
[
0
]
+
resized_img
.
shape
[
1
]
*
1.0
/
img
.
shape
[
1
])
/
2
scale
=
(
resized_img
.
shape
[
0
]
*
1.0
/
img
.
shape
[
0
]
+
resized_img
.
shape
[
1
]
*
1.0
/
img
.
shape
[
1
])
/
2
boxes
,
probs
,
labels
,
*
masks
=
model_func
(
resized_img
)
boxes
,
probs
,
labels
,
*
masks
=
model_func
(
resized_img
)
boxes
=
boxes
/
scale
boxes
=
boxes
/
scale
# boxes are already clipped inside the graph, but after the floating point scaling, this may not be true any more.
boxes
=
clip_boxes
(
boxes
,
orig_shape
)
if
masks
:
if
masks
:
# has mask
# has mask
...
...
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