Skip to content

HED: Add Holistically-nested Edge Detection module - #4163

Open
sasankgit wants to merge 6 commits into
opencv:4.xfrom
sasankgit:feature/hed-edge-detector
Open

HED: Add Holistically-nested Edge Detection module#4163
sasankgit wants to merge 6 commits into
opencv:4.xfrom
sasankgit:feature/hed-edge-detector

Conversation

@sasankgit

Copy link
Copy Markdown

Description

This PR introduces the Holistically-nested Edge Detection (HED) algorithm as a new module (opencv_hed) in opencv_contrib.

HED (Xie & Tu, 2015) is a deep-learning-based edge detection system that utilizes a pretrained VGG network to perform holistically-nested image-to-image edge learning. It learns rich hierarchical features to detect semantically meaningful boundaries rather than raw pixel contrast changes.

Key Features:

  • Implements the cv::hed::HEDDetector class which loads the Caffe-based model (hed_pretrained_bsds.caffemodel and deploy.prototxt) and performs the forward pass.
  • Returns a 32-bit single-channel floating-point edge map with values normalized in the [0, 1] range.
  • Python wrappers are enabled via the module build configuration.
  • Unit tests are added to verify the interface and output shape. Note that tests use cvtest::findDataFile to locate the model files (deploy.prototxt and hed_pretrained_bsds.caffemodel), which are submitted in a separate PR to the main opencv repository under data/.

References:

  • Paper: Xie, S., & Tu, Z. (2015). Holistically-nested edge detection. In Proceedings of the IEEE international conference on computer vision (pp. 1395-1403). arXiv:1504.06375.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
  • The feature is well documented and sample code can be built with the project CMake

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant