@@ -39,6 +39,7 @@ def visualize_reconstruction(
39
39
visdom_server : str = "http://127.0.0.1" ,
40
40
visdom_port : int = 8097 ,
41
41
visdom_env : Optional [str ] = None ,
42
+ ** render_flyaround_kwargs ,
42
43
) -> None :
43
44
"""
44
45
Given an `exp_dir` containing a trained Implicitron model, generates videos consisting
@@ -60,6 +61,8 @@ def visualize_reconstruction(
60
61
visdom_server: The address of the visdom server.
61
62
visdom_port: The port of the visdom server.
62
63
visdom_env: If set, defines a custom name for the visdom environment.
64
+ render_flyaround_kwargs: Keyword arguments passed to the invoked `render_flyaround`
65
+ function (see `pytorch3d.implicitron.models.visualization.render_flyaround`).
63
66
"""
64
67
65
68
# In case an output directory is specified use it. If no output_directory
@@ -115,20 +118,22 @@ def visualize_reconstruction(
115
118
# iterate over the sequences in the dataset
116
119
for sequence_name in dataset .sequence_names ():
117
120
with torch .no_grad ():
118
- render_flyaround (
119
- dataset = dataset ,
120
- sequence_name = sequence_name ,
121
- model = model ,
122
- output_video_path = os .path .join (output_directory , "video" ),
123
- n_source_views = n_source_views ,
124
- visdom_show_preds = visdom_show_preds ,
125
- n_flyaround_poses = n_eval_cameras ,
126
- visdom_server = visdom_server ,
127
- visdom_port = visdom_port ,
128
- visdom_environment = visdom_env ,
129
- video_resize = video_size ,
130
- device = device ,
131
- )
121
+ render_kwargs = {
122
+ "dataset" : dataset ,
123
+ "sequence_name" : sequence_name ,
124
+ "model" : model ,
125
+ "output_video_path" : os .path .join (output_directory , "video" ),
126
+ "n_source_views" : n_source_views ,
127
+ "visdom_show_preds" : visdom_show_preds ,
128
+ "n_flyaround_poses" : n_eval_cameras ,
129
+ "visdom_server" : visdom_server ,
130
+ "visdom_port" : visdom_port ,
131
+ "visdom_environment" : visdom_env ,
132
+ "video_resize" : video_size ,
133
+ "device" : device ,
134
+ ** render_flyaround_kwargs ,
135
+ }
136
+ render_flyaround (** render_kwargs )
132
137
133
138
134
139
enable_get_default_args (visualize_reconstruction )
0 commit comments