Update app.py
Browse files
app.py
CHANGED
|
@@ -262,10 +262,15 @@ def rignet_inference(input_obj, bandwidth, threshold):
|
|
| 262 |
return None, error_msg
|
| 263 |
|
| 264 |
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 268 |
|
|
|
|
| 269 |
demo = gr.Interface(
|
| 270 |
fn=rignet_inference,
|
| 271 |
inputs=[
|
|
@@ -279,43 +284,30 @@ def create_interface():
|
|
| 279 |
],
|
| 280 |
title="🎭 RigNet: Neural Rigging for 3D Characters",
|
| 281 |
description="""
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
""",
|
| 287 |
article="""
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
""",
|
| 300 |
allow_flagging="never"
|
| 301 |
)
|
| 302 |
|
| 303 |
-
return demo
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
if __name__ == "__main__":
|
| 307 |
-
print("="*60)
|
| 308 |
-
print("RigNet Gradio Demo - Starting...")
|
| 309 |
-
print("="*60)
|
| 310 |
-
|
| 311 |
-
# Pre-load models at startup
|
| 312 |
-
load_models()
|
| 313 |
-
|
| 314 |
-
# Create and launch interface
|
| 315 |
-
demo = create_interface()
|
| 316 |
demo.launch(
|
| 317 |
server_name="0.0.0.0",
|
| 318 |
server_port=7860,
|
| 319 |
share=False,
|
| 320 |
-
show_error=True
|
| 321 |
)
|
|
|
|
| 262 |
return None, error_msg
|
| 263 |
|
| 264 |
|
| 265 |
+
if __name__ == "__main__":
|
| 266 |
+
print("="*60)
|
| 267 |
+
print("RigNet Gradio Demo - Starting...")
|
| 268 |
+
print("="*60)
|
| 269 |
+
|
| 270 |
+
# Pre-load models at startup
|
| 271 |
+
load_models()
|
| 272 |
|
| 273 |
+
# Create and launch interface using gr.Interface
|
| 274 |
demo = gr.Interface(
|
| 275 |
fn=rignet_inference,
|
| 276 |
inputs=[
|
|
|
|
| 284 |
],
|
| 285 |
title="🎭 RigNet: Neural Rigging for 3D Characters",
|
| 286 |
description="""
|
| 287 |
+
Upload a 3D character mesh (OBJ format) to automatically generate skeletal rig and skinning weights.
|
| 288 |
+
|
| 289 |
+
**Recommended:** OBJ files with 1K-5K vertices work best.
|
| 290 |
+
**Processing time:** 1-3 minutes on CPU depending on mesh complexity.
|
| 291 |
""",
|
| 292 |
article="""
|
| 293 |
+
### 📚 About the Output
|
| 294 |
+
|
| 295 |
+
The generated `*_rig.txt` file contains:
|
| 296 |
+
- **joints**: 3D positions of skeletal joints
|
| 297 |
+
- **root**: Root joint of the hierarchy
|
| 298 |
+
- **hier**: Parent-child relationships (skeleton hierarchy)
|
| 299 |
+
- **skin**: Skinning weights for each vertex
|
| 300 |
+
|
| 301 |
+
This format can be imported into 3D animation software.
|
| 302 |
+
|
| 303 |
+
**Reference:** [RigNet: Neural Rigging for Articulated Characters (SIGGRAPH 2020)](https://arxiv.org/abs/2005.00559)
|
| 304 |
""",
|
| 305 |
allow_flagging="never"
|
| 306 |
)
|
| 307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 308 |
demo.launch(
|
| 309 |
server_name="0.0.0.0",
|
| 310 |
server_port=7860,
|
| 311 |
share=False,
|
| 312 |
+
show_error=True
|
| 313 |
)
|