Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Yarroudh authored Nov 24, 2023
1 parent 6e7f8fb commit c7c051a
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,32 +39,39 @@ If you are using `segment-lidar`, we highly recommend that you take the time to

## Basic tutorial

A basic tutorial is available [here](https://yarroudh.gitbook.io/segment-lidar/tutorial/basic-usage).
You can also refer to API for more information about different parameters.
A basic tutorial is available [here](https://yarroudh.github.io/segment-lidar/tutorial.html).

You can also refer to [API](https://yarroudh.github.io/segment-lidar/module.html) for more information about different parameters.

### Without ground filtering

```python
from segment_lidar import samlidar
from segment_lidar import samlidar, view

viewpoint = view.TopView()

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

### With ground filtering

```python
from segment_lidar import samlidar
from segment_lidar import samlidar, view

viewpoint = view.TopView()

model = samlidar.SamLidar(ckpt_path="sam_vit_h_4b8939.pth")
points = model.read("pointcloud.las")
cloud, non_ground, ground = model.csf(points)
labels, *_ = model.segment(points=cloud, image_path="raster.tif", labels_path="labeled.tif")
labels, *_ = model.segment(points=cloud, view=view, image_path="raster.tif", labels_path="labeled.tif")
model.write(points=points, non_ground=non_ground, ground=ground, segment_ids=labels, save_path="segmented.las")
```

**Note**: The latest version of `segment-lidar` supports defining a custom pinhole camera, with or without interactive visualization, and save the view as an image. Please, refer to the [documentation](https://yarroudh.github.io/segment-lidar/tutorial.html#interactive-mode) for more details.

## Sample data

For testing purposes, you can download a sample here: [pointcloud.las](https://drive.google.com/file/d/16EF2aRSvo8u0pXvwtaQ6sjhP5h0sWw3o/view?usp=sharing).
Expand Down Expand Up @@ -154,4 +161,4 @@ For more detailed information please contact us via <[email protected]>, we ar

-----

Copyright © 2023, [Geomatics Unit of ULiège](http://geomatics.ulg.ac.be/fr/home.php). Released under [BSD-3 Clause License](https://github.com/Yarroudh/segment-lidar/blob/main/LICENSE).
Copyright © 2023, [Geomatics Unit of ULiège](http://geomatics.ulg.ac.be/fr/home.php). Released under [BSD-3 Clause License](https://github.com/Yarroudh/segment-lidar/blob/main/LICENSE).

0 comments on commit c7c051a

Please sign in to comment.