Spaces:
Runtime error
Runtime error
Omar Sanseviero
commited on
Commit
·
02bd59f
1
Parent(s):
53b39db
Update app.py
Browse files
app.py
CHANGED
|
@@ -64,13 +64,23 @@ def predict(frame):
|
|
| 64 |
y_pred_deg = euler[:, 1].cpu()
|
| 65 |
r_pred_deg = euler[:, 2].cpu()
|
| 66 |
return utils.plot_pose_cube(frame, y_pred_deg, p_pred_deg, r_pred_deg, x_min + int(.5*(x_max-x_min)), y_min + int(.5*(y_max-y_min)), size = bbox_width)
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
iface = gr.Interface(
|
| 70 |
fn=predict,
|
| 71 |
inputs=gr.inputs.Image(label="Input Image", source="webcam"),
|
| 72 |
outputs='image',
|
| 73 |
-
live=True
|
|
|
|
|
|
|
|
|
|
| 74 |
)
|
|
|
|
|
|
|
|
|
|
| 75 |
|
| 76 |
iface.launch()
|
|
|
|
| 64 |
y_pred_deg = euler[:, 1].cpu()
|
| 65 |
r_pred_deg = euler[:, 2].cpu()
|
| 66 |
return utils.plot_pose_cube(frame, y_pred_deg, p_pred_deg, r_pred_deg, x_min + int(.5*(x_max-x_min)), y_min + int(.5*(y_max-y_min)), size = bbox_width)
|
| 67 |
+
|
| 68 |
+
title = "6D Rotation Representation for Unconstrained Head Pose Estimation"
|
| 69 |
+
description = "Gradio demo for 6DRepNet. To use it, simply click the camera picture. Read more at the links below."
|
| 70 |
+
article = "<div style='text-align: center;'><a href='https://github.com/thohemp/6DRepNet' target='_blank'>Github Repo</a> | <center><a href='https://arxiv.org/abs/2202.12555' target='_blank'>Paper</a> |</center></div>"
|
| 71 |
+
|
| 72 |
|
| 73 |
iface = gr.Interface(
|
| 74 |
fn=predict,
|
| 75 |
inputs=gr.inputs.Image(label="Input Image", source="webcam"),
|
| 76 |
outputs='image',
|
| 77 |
+
live=True,
|
| 78 |
+
title=title,
|
| 79 |
+
description=description,
|
| 80 |
+
article=article,
|
| 81 |
)
|
| 82 |
+
)
|
| 83 |
+
|
| 84 |
+
iface.launch()
|
| 85 |
|
| 86 |
iface.launch()
|