Implementation for the "Surface Reconstruction from 3D Line Segments" paper.

Overview

Surface Reconstruction from 3D Line Segments

Surface reconstruction from 3d line segments. [Paper] [Supplementary Material]
Langlois, P. A., Boulch, A., & Marlet, R.
In 2019 International Conference on 3D Vision (3DV) (pp. 553-563). IEEE. Project banner

Installation

  • [IMPORTANT NOTE] The plane arrangement is given as a Linux x64 binary. Please let us know if you need it for an other platform/compiler or if you have issues with it.

  • MOSEK 8 :

    • Download
    • Installation instructions.
    • Request a license (free for academics), and put it in ~/mosek/mosek.lic.
    • Set the mosek directory in the MOSEK_DIR environment variable such that <MOSEK_DIR>/8/tools/platform/linux64x86/src/fusion_cxx is a valid path:

    export MOSEK_DIR=/path/to/mosek

    • Make sure that the binaries are available at runtime:

    export LD_LIBRARY_PATH=$MOSEK_DIR/8/tools/platform/linux64x86/bin:$LD_LIBRARY_PATH

  • Clone this repository: git clone https://github.com/palanglois/line-surface-reconstruction.git

  • Go to the directory: cd line-surface-reconstruction

  • CGAL : Version 4.11 is required:

git clone https://github.com/CGAL/cgal.git external/cgal
cd external/cgal
git checkout releases/CGAL-4.11.3
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
cd ../../..
  • Make a build directory: mkdir build
  • Go to the build directory: cd build
  • Prepare the project with cmake: cmake -DCMAKE_BUILD_TYPE=Release ..
  • Compile the project: make

Examples

  • Out of the box examples are available in demo.sh

  • An example of a full reconstruction procedure from a simple set of images is available here

  • A benchmark example for an artificial textureless scene (with quantitative evaluation) is available here.

Programs

For every program, a simple documentation is available by running ./<program_name> -h

  • ransac_on_lines detects planes in a line set.
  • line_based_recons_param performs reconstruction out of a set of lines and detected planes. Computing the linear program is time consuming, but optimizing is way faster. Therefore, this program 1st computes the linear program and enters a loop in which you can manually set the optimization parameters in order to find the optimal ones for your reconstruction.
  • line_based_recons does the same as line_based_recons_param but the optimization parameters are set directly in the command line. Use it only if you know the optimal parameters for the reconstruction.
  • mesh_metrics provides evaluation metrics between two meshes.

Visualization

Reconstruction .ply files can be visualized directly in programs such as Meshlab or CloudCompare.

A simple OpenGL viewer is available to directly visualize the json line files.

Raw data

The raw data for Andalusian and HouseInterior is available here. For both examples, it includes the raw images as well as the full calibration in .nvm (VisualSFM) format.

For HouseInterior, a ground truth mesh is also available.

License

Apart from the code located in the external directory, all the code is provided under the GPL license.

The binaries and code provided in the external/PolyhedralComplex directory is provided under the Creative Commons CC-BY-SA license.

If these licenses do not suit your needs, please get in touch with us.

Citing this work

