DepthAI Pipeline Graph

How It Works
DEPTHAI_LEVEL=debug before running your code, the JSON configuration will be printed to the console:Command Line
1[2022-06-01 16:47:33.721] [debug] Schema dump: {"connections":[{"node1Id":8,"node1Output":"passthroughDepth","node1OutputGroup":"","node2Id":10,"node2Input":"in","node2InputGroup":""},...]pipeline_graph tool performs the following steps:- Sets
DEPTHAI_LEVEL=debug - Executes your code
- Captures the schema dump from the output
- Parses the schema to create a visual graph using a modified version of NodeGraphQt
Installation
Command Line
1pip install git+https://github.com/luxonis/depthai_pipeline_graph.gitCommand Line
1pip install PySide2Running the Tool
Command Line
1pipeline_graph -hrun, from_file, and load.Available Actions
- Run: Execute your DepthAI script and generate the pipeline graph in real-time.
Command Line
1pipeline_graph run "python your_script.py"-dnk option to allow your script to continue running after the schema has been captured:Command Line
1pipeline_graph run "python your_script.py" -dnk- From File: Generate a pipeline graph from a log file or JSON schema:
Command Line
1pipeline_graph from_file path/to/your/log_or_json_file- Load: Load and edit a previously saved pipeline graph:
Command Line
1pipeline_graph load path/to/your/saved_graph.jsonCustomization Options
Node Naming
ColorCamera (0)), with an index indicating the order of creation. If there are many nodes of the same type, use the -var or --use_variable_names option to replace the index with the variable name from your code for better clarity.Command Line
1pipeline_graph run "python your_script.py" -var
The tool must know the variable name of the pipeline. "pipeline" is the default. Use the -p or --pipeline_name argument to specify another name.Command Line
1pipeline_graph run "python your_script.py" -var -p custom_pipeline_nameInteracting with the Graph
- Rearrange Nodes: Simply drag and drop the nodes to adjust their layout if the default positioning doesn't suit your needs.
- Rename Nodes: Double-click a node's name to edit it directly.
- Change Node Appearance: Double-click on the node itself (outside the name area) to open a window where you can modify its color and name.
- Context Menu Options: Right-click anywhere on the graph to bring up a menu. From here, you can save the graph as a JSON file, load a previously saved graph, or access other options.