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
4a333692
Commit
4a333692
authored
Nov 02, 2018
by
Yan Li
Committed by
Francisco Massa
Nov 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quick fix for area (#98)
* quick fix for area * Update bounding_box.py
parent
b4182125
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
bounding_box.py
maskrcnn_benchmark/structures/bounding_box.py
+10
-3
No files found.
maskrcnn_benchmark/structures/bounding_box.py
View file @
4a333692
...
@@ -224,9 +224,16 @@ class BoxList(object):
...
@@ -224,9 +224,16 @@ class BoxList(object):
return
self
return
self
def
area
(
self
):
def
area
(
self
):
TO_REMOVE
=
1
if
self
.
mode
==
'xyxy'
:
box
=
self
.
bbox
TO_REMOVE
=
1
area
=
(
box
[:,
2
]
-
box
[:,
0
]
+
TO_REMOVE
)
*
(
box
[:,
3
]
-
box
[:,
1
]
+
TO_REMOVE
)
box
=
self
.
bbox
area
=
(
box
[:,
2
]
-
box
[:,
0
]
+
TO_REMOVE
)
*
(
box
[:,
3
]
-
box
[:,
1
]
+
TO_REMOVE
)
elif
self
.
mode
==
'xywh'
:
box
=
self
.
bbox
area
=
box
[:,
2
]
*
box
[:,
3
]
else
:
raise
RuntimeError
(
"Should not be here"
)
return
area
return
area
def
copy_with_fields
(
self
,
fields
):
def
copy_with_fields
(
self
,
fields
):
...
...
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