feat: add point cloud classification using PTv3#665
feat: add point cloud classification using PTv3#665jayakumarpujar wants to merge 2 commits intoopengeos:mainfrom
Conversation
|
@jayakumarpujar This is great! The tests failed. Need to add |
There was a problem hiding this comment.
Pull request overview
Adds first-class point cloud semantic segmentation support to the GeoAI Python package via a new geoai.pointcloud module built around Open3D-ML’s RandLA-Net, along with docs, tests, and packaging/docs wiring.
Changes:
- Introduces
geoai.pointcloudwithPointCloudClassifier, a model registry, checkpoint download, LAS I/O helpers, and convenience functions. - Adds a comprehensive unit test suite for the new module.
- Wires the feature into packaging extras, top-level lazy exports, and MkDocs (API page + example notebook).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
geoai/pointcloud.py |
Core point cloud classification module (model registry, inference, training stub, visualization, summary). |
tests/test_pointcloud.py |
New unit tests covering API shape, I/O helpers, summary, and mocked inference/training/visualize. |
geoai/__init__.py |
Registers pointcloud in lazy submodules and exposes public symbols via the lazy symbol map. |
pyproject.toml |
Adds pointcloud optional dependency group (open3d, laspy[lazrs]). |
mkdocs.yml |
Adds the new example notebook and API reference page to the docs nav and execution-ignore list. |
docs/pointcloud.md |
Adds mkdocstrings stub page for the new module and a link to the example notebook. |
docs/examples/point_cloud_classification.ipynb |
New example notebook (Colab link + install instructions + end-to-end usage). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Thanks for testing both models @giswqs. You're right, the results are not meaningful for aerial LiDAR. Root cause: domain mismatch The pre-trained models come from Open3D-ML's model zoo and were trained on fundamentally different data domains: There's also no label remapping; model output indices are written directly to the LAS classification field, so even semantically close predictions end up with wrong ASPRS codes. The pipeline code works correctly for inference, coordinate centering, I/O, and visualization all function as intended. The problem is that there are no suitable pre-trained weights in Open3D-ML for aerial LiDAR. Possible paths forward: Find aerial LiDAR weights - We could train and host our own checkpoints. Complete the training pipeline - the train() method is currently experimental. If finished, users could fine-tune their own labeled aerial LAS files. Add ASPRS label remapping, map model class names to ASPRS codes by semantic similarity. This helps interpretation but won't fix the geometric perspective mismatch. I think the right call is to hold off on merging until we have at least one model that produces useful results for aerial LiDAR. |
|
Makes sense. Here are two alternatives. I have not tested them yet. Not sure how good they are. Neither of them have PyPI releases, and the dependency list seems very restrictive. |
…ication Add Point Transformer V3 (PTv3) training pipeline for the DALES aerial LiDAR dataset with pre-trained checkpoint on HuggingFace for fine-tuning. - scripts/train_ptv3_dales.py: standalone training script with DDP, mixed-precision, OneCycleLR, CE+Lovasz loss, checkpoint management, and --hf_pretrained flag for auto-downloading from HuggingFace - scripts/preprocess_dales_ptv3.py: preprocesses DALES LAS tiles into Pointcept-compatible .npy blocks with spatial splitting - requirements_ptv3.txt: minimal dependencies (numpy, laspy, tqdm) - docs/examples/train_point_cloud_ptv3.ipynb: notebook example Results on DALES test set (26.2M points): Overall accuracy: 95.9%, mIoU (8 classes): 69.3% Pre-trained checkpoint: https://huggingface.co/jayakumarpujar/Ptv3
a750479 to
3ea4cf9
Compare
for more information, see https://pre-commit.ci
PTv3 DALES Training ResultsTrained Point Transformer V3 (m1_base, ~46M params) from scratch on DALES for 100 epochs on a single V100-32GB (~27.5 hours). Test Set (26.2M points, 11 tiles)
Validation Set (8.5M points, 4 tiles)
Pre-trained CheckpointAvailable on HuggingFace for fine-tuning: https://huggingface.co/jayakumarpujar/Ptv3 # Fine-tune on custom aerial LiDAR data
python scripts/train_ptv3_dales.py \
--data_root data/your_dataset \
--hf_pretrained \
--epochs 50 --lr 0.0001 --no_ampTraining Config
|
|
@jayakumarpujar This is very impressive! Thank you very much for your efforts. I will test it soon. |


Summary
geoai.pointcloudmodule for semantic segmentation of 3D point clouds (LAS/LAZ) using RandLA-Net via Open3D-MLPointCloudClassifierclass withclassify(),classify_batch(),train(),summary(), andvisualize()methodsclassify_point_cloud()for one-off inferenceKey files
geoai/pointcloud.pytests/test_pointcloud.pydocs/examples/point_cloud_classification.ipynbdocs/pointcloud.mdTest plan
pytest tests/test_pointcloud.py)Closes #51