Yarroudh/segment-lidar

CUDA out of memory error

yjtlab opened this issue · 1 comments

Hello,

I've been trying to use your segment-lidar project and followed the instructions as per the documentation. However, I encountered a CUDA out of memory error that suggests I need about 130GB of GPU memory, which seems unusually high.
image

Here are the steps I took:

from segment_lidar import samlidar, view

viewpoint = view.TopView()

model = samlidar.SamLidar(ckpt_path="./sam_vit_b_01ec64.pth")
points = model.read("./point_cloud.las")
labels, *_ = model.segment(points=points, view=viewpoint, image_path="./raster.tif", labels_path="./labeled.tif")
model.write(points=points, segment_ids=labels, save_path="segmented.las")

I would like to know if there's something wrong with my setup or if I missed any configuration step that's leading to this issue. Is it expected to require this much GPU memory, or could there be a potential issue or bug?

Thank you for your help!

Hello @yjtlab,
Thanks for your feedback.
This is not an issue of the package itself but with your machine performance. What is the size of your point cloud that you are trying to process ?