Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(map_generation): use aruco markers on sketch map #511

Merged
merged 8 commits into from
Dec 19, 2024

Conversation

matthiasschaub
Copy link
Collaborator

@matthiasschaub matthiasschaub commented Oct 29, 2024

This PR consists of 4 parts:

  1. build(dep): fix opencv version to work w/ ultralytics and update ruff version
  2. test(approval): add image reporter and approver, add NDArray Reporter/Approver and add pytest namer factory
  3. refactor(map_generation): rename canv to canvas
  4. feat(map_generation): use aruco markers on sketch map

It might be useful to review this PR commit by commit.

For now aruco markers instead of globes on Sketch Maps are optional. This feature flag is enabled by giving a query parameter aruco=true to the /create endpoint (e.g. http://localhost:8081/en/create/aruco=true).

The advantage of Aruco markers might be:

  1. Every Aruco marker is unique (in contrast to the globes).
  2. Aruco markers can be used in clipping the map frame from uploaded sketch maps using as it is done currently using BRSIK or a marking detection algorithm provided by opencv2 in the future. Initial experiments using the latter algorithm were not promising. This PR continues to use BRSIK regardless of marker types.

This PR does adress in parts #488 and #502

Todo:

  • update production database table map_frames to include attribute aruco defaulting to FALSE
    -> Executed on the production database:
ALTER TABLE map_frame
ADD aruco BOOLEAN DEFAULT FALSE;

@matthiasschaub matthiasschaub force-pushed the aruco-markers branch 3 times, most recently from 9847136 to 21a48d1 Compare November 13, 2024 00:14
@matthiasschaub matthiasschaub force-pushed the aruco-markers branch 3 times, most recently from 5576836 to 3b0b3a6 Compare December 13, 2024 23:45
@matthiasschaub matthiasschaub changed the title Aruco markers feat(map_generation): use aruco markers on sketch map Dec 13, 2024
@matthiasschaub matthiasschaub force-pushed the aruco-markers branch 2 times, most recently from c4679e6 to 6b05c87 Compare December 14, 2024 02:37
Optionally use aruco markers instead of globes on Sketch Maps.
Every Aruco marker is unique (in contrast to the globes).

Aruco markers can be used in clipping the map frame from uploaded sketch
maps using as it is done currently using BRSIK or an marking detection
algorithm provided by opencv2 in the future.
Copy link
Contributor

@itisacloud itisacloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would maybe propose to use more complex Aruco markers in fututre in comparison to the 4x4 grid, as brisk relies on texture, and an 7x7 grid could be lead to a higher rate of succefull clippings. I will include this as a parameter in my future perfomance testing.

@matthiasschaub
Copy link
Collaborator Author

matthiasschaub commented Dec 19, 2024

@itisacloud interesting, because the algorithm for detecting aruco markers from opencv works best if the markers are less complex. But its of course not in use at the moment.

I am going to merge it, but feel free to change it if your testing found that it works better with complex markers. Or should this maybe be configurable?;

Thank you for taking the time to review the PR!

@matthiasschaub matthiasschaub merged commit 391a4ae into main Dec 19, 2024
1 check passed
@matthiasschaub matthiasschaub deleted the aruco-markers branch December 19, 2024 00:13
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.

2 participants