@inproceedings{langlois:hal-02344362,
TITLE = {{Surface Reconstruction from 3D Line Segments}},
AUTHOR = {Langlois, Pierre-Alain and Boulch, Alexandre and Marlet, Renaud},
URL = {https://hal.archives-ouvertes.fr/hal-02344362},
BOOKTITLE = {{2019 International Conference on 3D Vision (3DV)}},
ADDRESS = {Qu{\'e}bec City, Canada},
PUBLISHER = {{IEEE}},
PAGES = {553-563},
YEAR = {2019},
MONTH = Sep,
DOI = {10.1109/3DV.2019.00067},
} 
Comments
  • could you please add more details or more annotations to the python file---colmapRansacOutToResidualReconsInput.py

    could you please add more details or more annotations to the python file---colmapRansacOutToResidualReconsInput.py

    hello, Palanglois! Thanks for your great work. Your work is exactly what I am looking for. Recently I am trying to reconstruct a scene using your code. Following the step-by-step instructions in the READMEfile, I could not get a good result even though I have adjusted the parameters several times.

    • the output result of Line3D++ is good

    • run colmapToRANSACInput.py, and I got the line3dpp_output.json file

    • run ransac_on_lines, and I got test_input_for_reconstruction.json and test_no_refine_input_for_reconstruction.json

    • using the OpenGL viewer you provide, I found the results above is okay!

    • run colmapRansacOutToResidualReconsInput.py, and I get the input_lines_from_residuals.json file. The result is bad. the lengths of some lines are much longer than they should be.

    • and then I run the command $LINE_RECONS/build/line_based_recons_param -i input_lines_from_residuals.json -o data/ -ext -v

    I get a result. But the result is barely recognizable. I could not find the correspondence between the reconstruction result and the original scene. I think the problem lies in the colmapRansacOutToResidualReconsInput.py step.

    • then I tried using the result test_input_for_reconstruction.json instead of the input_lines_from_residuals.json to do the reconstruction by running:

    line_based_recons_param -i test_input_for_reconstruction.json -o data/ -np 120 -ext -v

    and I get a better result.

    So I want to know more about the python file(colmapRansacOutToResidualReconsInput.py and colmapToRANSACInput.py) in detail cause I don't know what the python file is used to do exactly. Could you please add more detail to the README file or more annotation to the code?

    opened by Yanchuan913 4
  • Segmentation fault

    Segmentation fault

    hello, Palanglois! Thanks for your great work. I meet a problem when I run demo.sh and dont know how to solve it. I followed the instructions in the README file. Here is my computer environment:

    CentOS Linux release 7.2 
    gcc 8.3.0. 
    cmake3 version 3.17.5
    

    And then I run the command in demo.sh:

    build/line_based_recons -i data/Andalusian/input_lines_from_residuals.json -o data/ -cp 1 -cv 1 -ca 0 -ce 0.1 -cc 0.1 -ext -v
    

    Then I got a Segmentation fault

    Loaded 14503 lines and 148 planes.
    Nb of reoriented planes : 60
    Segmentation fault
    

    Then I use vscode to debug the program, I found the problem is in main.cpp line 87.

    PlaneArrangement myArrangement(myLineSet.getBbox(bboxIncreaseFactor), myPrimitiveSet, voxel_size, verbose);
    

    And In function PlaneArrangement in PlaneArrangement.cpp

    #include "PlaneArrangement.h"
    
    using namespace std;
    
    PlaneArrangement::PlaneArrangement(const CGAL::Bbox_3 &_bbox, const PrimitiveSet &_myPrimitiveSet, double _voxelSize,
                                       bool _verbose) :
            myPrimitiveSet(_myPrimitiveSet),
            bbox(_bbox),
            voxelSize(_voxelSize),
            verbose(_verbose),
            plane_handle_to_prim(map<int, int>()),
            prim_to_plane_handle(map<int, int>()),
            facetToCells(map<int, OrientedCellsHandles>()),
            intersectionTree(nullptr),
            polyhedron(nullptr)
    {
        // Set the bounding box to the internal set
        set_bbox(bbox);
        
        //Insert the voxel planes
        insertVoxelPlanes();
    
        //Insert the primitives
        insertPlanes(myPrimitiveSet);
    
        if (verbose) {
            cout << "Constructed plane arrangement bounding box : " << bbox;
            if (voxelSize != 0.)
                cout << " and with voxels of size : " << voxelSize;
            cout << endl;
        }
    }
    

    The "segmentation fault" occurs when running to the set_bbox()

    I tried to solve this bug myself but I don't even know how it happened. It may be my computer's problem or the "plane arrangement library" problem. Could you please help me with it?

    opened by Luo1Cheng 3
  • how to download the dataset meetingroom

    how to download the dataset meetingroom

    Dear Palanglois, Thank you for share such a nice code in advance, and it's working well in my computer. Recently,I read Supplementary Material of the paper, I am interested in the dataset meetingroom of the paper, but I don't know how to download it, can you provide it to me?

    opened by qco-11 2
  • large memory consumption

    large memory consumption

    Hi, Palanglois! Thanks for your great work. I am trying to reconstruct some scenes using your program. I managed to compile your code on my machine and try to reconstruct a scene that contains about 3k lines. I did run ransac_on_lines smoothly, but when running line_based_recons_param and line_based_recons, these two programs consumed large amount of memory and reached my machine memory limit (64GB), and finally killed by Linux. I found that the program consumes about 20GB memory when logs out 'Inserted n primitives out of N', after that, it consumed memory at a very fast speed when performing Building the intersection tree.... The memory usage always reached the limit at this step. Is this caused by my misusage (e.g. inappropriate parameters) ? or this program does need so much memory? Can you provide some tips to reduce memory usage? Thanks! 10611620837994_ pic_hd

    opened by m-iDev-0792 1
  • How to run line_based_recons_param?

    How to run line_based_recons_param?

    hi, Palanglois! Thank you for sharing such a nice code in advance, and it's working well in my computer. I meet a problem when I run line_based_recons_param. My input command is: build/line_based_recons_param -i data/Andalusian/input_lines_from_residuals.json -o data/ -cp 1 -cv 1 -ca 0 -ce 0.1 -cc 0.1 -vs 4 -ext -v and it shows : Unknown option -cp if i want to run line_based_recons_param,do i not need to input parameters' value like cp,cv,ca and so on? for example,i just need input: build/line_based_recons_param -i data/Andalusian/input_lines_from_residuals.json -o data/ -vs 4 -ext -v?

    opened by qco-11 0
  • the problem of parameter σp

    the problem of parameter σp

    Dear Palanglois,

    Recently,I try tweak σp of Line3D++ from 2 to 50. however, I only get almost 340 lines of meetingroom, far from 831. on the other hand,it working well to get 1016 lines of Andalusian. I don't know the best parameter to get decent input lines of meetingroom.Can you give me some advice?

    Best regards, qco

    opened by qco-11 1
The official implementation of the research paper "DAG Amendment for Inverse Control of Parametric Shapes"

DAG Amendment for Inverse Control of Parametric Shapes This repository is the official Blender implementation of the paper "DAG Amendment for Inverse

Elie Michel 157 Dec 26, 2022
The repository contains our dataset and C++ implementation of the CVPR 2022 paper, Geometric Structure Preserving Warp for Natural Image Stitching.

Geometric Structure Preserving Warp for Natural Image Stitching This repository contains our dataset and C++ implementation of the CVPR 2022 paper, Ge

null 21 Dec 22, 2022
Code and Data for our CVPR 2021 paper "Structured Scene Memory for Vision-Language Navigation"

SSM-VLN Code and Data for our CVPR 2021 paper "Structured Scene Memory for Vision-Language Navigation". Environment Installation Download Room-to-Room

hanqing 35 Dec 3, 2022
This is the code of our paper An Efficient Training Approach for Very Large Scale Face Recognition or F²C for simplicity.

Fast Face Classification (F²C) This is the code of our paper An Efficient Training Approach for Very Large Scale Face Recognition or F²C for simplicit

null 33 Jun 27, 2021
This code accompanies the paper "Human-Level Performance in No-Press Diplomacy via Equilibrium Search".

Diplomacy SearchBot This code accompanies the paper "Human-Level Performance in No-Press Diplomacy via Equilibrium Search". A very brief orientation:

Facebook Research 34 Dec 20, 2022
Source Code for SIGGRAPH Asia 2021 Paper "Ensemble Denoising for Monte Carlo Renderings"

Ensemble Denoising Source Code for SIGGRAPH Asia 2021 Paper Ensemble Denoising for Monte Carlo Renderings. Paper | Code | Talk Slides Dependencies A C

郑少锟 52 Nov 25, 2022
Source Code for SIGGRAPH Asia 2021 Paper "Ensemble Denoising for Monte Carlo Renderings"

Ensemble Denoising Source Code for SIGGRAPH Asia 2021 Paper Ensemble Denoising for Monte Carlo Renderings. Paper | Code | Talk Slides Dependencies A C

郑少锟 52 Nov 25, 2022
Codes for the paper "A Correlation Attack on Full SNOW-V and SNOW-Vi"

Codes for the paper "A Correlation Attack on Full SNOW-V and SNOW-Vi" #Contents Automatic search of linear approximation trails of SNOW-V Evaluating t

null 2 Oct 19, 2022
the code of paper "Optimizing Global Injectivity for Constrained Parameterization" (SIGGRAPH Asia 2021)

Optimizing Global Injectivity for Constrained Parameterization Xingyi Du, Danny M. Kaufman, Qingnan Zhou, Shahar Kovalsky, Yajie Yan, Noam Aigerman, T

Charles Du 4 Nov 10, 2022
NLP-based perching trajectory generation presented in our paper "Perception-Aware Perching on Powerlines with Multirotors".

Perception-Aware Perching on Powerlines with Multirotors This repo contains the code for the NLP-based perching trajectory generation presented in our

null 24 Dec 19, 2022
Code for Paper A Systematic Framework to Identify Violations of Scenario-dependent Driving Rules in Autonomous Vehicle Software

Code for Paper A Systematic Framework to Identify Violations of Scenario-dependent Driving Rules in Autonomous Vehicle Software

Qingzhao Zhang 6 Nov 28, 2022
Implementation of "An Analytical Solution to the IMU Initialization Problem for Visual-Inertial Systems"

An Analytical Solution to the IMU Initialization Problem for Visual-Inertial Systems Implementation of "An Analytical Solution to the IMU Initializati

David Zuniga-Noel 94 Nov 23, 2022
TensorRT implementation of RepVGG models from RepVGG: Making VGG-style ConvNets Great Again

RepVGG RepVGG models from "RepVGG: Making VGG-style ConvNets Great Again" https://arxiv.org/pdf/2101.03697.pdf For the Pytorch implementation, you can

weiwei zhou 69 Sep 10, 2022
A CUDA implementation of Lattice Boltzmann for fluid dynamics simulation

Lattice Boltzmann simulation I am conscious of being only an individual struggling weakly against the stream of time. But it still remains in my power

Long Nguyen 17 Mar 1, 2022
C++ Implementation of "An Equivariant Filter for Visual Inertial Odometry", ICRA 2021

EqF VIO (Equivariant Filter for Visual Inertial Odometry) This repository contains an implementation of an Equivariant Filter (EqF) for Visual Inertia

null 60 Nov 15, 2022
Unofficial third-party implementation of FFD (fast feature detector) published in IEEE TIP 2020.

fast_feature_detector Unofficial third-party implementation of FFD (fast feature detector) published in IEEE TIP 2020. Caution I have not got any perm

kamino410 12 Feb 17, 2022
ResNet Implementation, Training, and Inference Using LibTorch C++ API

LibTorch C++ ResNet CIFAR Example Introduction ResNet implementation, training, and inference using LibTorch C++ API. Because there is no native imple

Lei Mao 23 Oct 29, 2022
Swin Transformer C++ Implementation

This is Swin Transformer C++ Implementation, inspired by swin-transformer-pytorch.

null 20 Dec 14, 2022