Spaces:
Running
on
Zero
Running
on
Zero
Ruining Li
commited on
Commit
·
8ef473b
1
Parent(s):
ff8abe3
Fix
Browse files- infer_asset.py +3 -3
infer_asset.py
CHANGED
|
@@ -447,13 +447,13 @@ def infer_single_asset(
|
|
| 447 |
min_part_confidence=0.0
|
| 448 |
):
|
| 449 |
mesh_transformed = mesh.copy()
|
| 450 |
-
if up_dir
|
| 451 |
rotation_matrix = np.array([[0, 0, -1], [0, 1, 0], [1, 0, 0]], dtype=np.float32)
|
| 452 |
mesh_transformed.vertices = mesh_transformed.vertices @ rotation_matrix.T
|
| 453 |
-
elif up_dir
|
| 454 |
rotation_matrix = np.array([[0, 0, 1], [0, 1, 0], [-1, 0, 0]], dtype=np.float32)
|
| 455 |
mesh_transformed.vertices = mesh_transformed.vertices @ rotation_matrix.T
|
| 456 |
-
|
| 457 |
rotation_matrix = np.array([[1, 0, 0], [0, 0, -1], [0, 1, 0]], dtype=np.float32)
|
| 458 |
mesh_transformed.vertices = mesh_transformed.vertices @ rotation_matrix.T
|
| 459 |
elif up_dir in ["-y", "-Y"]:
|
|
|
|
| 447 |
min_part_confidence=0.0
|
| 448 |
):
|
| 449 |
mesh_transformed = mesh.copy()
|
| 450 |
+
if up_dir in ["x", "X"]:
|
| 451 |
rotation_matrix = np.array([[0, 0, -1], [0, 1, 0], [1, 0, 0]], dtype=np.float32)
|
| 452 |
mesh_transformed.vertices = mesh_transformed.vertices @ rotation_matrix.T
|
| 453 |
+
elif up_dir in ["-x", "-X"]:
|
| 454 |
rotation_matrix = np.array([[0, 0, 1], [0, 1, 0], [-1, 0, 0]], dtype=np.float32)
|
| 455 |
mesh_transformed.vertices = mesh_transformed.vertices @ rotation_matrix.T
|
| 456 |
+
elif up_dir in ["y", "Y"]:
|
| 457 |
rotation_matrix = np.array([[1, 0, 0], [0, 0, -1], [0, 1, 0]], dtype=np.float32)
|
| 458 |
mesh_transformed.vertices = mesh_transformed.vertices @ rotation_matrix.T
|
| 459 |
elif up_dir in ["-y", "-Y"]:
|