Commit bdaeaaac authored by 吴升宇's avatar 吴升宇

add test

parent 9d443b13
import os
from multiprocessing import Process
from threading import Thread
from webcam import img_to_three_color_map
import xlrd
import cv2
from three_color import handle_from_url
def main():
rs = os.walk('../../fashionbase/images/dataset_0520/weiyi')
for a, b, c in rs:
for i in c[:100]:
source_path = '../../fashionbase/images/dataset_0520/weiyi/' + i
target_path = 'output/' + i
print(source_path)
print(target_path)
img_to_three_color_map(source_path, target_path)
#p = Process(target=img_to_three_color_map, args=[source_path, target_path])
#p.start()
def read_excel():
data = xlrd.open_workbook('20190522上衣测试.xlsx')
table = data.sheets()[0]
nrows = table.nrows
for i in range(nrows):
url = table.row_values(i)[1]
path = url.split('/')[-1]
path = path.split('-')[0]
print(path)
img = handle_from_url(url)
cv2.imwrite('/test/' + path, img)
if __name__ == '__main__':
main()
read_excel()
......@@ -61,8 +61,6 @@ def img_to_three_color_map(source_path, target_path):
masks_per_dim=args.masks_per_dim,
min_image_size=args.min_image_size,
)
source_path = source_path[3:]
target_path = target_path[3:]
print(target_path)
print(source_path)
img = cv2.imread(source_path)
......
import sys
sys.path.append("..")
import os
from proj.tasks import img_reproce
......@@ -24,8 +27,8 @@ def main():
source_path = '../../fashionbase/images/dataset_0520/xifu/' + file
target_path = source_path.replace('dataset_0520', 'dataset_0520_10000')
# source_path = source_path[3:]
# target_path = target_path[3:]
source_path = source_path[3:]
target_path = target_path[3:]
print(source_path)
print(target_path)
# img_reproce.delay(source_path, target_path)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment