Skip to content

WIP: flowchart (aka NodeGraph) visualization#9

Open
drzraf wants to merge 1 commit intoArthurDelannoyazerty:mainfrom
drzraf:nodegraph
Open

WIP: flowchart (aka NodeGraph) visualization#9
drzraf wants to merge 1 commit intoArthurDelannoyazerty:mainfrom
drzraf:nodegraph

Conversation

@drzraf
Copy link
Copy Markdown

@drzraf drzraf commented Nov 12, 2023

Building a flowchart to visualize (and hopefully control) command's graph to open the doors of more complex multiple IN/OUT workflow is a must-have (using NodeGraphQt)

Screenshot from 2023-11-12 00-21-46

It's a major feature of ala ImagePlay :
IPL

This allows to apply transformations expecting multiple inputs (eg: a custom kernel + image or multiple input images), transformation providing multiple outputs (eg: different channels or region of interest + transformed image) and enjoin branching (trying multiplee paths variation/combination)

A solid flowchart UX + and a nice CV2 command-description using best introspective Python features would pave the way to a really nice OpenCV UI and make a small code-base easier to build upon than [rather unmaintained these days] ImagePlay)
I wish the 7k LoC of core CV2 <-> UI mapping (including multiple in/out handling) could be reimplemented in a mostly declarative commands.txt using advanced Python libraries/language constructs (#10 ?)

Regarding this PR, it aimed to be a minimally intrusive PoC provided on it's own distinct branch... but NodeGraph dependency actually uses qtpy instead of PySide6 (see pr #7 and #8)

I believe the flowchart could be the main UI instead of just "listening" to the button (as currently done in this PoC) and each element could show a live preview of the image.

Happy to further discuss it.

Copy link
Copy Markdown
Owner

@ArthurDelannoyazerty ArthurDelannoyazerty left a comment

Choose a reason for hiding this comment

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

TODO :
Add qtpy in environment.py

I cannot test because of error : "ImportError: No Qt binding were found."

@ArthurDelannoyazerty
Copy link
Copy Markdown
Owner

I am gratefull for you to work on this projet, but I must warn you that I didn't created the program for multiple input/output because it was meant to be simple at start. So changing this could be a huge amount of work.

I didn't know about ImagePlay and NodeGraphQt before you mentionned it, but for multiple input/output it seems a good thing to have instead of a static list or matrix of image a the top of the window (and also it looks better !)

For now I cannot merge this branch in the main because I cannot execute it when I re create the environment from en yml file.

Happy to see someone interested in this project !

…trol it and allow for more

 complex IN/OUT workflow ala ImagePlay
@drzraf
Copy link
Copy Markdown
Author

drzraf commented Nov 13, 2023

I force-pushed to fix the dependency. qtpy is a wrapper and doesn't install a specific backend at first. Maybe the PySide6 could still be "suggested" as part of the requirements?

Anyway, the PR is just a preliminary PoC aimed at discussing this possible development of such a structural change. Nothing to be merged as-is.
Would you describe a bit more the part of the layout you're ready to impact and these you're rather not touch for now and/or possible implementation preferences?

@ArthurDelannoyazerty
Copy link
Copy Markdown
Owner

Ok for pyqt then. For the environment it could be good to add Pyside6 so that environment can works out of the box. For me this still doesn't work (ImportError: No Qt binding were found.), Does your code works if you just install the conda environment.yml ? If not it should be corrected for everyone to use it easily.

For the changes, there is no real resctriction since it's open source. But if you manage to change the opencv command from SISO to MIMO (for images), then the main thing to change would be the UI : the top pipeline can be changed to your node interface. And then the button panel can also be erased because the arrow from the node interface is the 'button'. But for now I think that the UI is not the main focus but the change from SISO to MIMO.

Also until a branch work, I will not merge it with the main because the main should always be working.

For now I don't think that the command file must be modified because it's working ok, but if SISO->MIMO need this file to change then feel free to modify everything you want !

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