Coder Social home page Coder Social logo

theobdt / aerial_pc_classification Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 11.0 7.93 MB

Segmentation of urban aerial point clouds with Deep Learning in Pytorch.

Python 98.27% Shell 1.73%
point-cloud pytorch deep-learning machine-learning pointcloud aerial-point-clouds artificial-intelligence python aerial-imagery

aerial_pc_classification's Introduction

Aerial point cloud classification

This repository is our project for the course Point Cloud for 3D Modeling (NPM3D) of the IASD master program. This implementation is strongly inspired from the paper classification of aerial point clouds with deep learning by Emre Özdemir and Fabio Remondino.

Our project report is available at the following link : https://www.overleaf.com/read/tdjgnxjbcmpg

Installation

This project requires python >= 3.5

$ git clone https://github.com/theobdt/aerial_pc_classification.git
$ cd aerial_pc_classification
$ pip3 install -r requirements.txt

Getting the data

To get the data, you will first have to request access on the ISPRS website, it is totally free. Fill out the questionnaire to receive the credentials. Then download data using the following script :

$ chmod +x fetch_data.sh
$ ./fetch_data.sh

1. Preprocessing

Convert files to PLY and center/scale the point clouds.

$ python3 preprocessing.py -f data/vaihingen3D_train.pts data/vaihingen3D_test.pts --centering

Output files will be saved to data/preprocessed/.

intensity trainVaihingen training intensity

2. Computing features

Parameters used for features extraction are stored in cfg/config_features_extraction.yaml. Output files will be saved in data/features/.

Available steps are :

  1. Local descriptors (descriptors). A few examples : normals trainNormal angles to vertical axis sphericity trainSphericity planarity trainPlanarity
  2. Region growing (region_growing) regions trainResults of region growing
  3. Ground extraction (ground_extraction) ground trainGround extraction
  4. Ground rasterization (ground_rasterization) ground raterized_trainGround rasterized
  5. Height above ground (height_above_ground) height_trainHeight above ground

To run all steps at once:

$ python3 compute_features.py --full_pipeline --files data/preprocessed/vaihingen3D_train.ply data/preprocessed/vaihingen3D_test.ply 

To run all steps starting from a specific one :

$ python3 compute_features.py --from_step region_growing --files data/preprocessed/vaihingen3D_train.ply data/preprocessed/vaihingen3D_test.ply

To run steps individually :

$ python3 compute_features.py --steps region_growing ground_extraction --files data/preprocessed/vaihingen3D_train.ply data/preprocessed/vaihingen3D_test.ply

3. Training Bi LSTM network

Configuration file for training is stored in cfg/config_bilstm.yaml. To train the network, run the following command :

$ python3 train.py

A new checkpoint will be created in ckpts/[current timestamp], along with a plot of accuracies and losses throughout training.

4. Predict with Bi LSTM network

To compute predictions on all points of the cloud run :

$ python3 test.py -f data/features/vaihingen3D_test.ply --ckpt ckpts/2020-04-10_12-25-36

A new folder will be created at data/predictions/[model timestamp], along with a comprehensive metrics table. labels_test9-classes test set predictions_test9-classes predictions on test set

confusion_matrixConfusion matrix and metrics

aerial_pc_classification's People

Contributors

louis-monier avatar theobdt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aerial_pc_classification's Issues

questions about visualization

Hi,

Many thanks for sharing!

I tried to replicate the results you showed in the report. I visualized the prediction using "open3d" lib, but the figure drawn does not look as good as yours. Can I know how do you visualize the data, please?

Best wishes,
Oliver

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.