update Actor6
This commit is contained in:
1 parent
dac314c9a5
commit
e9b2b238b2
35 files changed
+1226
-697
No files matched your search
@@ -28,17 +28,17 @@ class ImagesDataset(Dataset):
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
path_data = Path("/mfs/lsen/DATA/Actor3/processing")
|
||||
vpath_videos = sorted(path_data.glob("*"))
|
||||
path_data = Path("/ssdata1/lsen/DATA/Actor5/processing")
|
||||
vpath_videos = sorted(path_data.glob("*"), reverse=True)
|
||||
print(f"Have {len(vpath_videos)} dir files")
|
||||
|
||||
device = "cuda:1"
|
||||
device = "cuda:7"
|
||||
model = FaceAlignment(LandmarksType._2D, device=device, face_detector='sfd')
|
||||
print(f"load FaceAlignment model in {device}")
|
||||
|
||||
# IDs = ["2-23min"]
|
||||
# for each word
|
||||
for i, ipath_item in enumerate(vpath_videos):
|
||||
for i, ipath_item in enumerate(vpath_videos[16:]):
|
||||
iname = ipath_item.stem
|
||||
print(f"processing {i}/{len(vpath_videos)} -> {ipath_item} ... ")
|
||||
|
||||
@@ -49,9 +49,17 @@ if __name__ == "__main__":
|
||||
ipath_frame = ipath_item.joinpath("frames")
|
||||
ipath_ldmks.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# check
|
||||
num_frame = len(list(ipath_frame.glob("*.jpg")))
|
||||
num_ladmk = len(list(ipath_ldmks.glob("*.txt")))
|
||||
if num_frame == num_ladmk:
|
||||
print(f"\n Skip: have already done!")
|
||||
continue
|
||||
|
||||
dataset = ImagesDataset(ipath_frame)
|
||||
dloader = DataLoader(dataset, batch_size=16, num_workers=8)
|
||||
|
||||
|
||||
|
||||
for k, ibatch in enumerate(dloader):
|
||||
ibatch_name = ibatch["image_name"]
|
||||
ibatch_data = ibatch["image"].to(device) # B x H x W x 3
|
||||
|
||||
Reference in new issue
Block a user