Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -254,12 +254,11 @@ def generate_results_and_mesh(image, session_id=None):
|
|
| 254 |
# Step 4
|
| 255 |
status4, track_img, _ = step4_track(session_id)
|
| 256 |
# Locate mesh (.ply)
|
| 257 |
-
mesh_dir
|
| 258 |
-
|
|
|
|
| 259 |
|
| 260 |
-
print(f"[DEBUG]
|
| 261 |
-
if mesh_file and not os.path.exists(mesh_file):
|
| 262 |
-
print(f"[ERROR] mesh_file path exists variable is non‐existent on disk!")
|
| 263 |
|
| 264 |
final_status = "\n".join([status1, status2, status3, status4])
|
| 265 |
return final_status, crop_img, normals_img, uv_img, track_img, mesh_file
|
|
|
|
| 254 |
# Step 4
|
| 255 |
status4, track_img, _ = step4_track(session_id)
|
| 256 |
# Locate mesh (.ply)
|
| 257 |
+
mesh_dir = os.path.join(os.environ["PIXEL3DMM_TRACKING_OUTPUT"], session_id, "mesh")
|
| 258 |
+
mesh_file_abs = first_file_from_dir(mesh_dir, "ply")
|
| 259 |
+
mesh_file = os.path.relpath(mesh_file_abs, os.getcwd())
|
| 260 |
|
| 261 |
+
print(f"[DEBUG] returning mesh_file = {mesh_file}")
|
|
|
|
|
|
|
| 262 |
|
| 263 |
final_status = "\n".join([status1, status2, status3, status4])
|
| 264 |
return final_status, crop_img, normals_img, uv_img, track_img, mesh_file
|