fix remove rearrange_OUMVLP & pretreatment bug

This commit is contained in:
Noah
2022-03-12 17:29:28 +08:00
parent 5f0f4ad3e3
commit c0a4c3458f
2 changed files with 9 additions and 8 deletions
+3 -3
View File
@@ -25,11 +25,11 @@ def rearrange(input_path: Path, output_path: Path) -> None:
dst = os.path.join(output_path, sid.name, seq, view)
os.makedirs(dst, exist_ok=True)
for subfile in os.listdir(src):
if subfile.endswith('.png'):
if subfile not in os.listdir(dst) and subfile.endswith('.png'):
os.symlink(os.path.join(src, subfile),
os.path.join(dst, subfile))
else:
os.remove(os.path.join(src, subfile))
# else:
# os.remove(os.path.join(src, subfile))
progress.update(1)