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
2e62281c
Commit
2e62281c
authored
May 26, 2019
by
任婷婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
d795fdb9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
test.py
test.py
+20
-6
No files found.
test.py
View file @
2e62281c
import
xlrd
import
cv2
from
three_color
import
handle_from_url
import
os
from
demo.three_color
import
handle_from_url
,
handle_from_path
def
read_excel
():
data
=
xlrd
.
open_workbook
(
'201905
22上衣测试
.xlsx'
)
data
=
xlrd
.
open_workbook
(
'201905
15衣服测试链接
.xlsx'
)
table
=
data
.
sheets
()[
0
]
nrows
=
table
.
nrows
for
i
in
range
(
1
,
nrows
+
1
):
url
=
table
.
row_values
(
i
)[
1
]
tag
=
table
.
row_values
(
i
)[
2
]
url
=
table
.
row_values
(
i
)[
0
]
tag
=
table
.
row_values
(
i
)[
1
]
path
=
url
.
split
(
'/'
)[
-
1
]
path
=
path
.
split
(
'-'
)[
0
]
path
=
tag
+
'_'
+
path
path
=
str
(
tag
)
+
'_'
+
path
print
(
path
)
img
=
handle_from_url
(
url
)
cv2
.
imwrite
(
'tem/'
+
path
,
img
)
def
read_path
():
path
=
'/srv/apps/fashionbase/infer/0515_test_img/'
rs
=
os
.
listdir
(
path
)
for
r
in
rs
:
if
r
==
'deal'
:
continue
source_path
=
path
+
r
print
(
source_path
)
img
=
handle_from_path
(
source_path
)
store_path
=
'/srv/apps/fashionbase/infer/0515_test_img/deal/'
+
r
cv2
.
imwrite
(
store_path
,
img
)
if
__name__
==
'__main__'
:
read_excel
()
#read_excel()
read_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