MCPcopy Index your code
hub / github.com/a-nau/Plane-Segmentation-Refinement

github.com/a-nau/Plane-Segmentation-Refinement @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
101 symbols 420 edges 32 files 5 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CI

Refined Plane Segmentation for Cuboid-Shaped Objects by Leveraging Edge Detection

arxiv conference

The purpose of this research code is to leverage edge detection information to refine plane segmentation results as exemplarily shown here:

<img src="https://github.com/a-nau/Plane-Segmentation-Refinement/raw/main/overview.jpg" height="250"/>



© 2020, IEEE.

This can for example be used to segment parcels without any need for task specific training data. See the paper (citation) for more details.

Installation

Use Python3 and pip to install the requirements

pip install -r requirements.txt

Usage

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.

Folder structure

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

Acknowledgements

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!

Citation

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}
}

License

This code is distributed under the 3-Clause BSD License, see LICENSE.

Core symbols most depended-on inside this repo

get_grayscaled_image
called by 16
utils/image_modification.py
get_colored_image
called by 14
utils/image_modification.py
get_config
called by 11
config.py
draw_masks_on_image
called by 7
refiner/image_processing/draw.py
compute_line_intersection
called by 6
refiner/hough_transform/hough_transformation.py
det
called by 5
refiner/hough_transform/hough_transformation.py
draw_corners_on_image
called by 5
refiner/image_processing/draw.py
scale_image
called by 4
utils/image_modification.py

Shape

Function 83
Method 14
Class 4

Languages

Python100%

Modules by API surface

refiner/hough_transform/hough_transformation.py14 symbols
refiner/models/image_data.py9 symbols
refiner/image_processing/draw.py9 symbols
refiner/refinement_handler.py7 symbols
refiner/clustering/line_detection.py7 symbols
config.py7 symbols
utils/image_modification.py5 symbols
refiner/combined/combined_appraoch.py5 symbols
refiner/util/fall_back_segmentation.py4 symbols
refiner/image_processing/evaluation_metrics.py4 symbols
utils/other.py3 symbols
utils/image_other.py3 symbols

For agents

$ claude mcp add Plane-Segmentation-Refinement \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact