-
Notifications
You must be signed in to change notification settings - Fork 51
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
Log the sizes of each connected component in viewgraph #668
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just add this to a metric output file or something? The printout could be quite long depending on the dataset.
This information is also available more or less in the view graph image we already output.
yeah I agree with @travisdriver. it would be as simple as adding one scalar metric for each connected component.. |
Acknowledged. I've found this information helpful and unobtrusive, e.g.
Our main logging issue currently is that we log 47,000 lines of "CheiralityException: Landmark p5193 behind Camera x62" for palace-of-fine-arts. |
I feel as though this information isn't very useful. What would be more useful is putting this in some sort of file that actually lists the image numbers associated with each cluster. |
largest_cc_nodes = max(nx.connected_components(input_graph), key=len) | ||
subgraph = input_graph.subgraph(largest_cc_nodes).copy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you change this API to return the subgraph for every component? its potentially useful if we decide to optimize multiple connected components. And will also help you save those metrics..
…nnected-component-sizes
…nnected-component-sizes
…nnected-component-sizes
…nnected-component-sizes
cc_sizes = [len(x) for x in sorted(list(nx.connected_components(input_graph)))] | ||
logger.info("Connected component sizes: %s nodes.", str(cc_sizes)) | ||
|
||
# Get the largest connected component. | ||
largest_cc_nodes = max(nx.connected_components(input_graph), key=len) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you actually calling nx.connected_components twice here? :0
No description provided.