Skip to content

Commit

Permalink
Fix lidar_hd pre-transform to allow full 16-bits integer range for co…
Browse files Browse the repository at this point in the history
…lor/infra-red values
  • Loading branch information
leavauchier committed Oct 7, 2024
1 parent 6e47ce3 commit fefad45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
5 changes: 4 additions & 1 deletion myria3d/pctl/points_pre_transform/lidar_hd.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit fefad45

Please sign in to comment.