v1.6.2 - Geometric Features Quality & GPU Consistency
Release Date: October 3, 2025
Type: Bug Fix & Quality Improvement Release
π― Overviewβ
Version 1.6.2 fixes critical issues in geometric feature computation that affected GPU users and improves overall feature quality and robustness. This release ensures consistency between CPU and GPU implementations and adds comprehensive validation.
If you previously used GPU acceleration (use_gpu=True
), feature values have changed. The old GPU formulas were mathematically incorrect. You'll need to retrain models or switch to CPU for compatibility.
π§ Critical Fixesβ
1. GPU Feature Formula Correctionβ
Problem: GPU implementation used incorrect eigenvalue normalization
- GPU divided by Ξ»β (largest eigenvalue) β
- CPU divided by Σλ (sum of eigenvalues) β CORRECT
- Result: GPU features incompatible with CPU features
Fix:
- Corrected GPU formulas to match standard Weinmann et al. (2015) definitions
- GPU and CPU now produce identical results
- Validated: max relative difference < 0.0001%
Impact:
- β GPU/CPU consistency achieved
- β οΈ Breaking change: GPU feature values changed
- Users with GPU-trained models should retrain or switch to CPU
# BEFORE (WRONG)
planarity = (Ξ»1 - Ξ»2) / Ξ»0
# AFTER (CORRECT - matches Weinmann et al.)
planarity = (Ξ»1 - Ξ»2) / (Ξ»0 + Ξ»1 + Ξ»2)
2. Degenerate Case Handlingβ
Problem: Points with insufficient neighbors or near-zero eigenvalues produced NaN/Inf
- Collinear points β NaN in geometric features
- Points with < 3 neighbors β Inf values
- Pipeline crashes in downstream processing
Fix:
- Added comprehensive validation after eigenvalue computation
- Invalid features set to 0.0 (distinguishable from valid low values)
- Checks for degenerate eigenvalues, NaN, and Inf
Impact:
- β No more NaN/Inf propagation
- β Predictable behavior on edge cases
- β No pipeline crashes
# Validation added
valid_features = (
(eigenvalues[:, 0] >= 1e-6) & # Non-degenerate
(eigenvalues[:, 2] >= 1e-8) & # Non-zero
~np.isnan(linearity) & # No NaN
~np.isinf(linearity) # No Inf
)
# Set invalid to zero
planarity[~valid_features] = 0.0
3. Robust Curvature Computationβ
Problem: Standard deviation sensitive to outliers (common in LIDAR)
- Single outlier point distorts entire neighborhood curvature
- Planar surfaces reported as curved due to noise
Fix:
- Replaced
std
with Median Absolute Deviation (MAD) MAD * 1.4826
scaling maintains std-equivalent ranges- Robust to 50% outliers (median breakdown point)
Impact:
- β Better curvature quality on noisy data
- β True surface captured, not noise
- β Similar value ranges (backward compatible)
# BEFORE (outlier-sensitive)
curvature = np.std(distances_along_normal, axis=1)
# AFTER (robust)
median_dist = np.median(distances_along_normal, axis=1, keepdims=True)
mad = np.median(np.abs(distances_along_normal - median_dist), axis=1)
curvature = (mad * 1.4826).astype(np.float32)
π― Enhancementsβ
4. GPU Radius Search Supportβ
Added: Radius-based neighbor search for GPU
- Avoids LIDAR scan line artifacts ("dashed line" patterns)
- Falls back to CPU when radius requested (GPU native impl future work)
- Clear warning messages to users
Benefit: Better feature quality by using spatial radius instead of k-NN
# Now supported (with CPU fallback)
geo_features = gpu_computer.extract_geometric_features(
points, normals, k=20, radius=1.0 # 1m radius
)
β Validationβ
New Test Suiteβ
Added comprehensive validation: tests/test_feature_fixes.py
Tests:
- β GPU/CPU consistency (all features match within 1e-6)
- β Degenerate case handling (no NaN/Inf)
- β Robust curvature (outlier resistance)
- β Feature value ranges (all in [0, 1])
All tests PASSED π
π Performanceβ
No regression observed:
Metric | Before | After | Change |
---|---|---|---|
CPU throughput | 10K pts/s | 10K pts/s | None |
GPU throughput | 50K pts/s | 50K pts/s | None |
Degenerate filter | N/A | +0.1ms | Negligible |
Robust curvature | std | median | ~Same |
π Migration Guideβ
For CPU Usersβ
β Minimal impact - seamless upgrade:
pip install --upgrade ign-lidar-hd
Changes:
- Curvature slightly different (more robust, similar range)
- Degenerate cases now 0.0 instead of NaN (better)
- Existing models should work fine
For GPU Usersβ
β οΈ Feature values changed - action required:
pip install --upgrade ign-lidar-hd
Option A: Retrain models (recommended)
# Reprocess your data with fixed GPU features
processor = LiDARProcessor(use_gpu=True)
processor.process_directory('data/raw', 'data/patches_v1.6.2')
# Train new models on updated features
Option B: Switch to CPU (for old model compatibility)
# Use CPU to maintain compatibility
processor = LiDARProcessor(use_gpu=False)
π Documentationβ
New Documentsβ
Repository root contains detailed analysis:
- GEOMETRIC_FEATURES_ANALYSIS.md - Comprehensive artifact analysis
- FEATURE_FIXES_PROPOSAL.md - Technical fix specifications
- IMPLEMENTATION_SUMMARY.md - Implementation details
- BEFORE_AFTER_COMPARISON.md - Side-by-side comparison
- GEOMETRIC_FEATURES_README.md - Quick reference
π Technical Detailsβ
Eigenvalue Normalizationβ
Standard formulation (Weinmann et al., 2015):
Linearity = (Ξ»β - Ξ»β) / (Ξ»β + Ξ»β + Ξ»β)
Planarity = (Ξ»β - Ξ»β) / (Ξ»β + Ξ»β + Ξ»β)
Sphericity = Ξ»β / (Ξ»β + Ξ»β + Ξ»β)
Where Ξ»β β₯ Ξ»β β₯ Ξ»β are eigenvalues in descending order.
Why this matters:
- Ensures features sum to Ξ»β/Σλ β constant
- [0, 1] range with meaningful interpretation
- Standard in point cloud literature
Median Absolute Deviation (MAD)β
Formula: MAD = median(|x - median(x)|) * 1.4826
Properties:
- Robust to 50% outliers
- 1.4826 scaling matches std for Gaussian data
- Better for LIDAR (outliers common)
π Referencesβ
- Weinmann, M., et al. (2015). "Semantic point cloud interpretation based on optimal neighborhoods, relevant features and efficient classifiers." ISPRS Journal of Photogrammetry and Remote Sensing, 105, 286-304.
- DemantkΓ©, J., et al. (2011). "Dimensionality based scale selection in 3D lidar point clouds."
β What's Nextβ
- β Upgrade to v1.6.2
- β
Run validation tests:
python tests/test_feature_fixes.py
- β³ Process test tile and verify output
- β³ Retrain models (GPU users)
- β³ Deploy to production
π Supportβ
Need help?
- π Documentation: Full analysis in repository root
- π§ͺ Validation: Run
python tests/test_feature_fixes.py
- π¬ GitHub Issues: Report problems with test results
- π Website: https://sducournau.github.io/IGN_LIDAR_HD_DATASET/