Spaces:
Runtime error
Runtime error
replace glb with obj
Browse files- apps/infer.py +5 -10
apps/infer.py
CHANGED
@@ -296,7 +296,7 @@ def generate_model(in_path, model_type):
|
|
296 |
maintains_order=True
|
297 |
)
|
298 |
smpl_obj.export(
|
299 |
-
f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_smpl.
|
300 |
|
301 |
smpl_info = {'betas': optimed_betas,
|
302 |
'pose': optimed_pose,
|
@@ -339,11 +339,6 @@ def generate_model(in_path, model_type):
|
|
339 |
f"obj/{data['name']}_recon.obj")
|
340 |
)
|
341 |
|
342 |
-
recon_obj.export(
|
343 |
-
os.path.join(config_dict['out_dir'], cfg.name,
|
344 |
-
f"obj/{data['name']}_recon.glb")
|
345 |
-
)
|
346 |
-
|
347 |
# Isotropic Explicit Remeshing for better geometry topology
|
348 |
verts_refine, faces_refine = remesh(os.path.join(config_dict['out_dir'], cfg.name,
|
349 |
f"obj/{data['name']}_recon.obj"), 0.5, device)
|
@@ -425,7 +420,7 @@ def generate_model(in_path, model_type):
|
|
425 |
)
|
426 |
final.visual.vertex_colors = final_colors
|
427 |
final.export(
|
428 |
-
f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_refine.
|
429 |
|
430 |
|
431 |
# always export visualized video regardless of the cloth refinment
|
@@ -445,10 +440,10 @@ def generate_model(in_path, model_type):
|
|
445 |
f"vid/{data['name']}_cloth.mp4"),
|
446 |
)
|
447 |
|
448 |
-
smpl_path = f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_smpl.
|
449 |
smpl_npy_path = f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_smpl.npy"
|
450 |
-
recon_path = f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_recon.
|
451 |
-
refine_path = f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_refine.
|
452 |
|
453 |
video_path = os.path.join(config_dict['out_dir'], cfg.name, f"vid/{data['name']}_cloth.mp4")
|
454 |
overlap_path = os.path.join(config_dict['out_dir'], cfg.name, f"png/{data['name']}_overlap.png")
|
|
|
296 |
maintains_order=True
|
297 |
)
|
298 |
smpl_obj.export(
|
299 |
+
f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_smpl.obj")
|
300 |
|
301 |
smpl_info = {'betas': optimed_betas,
|
302 |
'pose': optimed_pose,
|
|
|
339 |
f"obj/{data['name']}_recon.obj")
|
340 |
)
|
341 |
|
|
|
|
|
|
|
|
|
|
|
342 |
# Isotropic Explicit Remeshing for better geometry topology
|
343 |
verts_refine, faces_refine = remesh(os.path.join(config_dict['out_dir'], cfg.name,
|
344 |
f"obj/{data['name']}_recon.obj"), 0.5, device)
|
|
|
420 |
)
|
421 |
final.visual.vertex_colors = final_colors
|
422 |
final.export(
|
423 |
+
f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_refine.obj")
|
424 |
|
425 |
|
426 |
# always export visualized video regardless of the cloth refinment
|
|
|
440 |
f"vid/{data['name']}_cloth.mp4"),
|
441 |
)
|
442 |
|
443 |
+
smpl_path = f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_smpl.obj"
|
444 |
smpl_npy_path = f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_smpl.npy"
|
445 |
+
recon_path = f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_recon.obj"
|
446 |
+
refine_path = f"{config_dict['out_dir']}/{cfg.name}/obj/{data['name']}_refine.obj"
|
447 |
|
448 |
video_path = os.path.join(config_dict['out_dir'], cfg.name, f"vid/{data['name']}_cloth.mp4")
|
449 |
overlap_path = os.path.join(config_dict['out_dir'], cfg.name, f"png/{data['name']}_overlap.png")
|