This is a demo code for our paper "LC2WF:Learning to Construct 3D Building Wireframes from 3D Line Clouds", accepted to BMVC 2022, by Yicheng Luo, Jing Ren, Xuefei Zhe, Di Kang, Yajing Xu, Peter Wonka, and Linchao Bao.
In this work, we propose the first network to process line clouds for building wireframe abstraction. The network takes a line cloud as input , i.e., a nonstructural and unordered set of 3D line segments extracted from multi-view images, and outputs a 3D wireframe of the underlying building, which consists of a sparse set of 3D junctions connected by line segments. We observe that a line patch, i.e., a group of neighboring line segments, encodes sufficient contour information to predict the existence and even the 3D position of a potential junction, as well as the likelihood of connectivity between two query junctions. We therefore introduce a two-layer Line-Patch Transformer to extract junctions and connectivities from sampled line patches to form a 3D building wireframe model. We also introduce a synthetic dataset of multi-view images with ground-truth 3D wireframe.
You can find more details at: [paper] | [dataset and models] | [suppl.]
url | |
---|---|
pretrained-model | [Google Drive] / [BaiduYun](code:engt) |
dataset | [Google Drive] / [BaiduYun](code:p9kb) |
mvs-image | [[Google Drive]] / [BaiduYun](code:tdnf) |
git clone https://github.com/Luo1Cheng/LC2WF.git
Download line cloud data and pre-trained model.
Unzip files
unzip LC2wf_data.zip
unzip pretrained.zip
|----LC2WF_data
| |----house
| |----LineCloud_0130_P123
| |----test.txt
| |----train.txt
|----pretrained
| |----junction.pth
| |----edge.pth
|...
python train.py --yamlName evalJunc
python trainClassify.py --yamlName evalWireframe
cd eval_results
python ours_eval.py
Clone repository
git clone https://github.com/Luo1Cheng/LC2WF.git
Download line cloud data from [Google Drive] or [Baidu Disk](code:p9kb)
Unzip the files.
unzip LC2wf_data.zip
Train the junction prediction model first
python train.py --yamlName train
Change the load_model
in config/genPredJunc.yaml
to your junction_best.pth
, which will be saved in log/***/saved_models
folder.
Generate the predicted junctions of the training and test dataset
python train.py --yamlName genPredJunc
Train the connectivity prediction model
python trainClassify.py
The best model will be saved in log/***/saved_models
folder.
If you use this code/dataset for your research, please cite our paper:
@InProceedings{luo2022LC2WF,
author = "Yicheng Luo, Jing Ren, Xuefei Zhe, Di Kang, Yajing Xu, Peter Wonka, and Linchao Bao",
title = "LC2WF:Learning to Construct 3D Building Wireframes from 3D Line Clouds",
booktitle = "Proceedings of the British Machine Vision Conference (BMVC)",
year = 2022
}