Spaces:
Build error
Build error
Show cropbox and d
Browse files
app.py
CHANGED
@@ -23,10 +23,10 @@ def inference(url):
|
|
23 |
filename = os.path.basename(urlparse(url).path)
|
24 |
urllib.request.urlretrieve(url, filename)
|
25 |
os.system("python3 -m _scripts.pose_estimator "+filename+" ./_train/character_pose_estim/runs/feat_concat+data.ckpt")
|
26 |
-
keypoints = np.load("./_samples/
|
27 |
|
28 |
|
29 |
-
return ("./_samples/character_pose_estim.png", str(keypoints))
|
30 |
|
31 |
|
32 |
title = "bizarre-pose-estimator"
|
@@ -37,7 +37,7 @@ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2108.018
|
|
37 |
gr.Interface(
|
38 |
inference,
|
39 |
gr.Textbox(lines=1, placeholder="Image URL"),
|
40 |
-
[gr.outputs.Image(type="file", label="Output"), gr.Textbox(lines=10, placeholder="Keypoints")],
|
41 |
title=title,
|
42 |
description=description,
|
43 |
article=article,
|
|
|
23 |
filename = os.path.basename(urlparse(url).path)
|
24 |
urllib.request.urlretrieve(url, filename)
|
25 |
os.system("python3 -m _scripts.pose_estimator "+filename+" ./_train/character_pose_estim/runs/feat_concat+data.ckpt")
|
26 |
+
keypoints, cropbox, d = np.load("./_samples/results.npy", allow_pickle=True)
|
27 |
|
28 |
|
29 |
+
return ("./_samples/character_pose_estim.png", str(keypoints), str(cropbox), str(d))
|
30 |
|
31 |
|
32 |
title = "bizarre-pose-estimator"
|
|
|
37 |
gr.Interface(
|
38 |
inference,
|
39 |
gr.Textbox(lines=1, placeholder="Image URL"),
|
40 |
+
[gr.outputs.Image(type="file", label="Output"), gr.Textbox(lines=10, placeholder="Keypoints"), gr.Textbox(lines=10, placeholder="cropbox"), gr.Textbox(lines=10, placeholder="d")],
|
41 |
title=title,
|
42 |
description=description,
|
43 |
article=article,
|