The purpose of this research code is to leverage edge detection information to refine plane segmentation results as exemplarily shown here:
This can for example be used to segment parcels without any need for task specific training data. See the paper (citation) for more details.
Use Python3 and pip
to install the requirements
pip install -r requirements.txt
The project can be run with
python run_refinement.py --dir_data ./input/0_dataset_027 --config ./config.yaml
Additionally, a test is provided in test_segmenation_refinement
that runs
the segmentation refinement for the example data. Thus, you can check the
actions or try it yourself by running:
python -m unittest
The configuration can be set in the config.yaml
:
- run config: edge detection technique and image size
- algorihm config: hyperparameters for clustering technqiues, etc.
- directories: Specification of relevant directories and files, e.g. input/output
- visualization: Specification which visualizations to save
If you want to perform more experiments, you can download the dataset from the paper here.
The following structure within each folder is expected (check 0_dataset_27
):
.
├── image.png # base input image
├── image_contour.png # output from DexiNed
├── 0_segmentation_final.png # output from PlaneRCNN
├── 0_plane_masks_0.npy # output from PlaneRCNN
└── via_region_data.json # annotations from dataset
This project uses the following works
- PlaneRCNN: 3D Plane Detection and Reconstruction from a Single Image (arXiv,
Github)
- by Chen Liu, Kihwan Kim, Jinwei Gu, Yasutaka Furukawa, Jan Kautz
- in IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019
- Dense Extreme Inception Network: Towards a Robust CNN Model for Edge Detection
(DexiNed) (arXiv, Github)
- by Xavier Soria, Edgar Riba, Angel D. Sappa
- in IEEE Winter Conference on Applications of Computer Vision (WACV), 2020
Thank you for providing the code!
If you use this code for scientific research, please consider citing
@inproceedings{naumannRefinedPlaneSegmentation2020,
title = {Refined Plane Segmentation for Cuboid-Shaped Objects by Leveraging Edge Detection},
author = {Naumann, Alexander and Dörr, Laura and Salscheider, Niels Ole and Furmans, Kai},
booktitle = {{{IEEE Conference}} on {{Machine Learning}} and Applications ({{ICMLA}})},
location = {{Miami, USA}},
date = {2020-12}
}
This code is distributed under the 3-Clause BSD License, see LICENSE.