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
3a4fdf64
Commit
3a4fdf64
authored
Nov 13, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FasterRCNN] fix clip_boxes for nd boxes
parent
00ebd097
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
examples/FasterRCNN/common.py
examples/FasterRCNN/common.py
+4
-2
No files found.
examples/FasterRCNN/common.py
View file @
3a4fdf64
...
...
@@ -107,14 +107,16 @@ def segmentation_to_mask(polys, height, width):
def
clip_boxes
(
boxes
,
shape
):
"""
Args:
boxes:
n
x4, float
boxes:
(...)
x4, float
shape: h, w
"""
orig_shape
=
boxes
.
shape
boxes
=
boxes
.
reshape
([
-
1
,
4
])
h
,
w
=
shape
boxes
[:,
[
0
,
1
]]
=
np
.
maximum
(
boxes
[:,
[
0
,
1
]],
0
)
boxes
[:,
2
]
=
np
.
minimum
(
boxes
[:,
2
],
w
)
boxes
[:,
3
]
=
np
.
minimum
(
boxes
[:,
3
],
h
)
return
boxes
return
boxes
.
reshape
(
orig_shape
)
def
print_config
():
...
...
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