This commit is contained in:
Nataniel Ruiz Gutierrez
2019-12-21 16:37:10 -05:00
commit 21970b730a
406 changed files with 11530 additions and 0 deletions
@@ -0,0 +1,12 @@
import os
import shutil
output_dir = './images'
os.mkdir(output_dir)
for root, dirs, files in os.walk('./my-processed-dataset'):
for filename in files:
if 'jpg' in filename:
img_name = root.split('/')[-1].split('_')[0] + '.jpg'
shutil.copy2(os.path.join(root, filename), os.path.join(output_dir, img_name))