From 385be2eca72eb3833efa4be0a0088b34e764788a Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 31 Aug 2026 09:04:45 +0800
Subject: [PATCH] feat(pointcloud): complete annotation and result lifecycle workflows
---
capabilities/05-3d-pointcloud/run_pointcloud_understanding.py | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/capabilities/05-3d-pointcloud/run_pointcloud_understanding.py b/capabilities/05-3d-pointcloud/run_pointcloud_understanding.py
index 3bbc7d9..d831405 100644
--- a/capabilities/05-3d-pointcloud/run_pointcloud_understanding.py
+++ b/capabilities/05-3d-pointcloud/run_pointcloud_understanding.py
@@ -531,13 +531,9 @@
semantic_colors = np.asarray([np.asarray(SEMANTIC_CLASSES[int(code)]["color"], dtype=float) / 255.0 for code in semantic_classes])
downsampled.colors = o3d.utility.Vector3dVector(semantic_colors)
o3d.io.write_point_cloud(str(classified), downsampled, write_ascii=False)
- # Retain sparse candidate classes in the browser preview. Uniform sampling
- # made thin conductors disappear even when they were correctly labelled.
- candidate_indices = np.flatnonzero(np.isin(semantic_classes, [15, 16]))
- remaining = max(0, min(len(values), 400_000) - len(candidate_indices))
- other_indices = np.flatnonzero(~np.isin(semantic_classes, [15, 16]))
- sampled_other = other_indices[np.linspace(0, len(other_indices) - 1, min(remaining, len(other_indices)), dtype=int)] if len(other_indices) and remaining else np.array([], dtype=int)
- preview_indices = np.sort(np.concatenate((candidate_indices, sampled_other)))
+ # The console now renders the entire processed point set, so sparse
+ # conductors and all other classes are retained without preview sampling.
+ preview_indices = np.arange(len(values), dtype=np.int64)
preview_cloud = downsampled.select_by_index(preview_indices.tolist())
o3d.io.write_point_cloud(str(semantic_preview_cloud), preview_cloud, write_ascii=False)
# Annotation must retain observed RGB. The semantic preview uses rule
@@ -604,7 +600,7 @@
"classified_point_cloud": classified.name,
"semantic_preview_point_cloud": semantic_preview_cloud.name,
"semantic_annotation_source_point_cloud": annotation_source_cloud.name,
- "semantic_annotation_source_kind": "deterministic 400000-point RGB/XYZ subset from original input after voxel sampling; no semantic display colours",
+ "semantic_annotation_source_kind": "complete processed RGB/XYZ point set after voxel sampling; no semantic display colours",
"semantic_preview_points": int(len(preview_indices)),
"semantic_classified_las": semantic_las.name,
"semantic_raster_file": semantic_raster_path.name,
--
Gitblit v1.9.3