Hi, so, this allowed me to test exactly why on the original post I did suggest
https://github.com/Yarroudh/segment-lid ... me-ov-file
I has an option to in a free perspective set the view for the segmentation to be run, so it is "usefull"for non top down scans.
YEt, since you can only get "one shot" is not usable in practice but serves as a ground for testing the concept.
I had to install twice, I would say it was bcause I had to install pytorch specific to my cudatoolkit version.
---------------------
the python commands, this one is with the topview I did just for testing but if you use the free view the resolution param seems not to be needed as resolution seems to be the size of the 3d windows. Also it would be welcom point size control etc... but still for giving it a quick test, it works.
---------
from segment_lidar import samlidar, view
import os
# Usar vista interactiva (Pinhole)
viewpoint = view.TopView()
# Crear la instancia de SamLidar con la ruta del modelo
model = samlidar.SamLidarmodel = samlidar.SamLidar(ckpt_path="C:/Users/pablo/anaconda3/envs/samlidar/modelos/sam_vit_h_4b8939.pth",
resolution=0.05) # Aumenta la resolución de la imagen raster
# Leer la nube de puntos desde la nueva ruta
points = model.read("E:/LIDAR_JAPAN/MMS11_Triple_Lane_Touge/MMS/SAM_TESTING/Input_DATA_INTENSITY/08NF6208.las")
# Segmentar la nube de puntos
labels, *_ = model.segment(points=points, view=viewpoint,
image_path="E:/LIDAR_JAPAN/MMS11_Triple_Lane_Touge/MMS/SAM_TESTING/raster.tif",
labels_path="E:/LIDAR_JAPAN/MMS11_Triple_Lane_Touge/MMS/SAM_TESTING/labeled.tif")
# Guardar los resultados en la misma carpeta
model.write(points=points, segment_ids=labels,
save_path="E:/LIDAR_JAPAN/MMS11_Triple_Lane_Touge/MMS/SAM_TESTING/segmented.las")