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
bdaeaaac
Commit
bdaeaaac
authored
May 23, 2019
by
吴升宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test
parent
9d443b13
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
20 deletions
+20
-20
20190522上衣测试.xlsx
demo/20190522上衣测试.xlsx
+0
-0
test.py
demo/test.py
+15
-16
webcam.py
demo/webcam.py
+0
-2
work.py
demo/work.py
+5
-2
No files found.
demo/20190522上衣测试.xlsx
0 → 100644
View file @
bdaeaaac
File added
demo/test.py
View file @
bdaeaaac
import
os
import
xlrd
from
multiprocessing
import
Process
import
cv2
from
threading
import
Thread
from
three_color
import
handle_from_url
from
webcam
import
img_to_three_color_map
def
main
():
def
read_excel
():
rs
=
os
.
walk
(
'../../fashionbase/images/dataset_0520/weiyi
'
)
data
=
xlrd
.
open_workbook
(
'20190522上衣测试.xlsx
'
)
for
a
,
b
,
c
in
rs
:
table
=
data
.
sheets
()[
0
]
for
i
in
c
[:
100
]:
nrows
=
table
.
nrows
source_path
=
'../../fashionbase/images/dataset_0520/weiyi/'
+
i
for
i
in
range
(
nrows
):
target_path
=
'output/'
+
i
url
=
table
.
row_values
(
i
)[
1
]
print
(
source_path
)
path
=
url
.
split
(
'/'
)[
-
1
]
print
(
target_path
)
path
=
path
.
split
(
'-'
)[
0
]
img_to_three_color_map
(
source_path
,
target_
path
)
print
(
path
)
#p = Process(target=img_to_three_color_map, args=[source_path, target_path]
)
img
=
handle_from_url
(
url
)
#p.start(
)
cv2
.
imwrite
(
'/test/'
+
path
,
img
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
main
()
read_excel
()
demo/webcam.py
View file @
bdaeaaac
...
@@ -61,8 +61,6 @@ def img_to_three_color_map(source_path, target_path):
...
@@ -61,8 +61,6 @@ def img_to_three_color_map(source_path, target_path):
masks_per_dim
=
args
.
masks_per_dim
,
masks_per_dim
=
args
.
masks_per_dim
,
min_image_size
=
args
.
min_image_size
,
min_image_size
=
args
.
min_image_size
,
)
)
source_path
=
source_path
[
3
:]
target_path
=
target_path
[
3
:]
print
(
target_path
)
print
(
target_path
)
print
(
source_path
)
print
(
source_path
)
img
=
cv2
.
imread
(
source_path
)
img
=
cv2
.
imread
(
source_path
)
...
...
demo/work.py
View file @
bdaeaaac
import
sys
sys
.
path
.
append
(
".."
)
import
os
import
os
from
proj.tasks
import
img_reproce
from
proj.tasks
import
img_reproce
...
@@ -24,8 +27,8 @@ def main():
...
@@ -24,8 +27,8 @@ def main():
source_path
=
'../../fashionbase/images/dataset_0520/xifu/'
+
file
source_path
=
'../../fashionbase/images/dataset_0520/xifu/'
+
file
target_path
=
source_path
.
replace
(
'dataset_0520'
,
'dataset_0520_10000'
)
target_path
=
source_path
.
replace
(
'dataset_0520'
,
'dataset_0520_10000'
)
#
source_path = source_path[3:]
source_path
=
source_path
[
3
:]
#
target_path = target_path[3:]
target_path
=
target_path
[
3
:]
print
(
source_path
)
print
(
source_path
)
print
(
target_path
)
print
(
target_path
)
# img_reproce.delay(source_path, target_path)
# img_reproce.delay(source_path, target_path)
...
...
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