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

Overview

Surface Reconstruction from 3D Line Segments

Surface reconstruction from 3d line segments.
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
Owner
null
Inference code for "StylePeople: A Generative Model of Fullbody Human Avatars" paper. This code is for the part of the paper describing video-based avatars.

NeuralTextures This is repository with inference code for paper "StylePeople: A Generative Model of Fullbody Human Avatars" (CVPR21). This code is for

Visual Understanding Lab @ Samsung AI Center Moscow 18 Oct 6, 2022
Code for paper ECCV 2020 paper: Who Left the Dogs Out? 3D Animal Reconstruction with Expectation Maximization in the Loop.

Who Left the Dogs Out? Evaluation and demo code for our ECCV 2020 paper: Who Left the Dogs Out? 3D Animal Reconstruction with Expectation Maximization

Benjamin Biggs 29 Dec 28, 2022
The project is an official implementation of our CVPR2019 paper "Deep High-Resolution Representation Learning for Human Pose Estimation"

Deep High-Resolution Representation Learning for Human Pose Estimation (CVPR 2019) News [2020/07/05] A very nice blog from Towards Data Science introd

Leo Xiao 3.9k Jan 5, 2023
Home repository for the Regularized Greedy Forest (RGF) library. It includes original implementation from the paper and multithreaded one written in C++, along with various language-specific wrappers.

Regularized Greedy Forest Regularized Greedy Forest (RGF) is a tree ensemble machine learning method described in this paper. RGF can deliver better r

RGF-team 364 Dec 28, 2022
Official implementation of AAAI-21 paper "Label Confusion Learning to Enhance Text Classification Models"

Description: This is the official implementation of our AAAI-21 accepted paper Label Confusion Learning to Enhance Text Classification Models. The str

null 101 Nov 25, 2022
Official PyTorch implementation for paper Context Matters: Graph-based Self-supervised Representation Learning for Medical Images

Context Matters: Graph-based Self-supervised Representation Learning for Medical Images Official PyTorch implementation for paper Context Matters: Gra

null 49 Nov 23, 2022
A PyTorch re-implementation of the paper 'Exploring Simple Siamese Representation Learning'. Reproduced the 67.8% Top1 Acc on ImageNet.

Exploring simple siamese representation learning This is a PyTorch re-implementation of the SimSiam paper on ImageNet dataset. The results match that

Taojiannan Yang 72 Nov 9, 2022
Implementation of the paper NAST: Non-Autoregressive Spatial-Temporal Transformer for Time Series Forecasting.

Non-AR Spatial-Temporal Transformer Introduction Implementation of the paper NAST: Non-Autoregressive Spatial-Temporal Transformer for Time Series For

Chen Kai 66 Nov 28, 2022
This is a Pytorch implementation of the paper: Self-Supervised Graph Transformer on Large-Scale Molecular Data.

This is a Pytorch implementation of the paper: Self-Supervised Graph Transformer on Large-Scale Molecular Data.

null 212 Dec 25, 2022
Official implementation of the ICLR 2021 paper

You Only Need Adversarial Supervision for Semantic Image Synthesis Official PyTorch implementation of the ICLR 2021 paper "You Only Need Adversarial S

Bosch Research 272 Dec 28, 2022
Implementation of Nyström Self-attention, from the paper Nyströmformer

Nyström Attention Implementation of Nyström Self-attention, from the paper Nyströmformer. Yannic Kilcher video Install $ pip install nystrom-attention

Phil Wang 95 Jan 2, 2023
Implementation of SETR model, Original paper: Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers.

SETR - Pytorch Since the original paper (Rethinking Semantic Segmentation from a Sequence-to-Sequence Perspective with Transformers.) has no official

zhaohu xing 112 Dec 16, 2022
Official implementation of the paper Image Generators with Conditionally-Independent Pixel Synthesis https://arxiv.org/abs/2011.13775

CIPS -- Official Pytorch Implementation of the paper Image Generators with Conditionally-Independent Pixel Synthesis Requirements pip install -r requi

Multimodal Lab @ Samsung AI Center Moscow 201 Dec 21, 2022
Official pytorch implementation of paper "Image-to-image Translation via Hierarchical Style Disentanglement".

HiSD: Image-to-image Translation via Hierarchical Style Disentanglement Official pytorch implementation of paper "Image-to-image Translation

null 364 Dec 14, 2022
PyTorch implementation of paper "Neural Scene Flow Fields for Space-Time View Synthesis of Dynamic Scenes", CVPR 2021

Neural Scene Flow Fields PyTorch implementation of paper "Neural Scene Flow Fields for Space-Time View Synthesis of Dynamic Scenes", CVPR 20

Zhengqi Li 585 Jan 4, 2023
Implementation of Barlow Twins paper

barlowtwins PyTorch Implementation of Barlow Twins paper: Barlow Twins: Self-Supervised Learning via Redundancy Reduction This is currently a work in

IgorSusmelj 86 Dec 20, 2022
Official pytorch implementation of paper "Inception Convolution with Efficient Dilation Search" (CVPR 2021 Oral).

IC-Conv This repository is an official implementation of the paper Inception Convolution with Efficient Dilation Search. Getting Started Download Imag

Jie Liu 111 Dec 31, 2022
Official implementation of our paper "LLA: Loss-aware Label Assignment for Dense Pedestrian Detection" in Pytorch.

LLA: Loss-aware Label Assignment for Dense Pedestrian Detection This project provides an implementation for "LLA: Loss-aware Label Assignment for Dens

null 35 Dec 6, 2022
Functional TensorFlow Implementation of Singular Value Decomposition for paper Fast Graph Learning

tf-fsvd TensorFlow Implementation of Functional Singular Value Decomposition for paper Fast Graph Learning with Unique Optimal Solutions Cite If you f

Sami Abu-El-Haija 14 Nov 25, 2021