GithubHelp home page GithubHelp logo

mapconcierge / segment-lidar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yarroudh/segment-lidar

0.0 0.0 0.0 15.96 MB

Python package for segmenting LiDAR data using Segment-Anything Model (SAM) from Meta AI.

Home Page: https://yarroudh.gitbook.io/segment-lidar

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

segment-lidar's Introduction

logo

segment-lidar

License Geomatics Unit of ULiege - Development read - documentation

Python package for segmenting LiDAR data using Segment-Anything Model (SAM) from Meta AI.

This package is specifically designed for unsupervised instance segmentation of aerial LiDAR data. It brings together the power of the Segment-Anything Model (SAM) developed by Meta Research and the segment-geospatial package from Open Geospatial Solutions. Whether you're a researcher, developer, or a geospatial enthusiast, segment-lidar opens up new possibilities for automatic processing of aerial LiDAR data and enables further applications. We encourage you to explore our code, contribute to its development and leverage its capabilities for your segmentation tasks.

results

Installation

We recommand using Python 3.9. First, you need to install PyTorch. Please follow the instructions here.

Then, you can easily install segment-lidar from PyPI:

pip install segment-lidar

Or, you can install it from source by running the following commands:

git clone https://github.com/Yarroudh/segment-lidar
cd segment-lidar
python setup.py install

Please, note that the actual version is always under tests. If you find any issues or bugs, please report them in issues section. The second version should implement more advanced features and fonctionalities.

Documentation

If you are using segment-lidar, we highly recommend that you take the time to read the documentation. The documentation is an essential resource that will help you understand the features of the package, as well as provide guidance on how to use it effectively.

Basic tutorial

A basic tutorial is available here. You can also refer to API for more information about different parameters.

from segment_lidar import samlidar

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")
model.write(points=points, non_ground=non_ground, ground=ground, segment_ids=labels, save_path="segmented.las")

Sample data

For testing purposes, you can download a sample here: pointcloud.las.

This data was retrieved from AHN-4. For more data, please visit AHN-Viewer.

Related repositories

We would like to express our acknowledgments to the creators of:

Please, visit these repositories for more information about image raster automatic segmentation using SAM from Meta AI.

License

This software is under the BSD 3-Clause "New" or "Revised" license which is a permissive license that allows you almost unlimited freedom with the software so long as you include the BSD copyright and license notice in it. Please refer to the LICENSE file for more detailed information.

Citation

The use of open-source software repositories has become increasingly prevalent in scientific research. If you use this repository for your research, please make sure to cite it appropriately in your work. The recommended citation format for this repository is provided in the accompanying BibTeX citation. Additionally, please make sure to comply with any licensing terms and conditions associated with the use of this repository.

@misc{yarroudh:2023:samlidar,
  author = {Yarroudh, Anass},
  title = {LiDAR Automatic Unsupervised Segmentation using Segment-Anything Model (SAM) from Meta AI},
  year = {2023},
  howpublished = {GitHub Repository},
  url = {https://github.com/Yarroudh/segment-lidar}
}

Yarroudh, A. (2023). LiDAR Automatic Unsupervised Segmentation using Segment-Anything Model (SAM) from Meta AI [GitHub repository]. Retrieved from https://github.com/Yarroudh/segment-lidar

Author

This software was developped by Anass Yarroudh, a Research Engineer in the Geomatics Unit of the University of Liege. For more detailed information please contact us via [email protected], we are pleased to send you the necessary information.


Copyright © 2023, Geomatics Unit of ULiège. Released under BSD-3 Clause License.

segment-lidar's People

Contributors

yarroudh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.