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
4ab33569
Commit
4ab33569
authored
Dec 14, 2018
by
ywlng
Committed by
Francisco Massa
Dec 14, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix error when running with --show-mask-heatmaps (#274)
parent
2b33e56d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
predictor.py
demo/predictor.py
+2
-1
No files found.
demo/predictor.py
View file @
4ab33569
...
@@ -7,6 +7,7 @@ from maskrcnn_benchmark.modeling.detector import build_detection_model
...
@@ -7,6 +7,7 @@ from maskrcnn_benchmark.modeling.detector import build_detection_model
from
maskrcnn_benchmark.utils.checkpoint
import
DetectronCheckpointer
from
maskrcnn_benchmark.utils.checkpoint
import
DetectronCheckpointer
from
maskrcnn_benchmark.structures.image_list
import
to_image_list
from
maskrcnn_benchmark.structures.image_list
import
to_image_list
from
maskrcnn_benchmark.modeling.roi_heads.mask_head.inference
import
Masker
from
maskrcnn_benchmark.modeling.roi_heads.mask_head.inference
import
Masker
from
maskrcnn_benchmark
import
layers
as
L
class
COCODemo
(
object
):
class
COCODemo
(
object
):
...
@@ -307,7 +308,7 @@ class COCODemo(object):
...
@@ -307,7 +308,7 @@ class COCODemo(object):
"""
"""
masks
=
predictions
.
get_field
(
"mask"
)
masks
=
predictions
.
get_field
(
"mask"
)
masks_per_dim
=
self
.
masks_per_dim
masks_per_dim
=
self
.
masks_per_dim
masks
=
torch
.
nn
.
functional
.
interpolate
(
masks
=
L
.
interpolate
(
masks
.
float
(),
scale_factor
=
1
/
masks_per_dim
masks
.
float
(),
scale_factor
=
1
/
masks_per_dim
)
.
byte
()
)
.
byte
()
height
,
width
=
masks
.
shape
[
-
2
:]
height
,
width
=
masks
.
shape
[
-
2
:]
...
...
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