Git Product home page Git Product logo

visualcomputinginstitute / 3d-semantic-segmentation Goto Github PK

View Code? Open in Web Editor NEW
97.0 9.0 31.0 877 KB

This work is based on our paper Exploring Spatial Context for 3D Semantic Segmentation of Point Clouds, which is appeared at the IEEE International Conference on Computer Vision (ICCV) 2017, 3DRMS Workshop.

Home Page: https://www.vision.rwth-aachen.de/page/3dsemseg

License: MIT License

Python 100.00%
semantic-segmentation point-cloud tensorflow deep-neural-networks deep-learning

3d-semantic-segmentation's Introduction

Exploring Spatial Context for 3D Semantic Segmentation of Point Clouds

Created by Francis Engelmann, Theodora Kontogianni, Alexander Hermans, Jonas Schult and Bastian Leibe from RWTH Aachen University.

prediction example

Introduction

This work is based on our paper Exploring Spatial Context for 3D Semantic Segmentation of Point Clouds, which appeared at the IEEE International Conference on Computer Vision (ICCV) 2017, 3DRMS Workshop.

You can also check our project page for further details.

Deep learning approaches have made tremendous progress in the field of semantic segmentation over the past few years. However, most current approaches operate in the 2D image space. Direct semantic segmentation of unstructured 3D point clouds is still an open research problem. The recently proposed PointNet architecture presents an interesting step ahead in that it can operate on unstructured point clouds, achieving decent segmentation results. However, it subdivides the input points into a grid of blocks and processes each such block individually. In this paper, we investigate the question how such an architecture can be extended to incorporate larger-scale spatial context. We build upon PointNet and propose two extensions that enlarge the receptive field over the 3D scene. We evaluate the proposed strategies on challenging indoor and outdoor datasets and show improved results in both scenarios.

In this repository, we release code for training and testing various pointcloud semantic segmentation networks on arbitrary datasets.

Citation

If you find our work useful in your research, please consider citing:

@inproceedings{3dsemseg_ICCVW17,
  author    = {Francis Engelmann and
               Theodora Kontogianni and
               Alexander Hermans and
               Bastian Leibe},
  title     = {Exploring Spatial Context for 3D Semantic Segmentation of Point Clouds},
  booktitle = {{IEEE} International Conference on Computer Vision, 3DRMS Workshop, {ICCV}},
  year      = {2017}
}

Installation

Install TensorFlow. The code has been tested with Python 3.6 and TensorFlow 1.8.

Usage

In order to get more representative blocks, it is encouraged to uniformly downsample the original point clouds. This is done via the following script:

python tools/downsample.py --data_dir path/to/dataset --cell_size 0.03

This statement will produce pointclouds where each point will be representative for its 3cm x 3cm x 3cm neighborhood.

To train/test a model for semantic segmentation on pointclouds, you need to run:

python run.py --config path/to/config/file.yaml

Detailed instruction of the structure for the yaml config file can be found in the wiki. Additionally, some example configuration files are given in the folder experiments.

Note that the final evaluation is done on the full sized point clouds using k-nn interpolation.

Reproducing the scores of our paper for stanford indoor 3d

Downloading the data set

First of all, Stanford Large-Scale 3D Indoor Spaces Dataset has to be downloaded. Follow the instructions here. The aligned version 1.2 is used for our results.

Producing numpy files from the original dataset

Our pipeline cannot handle the original file type of s3dis. So, we need to convert it to npy files. Note that Area_5/hallway_6 has to be fixed manually due to format inconsistencies. The following script has to be run from the tools directory:

python prepare_s3dis.py --input_dir path/to/dataset --output_dir path/to/output

Downsampling for training

Before training, we downsampled the pointclouds.

python tools/downsample.py --data_dir path/to/dataset --cell_size 0.03

Training configuration scripts

