Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -40,18 +40,18 @@ def main():
|
|
40 |
save_dir = Path(SAVE_DIR)
|
41 |
save_dir.mkdir(parents=True, exist_ok=True)
|
42 |
|
43 |
-
def pose(img_path,
|
44 |
if use_cos == False:
|
45 |
use_angle_transf = False
|
46 |
|
47 |
cmd = CMD.format(save_dir, img_path)
|
48 |
-
if
|
49 |
cmd = cmd + " --use-cos"
|
50 |
-
if
|
51 |
cmd = cmd + " --use-angle-transf"
|
52 |
-
if
|
53 |
cmd = cmd + " --use-contacts"
|
54 |
-
if
|
55 |
cmd = cmd + " --use-natural"
|
56 |
|
57 |
out_dir = (save_dir / Path(img_path).name).with_suffix("")
|
|
|
40 |
save_dir = Path(SAVE_DIR)
|
41 |
save_dir.mkdir(parents=True, exist_ok=True)
|
42 |
|
43 |
+
def pose(img_path, bone_lengths=True, foreshortening=True, self_contacts=False, naturalness=True):
|
44 |
if use_cos == False:
|
45 |
use_angle_transf = False
|
46 |
|
47 |
cmd = CMD.format(save_dir, img_path)
|
48 |
+
if bone_lengths:
|
49 |
cmd = cmd + " --use-cos"
|
50 |
+
if foreshortening:
|
51 |
cmd = cmd + " --use-angle-transf"
|
52 |
+
if self_contacts:
|
53 |
cmd = cmd + " --use-contacts"
|
54 |
+
if naturalness:
|
55 |
cmd = cmd + " --use-natural"
|
56 |
|
57 |
out_dir = (save_dir / Path(img_path).name).with_suffix("")
|