update actor5 & actor6 data processing code

This commit is contained in:
liangsen committed 2022-05-23 22:11:29 +08:00
1 parent 2095b48c56
commit 922a98e36b
29 files changed
+3694 -94

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
import os
from pathlib2 import Path
if __name__ == "__main__":
path_data = Path("/ssdata1/lsen/DATA/Actor5/processing")
vpath_videos = sorted(path_data.glob("*"), reverse=False)
print(f"Have {len(vpath_videos)} dir files")
# IDs = ["2-23min"]
# for each word
for i, ipath_item in enumerate(vpath_videos):
iname = ipath_item.stem
print(f"processing {i}/{len(vpath_videos)} -> {ipath_item} ... ")
# if iname not in IDs: continue
ipath_fcrop = ipath_item.joinpath("frames_crop")
ipath_tfrom = ipath_item.joinpath("frames_crop_tform")
if ipath_fcrop.exists():
cmd = f"rm -rf {str(ipath_fcrop)}"
print("RUN: ", cmd)
os.system(cmd)
if ipath_tfrom.exists():
cmd = f"rm -rf {str(ipath_tfrom)}"
print("RUN: ", cmd)
os.system(cmd)