diff --git a/aloscene/frame.py b/aloscene/frame.py index 304fc6fd..1f44feff 100644 --- a/aloscene/frame.py +++ b/aloscene/frame.py @@ -129,9 +129,15 @@ def __new__( tensor.add_child("scene_flow", labels, align_dim=["B", "T"], mergeable=False) # Add other tensor property + assert normalization in {"01", "255", "minmax_sym", "resnet"}, f"{normalization} norm is not yet supported" tensor.add_property("normalization", normalization) - tensor.add_property("_resnet_mean_std", ((0.485, 0.456, 0.406), (0.229, 0.224, 0.225))) - tensor.add_property("mean_std", mean_std) + + resnet_rgb_mean_std = ((0.485, 0.456, 0.406), (0.229, 0.224, 0.225)) + tensor.add_property("_resnet_mean_std", resnet_rgb_mean_std) + if normalization == "resnet": + tensor.add_property("mean_std", resnet_rgb_mean_std) + else: + tensor.add_property("mean_std", mean_std) return tensor