Commit 152d2753 authored by 吴升宇's avatar 吴升宇

fix work

parent 3f56920f
...@@ -16,23 +16,21 @@ def write_redis(source_path, target_path): ...@@ -16,23 +16,21 @@ def write_redis(source_path, target_path):
def main(): def main():
rs = os.walk('../../fashionbase/images/dataset_0520/xifu') path = '/data/images/dataset_0523/'
rs = os.walk(path)
for a, b, files in rs: for a, b, files in rs:
print(a) print(a)
for file in files: for file in files[:5000]:
dir = '../../fashionbase/images/dataset_0520/xifu'.replace('dataset_0520', 'dataset_0520_10000') dir = a.replace('dataset_0523', 'dataset_0523_first')
fold = os.path.exists(dir) fold = os.path.exists(dir)
if not fold: if not fold:
os.mkdir(dir) os.mkdir(dir)
source_path = '../../fashionbase/images/dataset_0520/xifu/' + file source_path = a + file
target_path = source_path.replace('dataset_0520', 'dataset_0520_10000') target_path = dir + file
source_path = source_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) #write_redis(source_path, target_path)
write_redis(source_path, target_path)
if __name__ == '__main__': if __name__ == '__main__':
......
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