Dynamic chunks for lidar meshing#2140
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces dynamic parallelization sizing for Lidar Decimating and Lidar Meshing nodes by replacing static sizes with a new DynamicLidarMeshingSize class. This class determines the parallelization size based on the number of elements in a JSON array. The feedback suggests ensuring a minimum size of 1 when returning the length of the JSON array to prevent potential pipeline execution errors if the array is empty.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
a225a51 to
0885451
Compare
|



E57 multi-file fix and dynamic LiDAR meshing chunks
Summary
This PR fixes several bugs in E57 point cloud reading when handling files containing multiple scans, adds debug instrumentation for E57 data pointers, and introduces dynamic parallelization chunk sizing for LiDAR meshing nodes.
Changes
Fix E57 multi-scan file reading (
E57Reader.hpp,main_importE57.cpp)The core bug:
_idMeshwas used both as a per-file scan index (passed to libE57'sReadData3D,GetData3DSizes,SetUpData3DPointsData) and as a global unique mesh counter (used as the map key in the SfM cameras map). When iterating over multiple files,_idMeshwas reset to0on each new file, causing all reads after the first file to always read scan#0._idMeshInFilecounter for addressing scans within the current file._idMeshnow acts as a strictly increasing global counter across all files.GetData3DSizeswhich was always passing hardcoded0instead of_idMeshInFile.datareader.close()after reading each scan's point data.Octree::regroup(): child nodes are now recursively regrouped before the leaf compaction check, ensuring bottom-up tree consolidation."Generating Nsub regions"→"Generating N sub regions").E57 debug logging (
E57Reader.hpp)ALICEVISION_LOG_DEBUGstatements logging allData3DPointsFloatfield pointers (cartesian, color, intensity, spherical, row/column indices, timestamps) on each read batch to help diagnose E57 file compatibility issues.cartesianInvalidState[pos], fixing a potential crash on E57 files that do not provide that field.Dynamic parallelization for LiDAR meshing (
LidarMeshing.py,LidarDecimating.py,parallelization.py)Replaced the hardcoded
StaticNodeSize(10)inLidarMeshingandLidarDecimatingwith a newDynamicLidarMeshingSizecallable. This class reads the JSON file referenced by the node'sinputattribute at graph evaluation time and returns the number of elements in the root array, so the number of parallel chunks matches the actual number of input regions rather than a fixed constant.