diff --git a/README.md b/README.md index 5789fb0..404211c 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ If you face out of memory issues, you can reduce the `num_views` or the `batch_s ```yaml train: - batch_size: 1 # Batch size + batch_size: 1 camera: num_views: 6 ``` diff --git a/utils/render.py b/utils/render.py index 48a5cbe..bdbaf29 100644 --- a/utils/render.py +++ b/utils/render.py @@ -123,6 +123,7 @@ def to_pil(rendered_features, target_channels=(0, 3), :return: A PIL Image showing the rendered images. """ + # @ TODO This function is not consistent with the meshnca.render_channels assert rendered_features.dim() == 5, "The input tensor should have 5 dimensions" if not isinstance(target_channels, dict): @@ -143,7 +144,7 @@ def to_pil(rendered_features, target_channels=(0, 3), ) # [batch_size*height, num_views*width, num_features] image_list = [] - for key, channels in target_channels.items(): + for key, channels in sorted(target_channels.items()): image = features[..., range(*channels)] if image.shape[-1] == 1: image = np.repeat(image, 3, axis=-1)