-
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
Generate process graph #540
Conversation
6ec3673
to
bdbd62a
Compare
bdbd62a
to
d98b4fb
Compare
2ef6d2b
to
8517a87
Compare
Its a great start, but I have some high-level questions/comments first:
|
@akshay-krishnan I edited the PR description to include a high-level description. Sorry, I intended to before requesting reviews but it must've slipped my mind. To respond to your questions:
Also, only defining the names of GrayNodes as strings inside BlueNodes reduces the overhead for developers--rather than defining N GrayNode classes and referencing them inside the BlueNode class, one only has to define 1 BlueNode with a list of strings (implied GrayNodes) that connect to it. Since these GrayNodes would just be holding a string
I considered making the UI metadata class vars, but then there is no way to enforce that they are set via abstractmethod decorator. But that's another option. I couldn't think of an option that combines the best of both. What do you think? |
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.
Nice ! what's left, or is this ready to merge?
@dellaert not ready yet, but GH doesn't allow me to un-request reviews. I'm in the process of adding more to the graph |
…ess to many classes
45c7e4b
to
ae8d72d
Compare
It will need more work on Kevin's end to update the graph, once he merges from master :/ |
@kfu02 need to merge in master and resolve conflicts as well. |
I'm not sure how to visualize the two separate potential pathways, but I've created an issue for it (#550 ). |
@dellaert I fixed the issue where output products are not in the same plate as their parent process (see PR desc above), it's ready for re-review now |
Super-cool. Quick review based on SVG for now:
|
for output_product_name in output_products: | ||
self._main_graph.add_edge(pydot.Edge(display_name, output_product_name, color=ARROW_COLOR)) | ||
|
||
# add input_product -> process edges | ||
for input_product_name in input_products: | ||
self._main_graph.add_edge(pydot.Edge(input_product_name, display_name, color=ARROW_COLOR)) |
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.
Do we detect cases where we have a typo and the input products of one Process does not match the output product of other process?
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.
No, though that will be obvious in the graph. In the future, people will likely only be adding a few nodes at a time, so I don't think typos will be a large issue.
Triangulated Points are from a class method in the TwoViewEstimator plate, which is why the node doesn't have a parent. I will pair program with Hayk to address the first and third comments so he can get a feel for the code as well. |
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.
Looks great, except for CI failure. After you fix that, let me know and we can merge. Might need to enlist help from someone (not me :-))
CI error is on the lettuce dataset which seems to be failing on master too. A problem reading those colmap ground truth files since we added the distortion check. |
does this mean I can merge to master now since the failure is not because of my changes? |
Yes, it looks good to me. Not sure about other reviewers. |
I will merge it :-) |
Thanks @kfu02 and @stepanyanhayk !!! |
Looks good, thanks all. @kfu02 looks like thirdparty/d2net/weights/d2_tf.pth got checked in by accident (30 MB). That file should be downloaded by the weight download script. Could you remove it in a follow up PR, and purge it from the git history? Thanks! |
@johnwlambert I created a PR for that: #557 |
@akshay-krishnan it might be good to also add this weights file to the .gitignore in your PR if it is never supposed to be checked in |
@kfu02 thats true, but I am not sure if we want a very specific third-party path in our gitignore file - lets discuss on that PR. Im happy to add it if John wants it. |
Generating a process graph like those found in GTSFM Figures, but directly from the code. This PR outputs the graph to a .svg file which is then loaded in as a static image to the web interface. A future PR will make the SVG more interactive, potentially with d3.js.
Design
get_ui_metadata()
, which defines the display name, parent plate, and GTSFMProduct names that connect (all as strings) in a dataclass named UiMetadata.rtf_vis_tool/
.I chose to define the graph via the Processes because those are the graph components that are guaranteed to have a uniquely associated file in the codebase. The Products are hardcoded strings because it would be difficult to have the types of Products automatically inferred from code. A future PR could perhaps make the graph instead be parent-plate driven, where each file that defines a parent plate has a list of the Processes it holds.
The current usage is explained at the top of gtsfm_process.py: