Spaces:
Running
on
Zero
Running
on
Zero
Update stf_utils.py
Browse files- stf_utils.py +11 -10
stf_utils.py
CHANGED
@@ -79,28 +79,29 @@ class STFPipeline:
|
|
79 |
checkpoint_path: str = "089.pth",
|
80 |
#root_path: str = "works"
|
81 |
root_path: str = "/tmp/works",
|
82 |
-
|
83 |
|
84 |
):
|
85 |
#os.makedirs(root_path, exist_ok=True)
|
86 |
shutil.copytree('/home/user/app/stf/works', '/tmp/works', dirs_exist_ok=True)
|
87 |
|
|
|
88 |
|
89 |
-
if
|
90 |
-
dir_zip='
|
91 |
-
dir_target='
|
92 |
zipfile.ZipFile(dir_zip, 'r').extractall(dir_target)
|
93 |
|
94 |
-
dir_zip='
|
95 |
-
dir_target='
|
96 |
zipfile.ZipFile(dir_zip, 'r').extractall(dir_target)
|
97 |
else:
|
98 |
-
dir_zip='
|
99 |
-
dir_target='
|
100 |
zipfile.ZipFile(dir_zip, 'r').extractall(dir_target)
|
101 |
|
102 |
-
dir_zip='
|
103 |
-
dir_target='
|
104 |
zipfile.ZipFile(dir_zip, 'r').extractall(dir_target)
|
105 |
|
106 |
|
|
|
79 |
checkpoint_path: str = "089.pth",
|
80 |
#root_path: str = "works"
|
81 |
root_path: str = "/tmp/works",
|
82 |
+
female_video: bool=True
|
83 |
|
84 |
):
|
85 |
#os.makedirs(root_path, exist_ok=True)
|
86 |
shutil.copytree('/home/user/app/stf/works', '/tmp/works', dirs_exist_ok=True)
|
87 |
|
88 |
+
|
89 |
|
90 |
+
if female_video:
|
91 |
+
dir_zip= os.path.join(root_path, 'preprocess/nasilhong_f_v1_front/crop_video_front_one_piece_dress_nodded_cut.zip')
|
92 |
+
dir_target=os.path.join(root_path,'preprocess/nasilhong_f_v1_front/')
|
93 |
zipfile.ZipFile(dir_zip, 'r').extractall(dir_target)
|
94 |
|
95 |
+
dir_zip=os.path.join(root_path,'preprocess/nasilhong_f_v1_front/front_one_piece_dress_nodded_cut.zip')
|
96 |
+
dir_target=os.path.join(root_path,'preprocess/nasilhong_f_v1_front/')
|
97 |
zipfile.ZipFile(dir_zip, 'r').extractall(dir_target)
|
98 |
else:
|
99 |
+
dir_zip= os.path.join(root_path, 'preprocess/Ian_v3_front/crop_video_Cam2_2309071202_0012_Natural_Looped.zip')
|
100 |
+
dir_target=os.path.join(root_path,'preprocess/Ian_v3_front/')
|
101 |
zipfile.ZipFile(dir_zip, 'r').extractall(dir_target)
|
102 |
|
103 |
+
dir_zip=os.path.join(root_path,'preprocess/Ian_v3_front/Cam2_2309071202_0012_Natural_Looped.zip')
|
104 |
+
dir_target=os.path.join(root_path,'preprocess/Ian_v3_front/')
|
105 |
zipfile.ZipFile(dir_zip, 'r').extractall(dir_target)
|
106 |
|
107 |
|