Configuration files for all experiments are located in experiments/iccvw_paper_2017/*. For example, they can be launched as follows:

python run.py --config experiments/iccvw_paper_2017/s3dis_mscu/s3dis_mscu_area_1.yaml

The above script will run our multi scale consolidation unit network on stanford indoor 3d with test area 1.

Evaluating on full scale point clouds

Reported scores on the dataset are based on the full scale pointclouds. In order to do so, we need to load the trained model and set the TEST flag.

Replace modus: TRAIN_VAL with

    modus: TEST
    model_path: 'path/to/trained/model/model_ckpts'

which is located in the log directory specified for training.

VKitti instructions

  • Coming soon...

Trained models for downloading

  • Coming soon...

License

Our code is released under MIT License (see LICENSE file for details).

3d-semantic-segmentation's People

Contributors

francisengelmann avatar jonasschult 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

3d-semantic-segmentation's Issues

Directory structure

Hello and thanks for this great work !

I am following your procedure, I downloaded the Standford dataset and I am wondering a few things:

  • Do we have to manually create your directory structure with the files from the datasets or do you have a way to automate it ?
  • Same for .npy files since the dataset offers .txt files ?

Thanks

Pretrained model support

Thanks for sharing your code. Could you also give a pretrained model or instructions for the outdoor(vKITTI) dataset as well? It would help me a lot.

the miou of each category of your work on the vkitti dataset?

Thank you very much for your great work ssp+spg, can you tell me the miou of each category of your work on the vkitti dataset? If you can tell me, I will cite your paper and compare it with your work in our experiment. Looking forward to your reply.

How to train the model and test on unlabelled data set

I am not getting what should be the data path ex if it is gru model and the configuration file is area_1 then which area's path should be places in data path and what should be the corresponding test_set, also can we specify more than 1 test_set, if yes how? How is the data split for train and validation and how to test the model on unlabelled data set?

Training on vkitti

Hello,
thanks for the great work,
how did you train on vkitti3d data?
thanks

ZeroDivisionError: float division by zero

Running evaluation epoch 0001 / 0061: 0it [00:00, ?it/s]
Traceback (most recent call last):
File "run.py", line 329, in
main(config, log_dir, isTrain)
File "run.py", line 48, in main
eval_one_epoch(sess, ops, model, dataset, epoch, config['train']['epochs'])
File "run.py", line 237, in eval_one_epoch
avg_loss = loss_sum / float(total_seen / model.batch_generator.num_points)
ZeroDivisionError: float division by zero

While training the standford_indoor data at running training epoch 001/061, I got this error. How could i fix this error?

Vkitty dataset, which model ?

I want to perform classification and segmentation of outdoor pointclouds using the vkitty dataset and your 3d-semantic-segmentation tool.

After downloading the dataset and prepare the dataset using your tools, I want to train a model.

Which model should I use to do this ? gru_neighbor, multi_block or multi_scale_cu ?

Thanks for sharing your work !

Dataset could not be founder

Thank you for your excellent code, but I have a problem with the import of the Dataset.
Error that I encounter when I follow your Readme.
I downloaded the Dataset and I use the file path located on my machine, but without success for you to tell me what element I have to modify?
ValueError : Dataset could not be found under' '

Issue with prepare npy files

Thanks for providing the code for public. I am trying to create npy file for training. I am getting the following error. can you please help me to fix it?

(3DSeg) C:\Users\Documents\3DDeep_LIDAR\tools>python prepare_s3dis.py --input_dir Dataset --output_dir OUT
Program was launched with the following arguments:
~ input_dir Dataset
~ output_dir OUT

0%| | 0/272 [00:00<?, ?it/s]
Traceback (most recent call last):
File "prepare_s3dis.py", line 75, in
main(params)
File "prepare_s3dis.py", line 57, in main
out_filename = elements[-3] + '_' + elements[-2] + '.npy' # Area_1_hallway_1.npy
IndexError: list index out of range

how to do the experiment without RGB?

Thanks for providing the code for public,you have done the experiment with only XYZ input features, without RGB in your paper,can you tell me how to complete the experiment without RGB? because the dataset which i download is constitute of XYZ and RGB.

output form

Hi, I'm very interested in your project, I wonder if your project supports inputting a 3D point cloud and outputting a semantically segmented 3D point cloud (i.e., with each point cloud labeled)

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.