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
13555fc3
Unverified
Commit
13555fc3
authored
Nov 19, 2018
by
Francisco Massa
Committed by
GitHub
Nov 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass OUTPUT_DIR to Checkpointer during inference (#101)
parent
7402db8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
bounding_box.py
maskrcnn_benchmark/structures/bounding_box.py
+3
-4
test_net.py
tools/test_net.py
+2
-1
No files found.
maskrcnn_benchmark/structures/bounding_box.py
View file @
13555fc3
...
@@ -224,12 +224,11 @@ class BoxList(object):
...
@@ -224,12 +224,11 @@ class BoxList(object):
return
self
return
self
def
area
(
self
):
def
area
(
self
):
if
self
.
mode
==
'xyxy'
:
box
=
self
.
bbox
if
self
.
mode
==
"xyxy"
:
TO_REMOVE
=
1
TO_REMOVE
=
1
box
=
self
.
bbox
area
=
(
box
[:,
2
]
-
box
[:,
0
]
+
TO_REMOVE
)
*
(
box
[:,
3
]
-
box
[:,
1
]
+
TO_REMOVE
)
area
=
(
box
[:,
2
]
-
box
[:,
0
]
+
TO_REMOVE
)
*
(
box
[:,
3
]
-
box
[:,
1
]
+
TO_REMOVE
)
elif
self
.
mode
==
'xywh'
:
elif
self
.
mode
==
"xywh"
:
box
=
self
.
bbox
area
=
box
[:,
2
]
*
box
[:,
3
]
area
=
box
[:,
2
]
*
box
[:,
3
]
else
:
else
:
raise
RuntimeError
(
"Should not be here"
)
raise
RuntimeError
(
"Should not be here"
)
...
...
tools/test_net.py
View file @
13555fc3
...
@@ -60,7 +60,8 @@ def main():
...
@@ -60,7 +60,8 @@ def main():
model
=
build_detection_model
(
cfg
)
model
=
build_detection_model
(
cfg
)
model
.
to
(
cfg
.
MODEL
.
DEVICE
)
model
.
to
(
cfg
.
MODEL
.
DEVICE
)
checkpointer
=
DetectronCheckpointer
(
cfg
,
model
)
output_dir
=
cfg
.
OUTPUT_DIR
checkpointer
=
DetectronCheckpointer
(
cfg
,
model
,
save_dir
=
output_dir
)
_
=
checkpointer
.
load
(
cfg
.
MODEL
.
WEIGHT
)
_
=
checkpointer
.
load
(
cfg
.
MODEL
.
WEIGHT
)
iou_types
=
(
"bbox"
,)
iou_types
=
(
"bbox"
,)
...
...
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