Skip to content
Snippets Groups Projects
Commit d4e13152 authored by Stephane Chavin's avatar Stephane Chavin
Browse files

add tqdm progress bar

parent 5b5786fe
Branches
No related tags found
No related merge requests found
...@@ -97,12 +97,12 @@ if not isExist: ...@@ -97,12 +97,12 @@ if not isExist:
os.mkdir(str(direction+'labels/train')) os.mkdir(str(direction+'labels/train'))
os.mkdir(str(direction+'labels/val')) os.mkdir(str(direction+'labels/val'))
for i,row in val.iterrows(): for i,row in tqdm(val.iterrows(), total=val.shape[0]):
# if len(row.file)>15: # if len(row.file)>15:
shutil.copy2(str(path+row.file+'.txt'),str(direction+'labels/val/'+row.file+'.txt')) shutil.copy2(str(path+row.file+'.txt'),str(direction+'labels/val/'+row.file+'.txt'))
shutil.copy2(str(path+'../images/all/'+row.file+'.jpg'),str(direction+'images/val/'+row.file+'.jpg')) shutil.copy2(str(path+'../images/all/'+row.file+'.jpg'),str(direction+'images/val/'+row.file+'.jpg'))
for i,row in train.iterrows(): for i,row in tqdm(train.iterrows(), total=train.shape[0]):
# if len(row.file)>15: # if len(row.file)>15:
shutil.copy2(str(path+row.file+'.txt'),str(direction+'labels/train/'+row.file+'.txt')) shutil.copy2(str(path+row.file+'.txt'),str(direction+'labels/train/'+row.file+'.txt'))
shutil.copy2(str(path+'../images/all/'+row.file+'.jpg'),str(direction+'images/train/'+row.file+'.jpg')) shutil.copy2(str(path+'../images/all/'+row.file+'.jpg'),str(direction+'images/train/'+row.file+'.jpg'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment