Skip to content

Add custom SuperPoint EdgeDrawing extractor - #1

Merged
lukapercic merged 1 commit into
vibefrom
codex/add-custom_superpoint.py-extractor
Dec 30, 2025
Merged

lukapercic merged 1 commit into
vibefrom
codex/add-custom_superpoint.py-extractor

Conversation

@lukapercic

Copy link
Copy Markdown

Motivation

  • Provide a custom extractor that intercepts SuperPoint detection to supply EdgeDrawing endpoints as keypoints for description.
  • Allow using pure SuperPoint, pure EdgeDrawing, or a combined mode so descriptors can be sampled at ED endpoints or merged with standard detections.
  • Enable describing specific pixels (line endpoints) using SuperPoint's dense descriptor maps to support edge-aware features.

Description

  • Add custom_superpoint.py implementing SuperPointWithED, a subclass of SuperPoint that accepts config and ed_config.
  • Implement run_edgedrawing which runs OpenCV EdgeDrawing (cv2.ximgproc) on a grayscale image and returns unique line endpoints as (N, 2) points.
  • Override forward to obtain pred = self.net(image), extract standard SuperPoint keypoints (with NMS and top-k filtering), obtain ED keypoints, merge them according to ed_conf['mode'] (superpoint, edgedrawing, combined), and sample descriptors and scores with sample_descriptors.
  • Handle RGB->grayscale conversion, batch-size-1 simplification for ED, and safe fallbacks for empty keypoint sets.

Testing

  • No automated tests were executed for this change.
  • The new file custom_superpoint.py was added and committed without running test suites.
  • Manual import/run was not performed in automated CI in this rollout.
  • Further unit or integration tests should be added to validate descriptor sampling and ED integration across batches.

Codex Task

@lukapercic

Copy link
Copy Markdown
Author

still testing

@lukapercic
lukapercic merged commit 2dba0ce into vibe Dec 30, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant