Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -101,7 +101,7 @@ def create_demo():
|
|
101 |
}
|
102 |
```
|
103 |
**How to transform the object global orientation to the rotation matrix**: The object global orientation is represented as the rotation vector. To convert it to the rotation matrix, you can use `scipy.spatial.transform.Rotation` as follows:
|
104 |
-
|
105 |
from scipy.spatial.transform import Rotation
|
106 |
r = Rotation.from_rotvec(object_global_orient)
|
107 |
object_global_orient_rotmat = r.as_matrix()
|
@@ -167,14 +167,14 @@ def create_demo():
|
|
167 |
|
168 |
inputs = input_file
|
169 |
outputs = output_file
|
170 |
-
|
171 |
gr.Examples(
|
172 |
examples=[os.path.join(os.path.dirname(__file__), "./data/102_grab_all_data.npy")],
|
173 |
inputs=inputs,
|
174 |
fn=predict,
|
175 |
outputs=outputs,
|
176 |
)
|
177 |
-
|
178 |
|
179 |
|
180 |
return demo
|
|
|
101 |
}
|
102 |
```
|
103 |
**How to transform the object global orientation to the rotation matrix**: The object global orientation is represented as the rotation vector. To convert it to the rotation matrix, you can use `scipy.spatial.transform.Rotation` as follows:
|
104 |
+
```python
|
105 |
from scipy.spatial.transform import Rotation
|
106 |
r = Rotation.from_rotvec(object_global_orient)
|
107 |
object_global_orient_rotmat = r.as_matrix()
|
|
|
167 |
|
168 |
inputs = input_file
|
169 |
outputs = output_file
|
170 |
+
|
171 |
gr.Examples(
|
172 |
examples=[os.path.join(os.path.dirname(__file__), "./data/102_grab_all_data.npy")],
|
173 |
inputs=inputs,
|
174 |
fn=predict,
|
175 |
outputs=outputs,
|
176 |
)
|
177 |
+
|
178 |
|
179 |
|
180 |
return demo
|