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
3f56920f
Commit
3f56920f
authored
May 23, 2019
by
吴升宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test
parent
708cbb88
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
20190522上衣测试.xlsx
20190522上衣测试.xlsx
+0
-0
predictor.py
demo/predictor.py
+4
-4
test.py
test.py
+0
-0
No files found.
demo/
20190522上衣测试.xlsx
→
20190522上衣测试.xlsx
View file @
3f56920f
File moved
demo/predictor.py
View file @
3f56920f
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import
cv2
import
cv2
import
torch
import
torch
from
skin_detector
import
skin_to_white
#
from skin_detector import skin_to_white
from
torchvision
import
transforms
as
T
from
torchvision
import
transforms
as
T
...
@@ -308,17 +308,17 @@ class COCODemo(object):
...
@@ -308,17 +308,17 @@ class COCODemo(object):
a
,
b
,
c
=
img
.
shape
a
,
b
,
c
=
img
.
shape
for
x
in
range
(
a
):
for
x
in
range
(
a
):
for
y
in
range
(
b
):
for
y
in
range
(
b
):
if
img
[
x
,
y
]
.
tolist
()
<
[
10
,
10
,
10
]:
if
img
[
x
,
y
]
.
tolist
()
<
[
5
,
5
,
5
]:
break
break
img
[
x
,
y
]
=
[
0
,
0
,
0
]
img
[
x
,
y
]
=
[
0
,
0
,
0
]
for
y
in
range
(
b
-
1
,
0
,
-
1
):
for
y
in
range
(
b
-
1
,
0
,
-
1
):
if
img
[
x
,
y
]
.
tolist
()
<
[
10
,
10
,
10
]:
if
img
[
x
,
y
]
.
tolist
()
<
[
5
,
5
,
5
]:
break
break
img
[
x
,
y
]
=
[
0
,
0
,
0
]
img
[
x
,
y
]
=
[
0
,
0
,
0
]
# 把图片皮肤颜色变为白色
# 把图片皮肤颜色变为白色
img
=
skin_to_white
(
img
)
#
img = skin_to_white(img)
composite
=
img
composite
=
img
return
composite
return
composite
...
...
demo/
test.py
→
test.py
View file @
3f56920f
File moved
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