Skip to content

Extend SceneClustering to support non-hierarchical (flat) clusters#1140

Merged
ahojnnes merged 3 commits into
colmap:devfrom
anmatako:public/cluster
Mar 3, 2021
Merged

Extend SceneClustering to support non-hierarchical (flat) clusters#1140
ahojnnes merged 3 commits into
colmap:devfrom
anmatako:public/cluster

Conversation

@anmatako

Copy link
Copy Markdown
Contributor

No description provided.

@ahojnnes

Copy link
Copy Markdown
Contributor

Would be great to add some unit tests to scene_clustering_test.cc to make sure this new functionality works as expected.

@anmatako

anmatako commented Mar 1, 2021

Copy link
Copy Markdown
Contributor Author

Would be great to add some unit tests to scene_clustering_test.cc to make sure this new functionality works as expected.

Unit tests added for flat clustering with and without overlaps.

@anmatako

anmatako commented Mar 1, 2021

Copy link
Copy Markdown
Contributor Author

Tests will have to be revised. It appears that the graph cut is not fully deterministic in the order it assigns labels to clusters; the cluster sizes and the IDs in each cluster are as expected but the order may differ, e.g. cluster 0 on Windows may be cluster 1 in Ubuntu. Not sure why this is not being an issue with the unit tests for hierarchical clustering. New tests pass on Windows and Mac but fail in Ubuntu.

@anmatako

anmatako commented Mar 2, 2021

Copy link
Copy Markdown
Contributor Author

Made the new flat clustering deterministic sorting by descending cluster size and using min image ID as tie breaker. Now the test should be consistent on all environments.

@ahojnnes ahojnnes merged commit 4579959 into colmap:dev Mar 3, 2021
@anmatako anmatako deleted the public/cluster branch March 3, 2021 17:57
lucasthahn pushed a commit to tne-ai/colmap that referenced this pull request Aug 17, 2022
…olmap#1140)

* Extend SceneClustering to also support non-hierarchical (flat) clustering

* Add SceneClustering tests for flat clusters

* Make flat clustering deterministic by sorting based on cluster size

Co-authored-by: Antonios Matakos <anmatako@dss.microsoft.us>
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