From fefad458082265681d70a47c8041dbdb13965dfe Mon Sep 17 00:00:00 2001 From: Lea Vauchier Date: Mon, 7 Oct 2024 13:28:50 +0200 Subject: [PATCH] Fix lidar_hd pre-transform to allow full 16-bits integer range for color/infra-red values --- CHANGELOG.md | 1 + myria3d/pctl/points_pre_transform/lidar_hd.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24613047..a3c4c419 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # CHANGELOG +- Fix lidar_hd pre-transform to allow full 16-bits integer range for color/infra-red values - Add a github action workflow to run a trained model on the lidar-prod thresholds optimisation dataset (in order to automate thresholds optimization) diff --git a/myria3d/pctl/points_pre_transform/lidar_hd.py b/myria3d/pctl/points_pre_transform/lidar_hd.py index dcd7e4ad..2761be93 100644 --- a/myria3d/pctl/points_pre_transform/lidar_hd.py +++ b/myria3d/pctl/points_pre_transform/lidar_hd.py @@ -2,6 +2,10 @@ import numpy as np from torch_geometric.data import Data +# COLORS_NORMALIZATION_MAX_VALUE should be 2**16 - 1 to match 16-bits integers full range +# It is currently kept to its initial value of 255 * 256 to prevent having to retrain (as it +# is used to normalize the color channels), while being able to run with saturated IR pixels. +# Todo: update COLORS_NORMALIZATION_MAX_VALUE in next training campaigns. COLORS_NORMALIZATION_MAX_VALUE = 255.0 * 256.0 RETURN_NUMBER_NORMALIZATION_MAX_VALUE = 7.0 @@ -29,7 +33,6 @@ def lidar_hd_pre_transform(points): ) for color in ["Red", "Green", "Blue", "Infrared"]: - assert points[color].max() <= COLORS_NORMALIZATION_MAX_VALUE points[color][:] = points[color] / COLORS_NORMALIZATION_MAX_VALUE points[color][occluded_points] = 0.0