Fix 12 bugs: D8 flow accumulation, PDF AVIF support, GPU memory leaks, dead code, SAILORE sigma scaling
This commit is contained in:
@ -4,7 +4,7 @@ LidarArchaeoPipeline coordinates the full processing chain:
|
||||
1. Ground classification (PDAL/SMRF)
|
||||
2. DTM generation
|
||||
3. Visualization generation (17 products)
|
||||
4. Rendering (WebP + PDF report)
|
||||
4. Rendering (AVIF/WebP conversion)
|
||||
"""
|
||||
|
||||
import logging
|
||||
@ -61,9 +61,9 @@ from .visualizations import (
|
||||
generate_lrm, generate_openness,
|
||||
generate_mslrm, generate_tpi, generate_sailore,
|
||||
generate_roughness, generate_wavelet,
|
||||
generate_svf, generate_aniso_open,
|
||||
generate_svf, generate_aniso_open, generate_paths,
|
||||
)
|
||||
from .gpu import gpu_cleanup, num_gpus
|
||||
from .gpu import gpu_cleanup, num_gpus, safe_gpu_call
|
||||
from .ign import generate_ign_overlay
|
||||
from .rendering import tif_to_png
|
||||
|
||||
@ -85,6 +85,7 @@ VIZ_STEPS = [
|
||||
('roughness', generate_roughness),
|
||||
('svf', generate_svf),
|
||||
('aniso_open', generate_aniso_open),
|
||||
('paths', generate_paths),
|
||||
('wavelet', generate_wavelet),
|
||||
('ortho', lambda d, b, v, r: generate_ign_overlay(
|
||||
d, b, v, r,
|
||||
@ -278,10 +279,11 @@ class LidarArchaeoPipeline:
|
||||
t0 = time.time()
|
||||
try:
|
||||
# IGN overlays don't use SharedDEM (they download external data)
|
||||
# Non-IGN visualizations use safe_gpu_call for GPU→CPU fallback
|
||||
if name in ('ortho', 'topo'):
|
||||
result = func(dtm_file, basename, file_vis_dir, resolution)
|
||||
else:
|
||||
result = func(dtm_file, basename, file_vis_dir, resolution, shared=shared)
|
||||
result = safe_gpu_call(func, dtm_file, basename, file_vis_dir, resolution, shared=shared)
|
||||
vis_results[name] = result
|
||||
elapsed = time.time() - t0
|
||||
if result:
|
||||
@ -524,10 +526,6 @@ class LidarArchaeoPipeline:
|
||||
try:
|
||||
if self.temp_dir.exists():
|
||||
shutil.rmtree(self.temp_dir)
|
||||
# Also clean up any subdirectories inside temp/
|
||||
temp_base = self.output_dir / "temp"
|
||||
if temp_base.exists():
|
||||
shutil.rmtree(temp_base)
|
||||
logger.info(" ✓ Fichiers temporaires supprimés")
|
||||
except Exception as e:
|
||||
logger.warning(f" Note: Impossible de supprimer les fichiers temporaires: {e}")
|
||||
|
||||
Reference in New Issue
Block a user