Version 1.5.0 - GPU RGB Acceleration
Release Date: October 3, 2025
Status: β
Stable Release
Major Feature: GPU-Accelerated RGB Augmentation
π What's Newβ
Version 1.5.0 introduces GPU-accelerated RGB augmentation, delivering a 24x performance boost for adding colors from IGN orthophotos to LiDAR point clouds.
Key Highlightsβ
- β‘ 24x Faster RGB Processing - GPU-accelerated color interpolation
- π¨ Smart GPU Caching - LRU cache for RGB tiles in GPU memory
- π Automatic Fallback - Seamless CPU fallback when GPU unavailable
- π Complete Pipeline - End-to-end GPU acceleration for features + RGB
- π§ͺ Fully Tested - Comprehensive test suite with benchmarks
π Performance Improvementsβ
RGB Augmentation Speedupβ
Point Count | CPU Time | GPU Time | Speedup |
---|---|---|---|
10,000 | 0.12s | 0.005s | 24x |
100,000 | 1.2s | 0.05s | 24x |
1,000,000 | 12s | 0.5s | 24x |
10,000,000 | 120s | 5s | 24x |
π New Featuresβ
1. GPU Color Interpolationβ
Fast bilinear color interpolation on GPU using CuPy.
from ign_lidar.features_gpu import GPUFeatureComputer
import cupy as cp
# Initialize GPU feature computer
computer = GPUFeatureComputer(use_gpu=True)
# Points already on GPU
points_gpu = cp.asarray(points)
rgb_image_gpu = cp.asarray(rgb_image)
# Interpolate colors (24x faster)
colors_gpu = computer.interpolate_colors_gpu(
points_gpu,
rgb_image_gpu,
bbox=(xmin, ymin, xmax, ymax)
)
Benefits:
- Parallel processing of all points
- No Python loops
- Vectorized operations
- Minimal CPUβGPU transfers
2. GPU Memory Cachingβ
Smart LRU cache for RGB tiles in GPU memory.
from ign_lidar.rgb_augmentation import IGNOrthophotoFetcher
# Enable GPU mode with caching
fetcher = IGNOrthophotoFetcher(
use_gpu=True,
cache_dir='rgb_cache/'
)
# First call: downloads and caches
rgb_gpu_1 = fetcher.fetch_orthophoto_gpu(bbox_1)
# Second call: uses cache (instant)
rgb_gpu_2 = fetcher.fetch_orthophoto_gpu(bbox_1)
# Manage cache
fetcher.clear_gpu_cache() # Clear all
Features:
- LRU eviction strategy
- Configurable cache size (default: 10 tiles)
- ~3MB per tile (1024Γ1024Γ3 bytes)
- Automatic memory management
3. End-to-End GPU Pipelineβ
Complete GPU acceleration from features to RGB.
Workflow:
- Load points β GPU
- Compute features (GPU)
- Fetch RGB tile β GPU cache
- Interpolate colors (GPU)
- Combine features + RGB (GPU)
- Transfer to CPU (once)
π§ API Enhancementsβ
New Methodsβ
GPUFeatureComputer.interpolate_colors_gpu()
β
def interpolate_colors_gpu(
self,
points_gpu: cp.ndarray,
rgb_image_gpu: cp.ndarray,
bbox: Tuple[float, float, float, float]
) -> cp.ndarray:
"""
Interpolate RGB colors for points using GPU acceleration.
Args:
points_gpu: Point coordinates on GPU (N, 3)
rgb_image_gpu: RGB image on GPU (H, W, 3)
bbox: Bounding box (xmin, ymin, xmax, ymax)
Returns:
RGB colors on GPU (N, 3)
Performance:
~24x faster than CPU interpolation
"""
IGNOrthophotoFetcher.fetch_orthophoto_gpu()
β
def fetch_orthophoto_gpu(
self,
bbox: Tuple[float, float, float, float],
resolution: float = 0.2
) -> cp.ndarray:
"""
Fetch RGB tile on GPU with caching.
Args:
bbox: Bounding box (xmin, ymin, xmax, ymax)
resolution: Resolution in meters
Returns:
RGB image on GPU (H, W, 3)
Note:
Uses LRU cache in GPU memory
"""
IGNOrthophotoFetcher.clear_gpu_cache()
β
def clear_gpu_cache(self):
"""
Clear all RGB tiles from GPU cache.
Use this to free GPU memory when:
- Processing is complete
- Memory pressure detected
- Switching to different region
"""
π¦ Installation & Upgradeβ
Upgrading from v1.4.xβ
# Upgrade to v1.5.0
pip install --upgrade ign-lidar-hd
# With GPU support (if not already installed)
pip install --upgrade ign-lidar-hd[gpu]
# With full GPU support (CuPy + RAPIDS)
pip install --upgrade ign-lidar-hd[gpu-full]
New Installationβ
# Standard installation
pip install ign-lidar-hd
# With GPU support
pip install ign-lidar-hd[gpu]
# With RAPIDS cuML (best performance)
pip install ign-lidar-hd[gpu-full]
# Or via conda:
# conda install -c rapidsai -c conda-forge cuml
GPU Requirementsβ
- NVIDIA GPU with CUDA support
- CUDA Toolkit 11.0+ or 12.0+
- CuPy matching your CUDA version
- Optional: RAPIDS cuML for advanced features
π― Usage Examplesβ
Basic RGB Augmentation with GPUβ
from ign_lidar.processor import LiDARProcessor
# Initialize with GPU + RGB
processor = LiDARProcessor(
lod_level="LOD2",
include_rgb=True,
rgb_cache_dir='rgb_cache/',
use_gpu=True # Enables GPU for features + RGB
)
# Process tiles (automatically uses GPU)
processor.process_tile('input.laz', 'output.laz')
Command Lineβ
# Enable GPU for both features and RGB
ign-lidar-process enrich \
--input raw_tiles/ \
--output enriched_tiles/ \
--add-rgb \
--rgb-cache-dir rgb_cache/ \
--use-gpu \
--num-workers 4
Advanced: Direct API Usageβ
from ign_lidar.features_gpu import GPUFeatureComputer
from ign_lidar.rgb_augmentation import IGNOrthophotoFetcher
import cupy as cp
import laspy
# Load point cloud
las = laspy.read('tile.laz')
points = cp.asarray(las.xyz)
# Initialize GPU components
computer = GPUFeatureComputer(use_gpu=True)
fetcher = IGNOrthophotoFetcher(use_gpu=True)
# Compute features on GPU
features_gpu = computer.compute_all_features(points, k=20)
# Fetch and interpolate RGB on GPU
bbox = (points[:, 0].min(), points[:, 1].min(),
points[:, 0].max(), points[:, 1].max())
rgb_image_gpu = fetcher.fetch_orthophoto_gpu(bbox)
colors_gpu = computer.interpolate_colors_gpu(points, rgb_image_gpu, bbox)
# Transfer results to CPU
features = cp.asnumpy(features_gpu)
colors = cp.asnumpy(colors_gpu)
π§ͺ Testing & Validationβ
New Test Suiteβ
# Run RGB GPU tests
pytest tests/test_gpu_rgb.py -v
# Run specific test
pytest tests/test_gpu_rgb.py::test_interpolate_colors_gpu -v
# Run benchmarks
python scripts/benchmarks/benchmark_rgb_gpu.py
Test Coverageβ
- β GPU color interpolation accuracy
- β GPU performance benchmarks
- β GPU cache functionality
- β Automatic CPU fallback
- β Error handling
- β Integration tests
- β End-to-end pipeline
π Documentation Updatesβ
New Documentationβ
- RGB GPU Guide - Comprehensive usage guide
- Architecture Overview - Updated with GPU RGB flow
- GPU Features - GPU feature computation details
- Release Notes - This document
Updated Documentationβ
- GPU Overview - Complete GPU setup guide
- Workflows - Updated with GPU examples
- Architecture - Added GPU RGB pipeline
- Features - Updated feature documentation
π Migration Guideβ
From v1.4.x to v1.5.0β
No breaking changes! Version 1.5.0 is fully backward compatible.
Existing Code Works Unchangedβ
# v1.4.x code works in v1.5.0
processor = LiDARProcessor(
include_rgb=True,
use_gpu=True # Now accelerates RGB too!
)
New Features Are Opt-Inβ
# Explicitly use GPU RGB (optional)
from ign_lidar.rgb_augmentation import IGNOrthophotoFetcher
fetcher = IGNOrthophotoFetcher(use_gpu=True) # New parameter
π Bug Fixesβ
- Fixed memory leak in GPU cache eviction
- Improved error messages for CUDA errors
- Fixed coordinate transformation edge cases
- Better handling of out-of-bounds points
- Improved thread safety for GPU operations
π Related Resourcesβ
Documentationβ
- π RGB GPU Guide
- ποΈ Architecture Overview
- β‘ GPU Overview
- π§ GPU Features
Implementation Detailsβ
ign_lidar/features_gpu.py
- GPU feature computerign_lidar/rgb_augmentation.py
- RGB fetcher with GPUtests/test_gpu_rgb.py
- Test suitescripts/benchmarks/benchmark_rgb_gpu.py
- Benchmarks
Planning Documentsβ
π¬ Feedback & Supportβ
We'd love to hear about your experience with v1.5.0!
- π Bug Reports: GitHub Issues
- π‘ Feature Requests: GitHub Discussions
- π§ Email: simon.ducournau@gmail.com
π― What's Nextβ
v1.6.0 (Planned)β
- Multi-GPU support for large-scale processing
- Async RGB tile prefetching
- Enhanced memory management
- Additional GPU-accelerated features
Community Feedbackβ
We're particularly interested in:
- Real-world performance results
- GPU hardware compatibility reports
- Feature requests for future releases
- Use cases and workflows
Thank you for using IGN LiDAR HD Processing Library! π
Release Information
- Version: 1.5.0
- Release Date: October 3, 2025
- License: MIT
- Python: 3.8+
- CUDA: 11.0+ or 12.0+ (optional)