File size: 733 Bytes
da48dbe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fb140f6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from lib.common.render import Render
import torch
import argparse

root = "./results/econ/vid"

# loading cfg file
parser = argparse.ArgumentParser()
parser.add_argument("-n", "--name", type=str, default="")
parser.add_argument("-g", "--gpu", type=int, default=0)
args = parser.parse_args()

in_tensor = torch.load(f"{root}/{args.name}_in_tensor.pt")

render = Render(size=512, device=torch.device(f"cuda:{args.gpu}"))

# visualize the final results in self-rotation mode
verts_lst = in_tensor["body_verts"] + in_tensor["BNI_verts"]
faces_lst = in_tensor["body_faces"] + in_tensor["BNI_faces"]

# self-rotated video
render.load_meshes(verts_lst, faces_lst)
render.get_rendered_video_multi(in_tensor, f"{root}/{args.name}_cloth.mp4")