Composer

The Composer is an GUI application designed to create AI Application pipeline through an easy-to-use graphic interface, reducing the complexity of application development significantly and thus reducing time to market.

The Composer is based on the Omniverse SDK which provides a highly responsive hardware-accelerated GUI.

User Interface

The user interface contains the following windows:

User Interface

Description

Graph Editor Window

Used to edit/create graphs, multiple windows can be created.

Node Template Window

Used to create nodes from saved templates.

Component List Window

Displays list of available components from Registry.

Details Window

Shows the details on any selected object.

Console Window

Display the console output

Tool Bar

Tool buttons for miscellaneous features

Container Builder

Context Menu

Context menu is invoked while a user right-clicks on the canvas with a mouse, which provides the entries to commands related to the current graph.

Context Menu

Menu Items

Action

Rename the Graph

Rename the current graph

Export Parameters

Export the flagged parameters in the current graph to a file

Load Parameters

Load the value of parameters from a parameter file

Open All

Expand all the nodes in the graph with all the details

Minimize All

Minimize all the nodes in the graph by showing connected ports only

Close All

Close all the nodes in the graph by hiding all the ports

Layout All

Automatically layout all the nodes

Focus on All

Automatically zoom and pan the canvas to fit the entire graph

Focus on the Selection

Automatically zoom and pan the canvas to focus on the current selection

Toolbar

Toolbar

Toolbar on the top of the main window provides shortcuts of available functions of the current graph

Toolbar Items

Action

Expand Nodes

Expand all the nodes in the graph with all the details

Minimize Nodes

Minimize all the nodes in the graph by showing connected ports only

Close Nodes

Close all the nodes in the graph by hiding all the ports

Container Builder

Build container for x86 or aarch64

Run Graph

Run current graph on local or remote machine

Stop Graph

Stops the execution of the currently running graph

Component List

The component list window shows the information of all the available components in various extensions, which are fetched from the remote registry and could be used to build different graphs by the user. By default, the list is showed in a two-level hierarchical view grouped by extensions.

Component List grouped by extension. Filtering with the search bar.

You can choose a component from the Component List by a left click on the mouse to display the detailed information of that component in the Details window. The details include the component type, description, details of the extension which includes the component, and the details of the properties supported by the component. The Component List supports direct Drag and Drop, allowing users to create an instance of a specific component in a graph by simply dragging it from the list and dropping to the canvas or a destination node in the graph. If you drops it to the canvas, a default node will be created automatically to accommodate the instance and its input and output port will be initialized as much as possible.

Create New Application

  1. Navigate to the File menu from the main window menu bar and choose New Graph.

  2. An empty graph window is created and displayed in the graph editor workspace.

  3. You may create multiple graph editor windows to work on different graphs simultaneously.

Open and Save Application Graphs

Note

Be sure the component list is not empty before opening any graph, trying opening a graph file with an empty component list will generate a corrupted graph.

  1. To save the current graph, use the ‘File’ menu and choose Save the Graph (Ctrl + S) or Save the Graph as (Shift + Ctrl +S), if the graph has never been saved before or you want to save it to a different file.

  2. A file browser dialog pops up prompting you to pick a path in the file system.

Save a Graph to a specific location of the file system

Compose an Application Graph

Finding the right component

Components are grouped by extensions. Information of a specific component and the extension can be found in the details window if you click on the corresponding item showed in the Component List, including its type, the purpose, and supported properties. With the search bar on the top of the Component List window, you can also filter out the candidate components.

By choosing the versions from the Version list, the extension with a specific version will be loaded.

Information of a Component

From Composer perspective, a Component falls into one of the 3 categories below based on the role it plays in the graph:

Component Type

Description

Example

Primary Component

Compute Components which are executed by scheduler.

Decoder

Secondary Component

Used by primary components for data exchange, config, scheduling rules.

SinkPad

Connection Component

Responsible to connect input and output components

Connection

Subgraph Component

Used to load a subgraph

Subgraph

Before creating an AI Application graph, a user should always figure out what kind of primary components are needed. Only after all the primary components have been properly picked, a user could consider initializing them and then setting up connections.

The component within an entity has two parts:

  • The header - Displays the name of the component, which is its type by default. Double-click on the header to change its name.

  • One or more handles - They are displayed under the header part if the component can link to the other components. Number of supported handles, the type and names of those handles are all predefined by the component type.

Creating a Component Instance

Steps to create component instances:

Using Drag and Drop

  1. To add a new component instance to a graph, find the type of the component from Component window and drag and drop it to the graph editor window.

  2. If the component is dropped to the vacant area an entity will be added automatically to contain the component

  3. If the component is dropped to an existing entity it is going to be added to that entity.

Using New empty node

You can also choose to first create an empty node by right-clicking on the canvas and choosing New Empty Node, then drag and drop a component to the node. You must manually initialize all the handles of the instance if it is a primary component.

Using Context Menu

Select Create from the context menu of a handle of a primary component, which only works for creating or using secondary components. Since the compatible components have already been filtered for the specific handle, the list becomes much shorter and it is always recommended to create secondary components including Input and output components in this way.

Create a "source information loader" through context menu

Understanding the Component Handles

A component can have handles which allows it to interact with other components. Essentially a handle is a special property supported by the component, which is associated with a specific component type. To make a handle functional, you’ll need to initialize it first, based on its type.

There are some special handles called Input and Output handles who manage the data exchange of a component, and to enable data exchange of a component a user needs to initialize them with appropriate Input and Output components.

Component Handle

Linking and Unlinking components

There are two options for a user to initialize a Handle: one is through its context menu, which is mentioned above; the other one is using Link. The Link operation can be done by dragging and dropping a curve from the handle to its required component, which means the required component must be created at first. As a reverse operation, Unlink operation turns a handle back to uninitialized state, which can be invoked through the context menu of the handle.

Note

One handle can only be initialized with (or linked to) one component instance at the same time

Steps to link or unlink the components:

  1. To link two components, left-click with your cursor on an output port (the full circle) in one component and drag a curve to the input port (the half circle) of another component.

  2. Links can only be set up among compatible components, which means the type of the link source must be the same type or the base type of a link target.

  3. To see the port type, hover the mouse cursor on the port.

  4. To remove the link, hover the cursor on the curve and right click the mouse, then choose Unlink from the context menu.

Link the Components

Node

A node is the container of a set of components who work together to get certain tasks done. Usually there is one primary and several secondary components required by the primary one, including the input, output, and others. An empty node can be created through context menu triggered by a right click on the canvas, and an existing node can be deleted from File Menu, the Context Menu of the node or the corresponding hot key.

Nodes can be categories based on the roles and types of the components contained inside, different category of nodes will be showed in different style:

Node Category

Description

Example

compute

General Computing Components

NvDsAnalytics

cloud

Cloud Components

NvDsMsgBroker

input

Input Components

NvDsSingleSrcInput

neural networks

Inference Components with Neural Networks

NvDsInferVideo

output

Output Components

NvDsVideoRenderer

muxer

Muxing/Demuxing Components

NvDsStreamDemux

utility

Utilities

RealTimeClock

image processing

Image Processing Components

NvDsDewarper

Node Categories

Setting up a Connection from an Input to an Output

A connection represents the data flow from an input component to an output one, and it can be created when a user drags a curve from an output and drop it to a compatible input. It is important to understand that the input and the output of a connection must be compatible, that is to say, the type of data from the output to the input must be exchangeable. Connections can only be set up between two different nodes. Multiple connections are allowed on a single input or output. To remove connections on an Input or Output, users can use the “Disconnect” from the context menu by right clicking on the connection.

remove the connection from a video decoder to a video renderer using context menu

Changing the Component Properties

To select a component, left or right-click on a component or its handles in the graph editor. This displays the component information including its properties in the detail window accordingly, where you can make changes on any writable property. It displays the property name [1], the text field [2] to edit the property, the check box [3] to export a file property to a resource file and another check box [4] to export the property to a different yaml file.

Change component properties from the Details Window

Editor Features

  1. Zoom and Pan the Canvas

    The scroll wheel of the mouse enables zoom in and zoom out, and pressing the scroll wheel allows users to pan the canvas.

  2. Copy, Cut and Paste

Before doing a Copy or Cut, first select a instance from a graph editor, then trigger the operation through Edit menu or corresponding hot key. Copy and Cut is supported for both component instances and node instances in the graph editors. Either operation creates a copy of the instance. When the copy of a node is created, all the components inside the node will be created accordingly preserving their relationship. There is a global clipboard in the Composer where a copied instance (a component or a node) is kept temporarily. When a Paste command is triggered the instance in the clipboard will be added back to the graph. To paste a component instance, the user needs to choose the destination node first, otherwise the Paste fails.

  1. Undo and Redo

    Undo and Redo are supported for following commands:

    • New Node

    • New Component

    • Link a Handle

    • Unlink a Handle

    • Set up a Connection

    • Disconnect an Input/Output

    • Delete a Node

    • Delete a Component

    • Rename a Node

    • Rename a Component

  2. Debug View

    The composer provides an option for users to turn on the debug view on the graph, which represents the graph in the exact same topology its implementation architecture. In the debug view all the abstractions used for visualization simplification have been restored to their raw structures:

    • Connections be expanded to a standalone node with a connection component inside, whose handles be linked to an input component and an output component.

    • Connections cannot be set up from an Output to an Input directly, even after both of them have been linked to some Input and Output components

    Debug view is useful in inspecting your graph if you notice anything abnormal.

Subgraph

Introduction of the Subgraph concept increases the modularity and reusability of Component based programming significantly. Subgraph is nothing different from a regular graph except that it has exported interfaces which allow it to be re-used in other graphs, and a subgraph itself can also use other subgraphs.

When a subgraph is used in other graphs, it will be abstracted as a “Subgraph” type component inside a subgraph node, only the exported interfaces are showed in the same node with all the other details being concealed. Components in the parent graph can interact with the subgraph through those interfaces.

  1. Creating a Subgraph

    There is not too much difference between creating a regular graph and a subgraph. After creating a regular graph the user can export interfaces so that the graph can be used as a subgraph in other graphs. To export interfaces, the user need to add an interface node from the context menu by right clicking on the canvas. Then if the user right click an the newly created interface he or she can add interfaces from the context menu of that interface node. After adding interfaces the user can point them to the actual component which is to be exported by dragging a connection from the interface to the target component. To make the exported interfaces effective the graph file needs to be saved.

Change component properties from the Details Window
  1. Using a Subgraph

    In order to use a subgraph in the current graph, the user needs to Drag and Drop a “Subgraph” node from “Miscellaneous” group in the catalog to the canvas, then update the “location” property to load the subgraph from the filesystem.

load a subgraph
  1. Viewing a Subgraph

    A double-click on the subgraph component will trigger a switch of the current graph view to the subgraph view, where the internal details of the subgraph is displayed. A navigation bar will show up on the top of the graph window once a subgraph view is activated so that the user can switch the view between subgraphs and their parent graph.

Backdrop

Backdrop is a tool used to group the nodes in the current graph, which can be created through Drag&Drop from “Miscellaneous” group in the catalog. After a Backdrop rectangle is created, it can be moved and resized to include a number of nodes, so to group them together. Once a Backdrop is created, the nodes inside will be moved altogether while the Backdrop itself is moved.

User can rename a Backdrop by double-clicking on its name or change its color through the color picker.

Use the Backdrop to group nodes

Run Graph

Run Graph

A Graph can be run through Composer using the Play button on the toolbar. Output of the running graph can be seen on the console window. A running graph can be stopped using the Stop button on the toolbar.

Options

System Options

Options

Description

Range

Local Machine

Run Graph on Local Machine

Remote Machine

Run Graph on Remote Machine

Platform Config File

Select a platform config file. For x86_64, Default value is /opt/nvidia/graph-composer/target_x86_64.yaml. For ARM 64, Default value is /opt/nvidia/graph-composer /target_aarch64.yaml

Required

Runtime Options

Options

Description

Range

Environment Variables

Separated List of environment variables to be set before running the graph

Optional

Manifest File

Use an existing manifest file

Optional

Use Fresh Manifest

Re-install graph and generate a manifest file

Optional

Resources File

Use a existing resources file If not provided, tool will generate a temp resources file in /tmp/

Optional

Remove Install Directory

Remove graph install directory during exit

Optional

Subgraphs

Comma separated list of paths to subgraphs used by the graph. Paths can be absolute or relative to the main graph.

Optional

Remote Machine Options

Options

Description

Range

Target

Address of the remote machine uname@host

Required when Remote Machine is selected

Password

Password of the remote machine

Required when Remote Machine is selected

Note

To run graph on the remote machine, install the following packages:

  1. openssh-client

  2. sshfs

Also generate a ssh key pair using ssh-keygen.

Comparison of Different Work Flows

Work Flow

Description

Host Requirement

Target Requirement

Remote Requirement

DS Installation

Local Execution

both the Composer and graphs run on the host machine

Ubuntu 20.04 with Nvidia GPU

N/A

N/A

DS 6.1 required on the host

Remote Execution

the Composer runs on the host machine and graphs on the target machine

Ubuntu 20.04 with Nvidia GPU

Ubuntu 20.04 on Jetson Xavier/Orin

N/A

DS 6.1 require on the target

Remote Access

the Composer runs on the host machine and user access the UI from a remote machine

Ubuntu 20.04 with Nvidia GPU

Ubuntu 20.04 on Jetson Xavier/Orin

Linux/Windows with Browser Support

DS 6.1 required on host or target

Build Container Image

Container Builder

A container image can be build through the Composer using the Docker button on the toolbar.

Options

Runtime Options

Options

Description

Range

Configuration File

Select a Container Builder configuration file

Required

Platform Config File

Select a platform config file

Required

Buttons

Options

Description

Create

Create a new Container Builder Config File using a template

Edit

Edit an existing Container Builder Config File

Build

Build the Container

Generate Gstreamer Extension

Generate Gstreamer Extension

Note

If the Deepstream SDK package is not installed, Generate Extension button will be disabled.

Options

Options

Description

Range

GStreamer Elements List

Comma Separated Elements List

Required

Target Output Directory

Directory where the extension will be generated

Required

Buttons

Description

Install Dependencies

Install extension development dependencies

Generate

Generates the extension

Build

Builds the extension using Bazel

Remote Access

Composer supports remote access through two streaming options. 1) WebSocket 2) WebRTC

Comparison of available options

Technology

Devices

Benefits

WebSocket

Web browsers (all devices)

Simple to distribute, and to customize for custom experiences.

Supports software encoding if hardware encoders are not present on the host.

WebRTC

Web browsers (all devices)

Simple to distribute.

Strong support across devices and platforms.

Lower latency then the WebSocket alternative.

WebSocket streaming

By leveraging the new WebSocket live-streaming, it is now possible to stream Graph Composer to web browsers.

WebSocket Streaming

Using the WebSocket live-stream is a straightforward process:

  1. In a command prompt or terminal, run the command: composer --enable-streaming websocket

  2. Find the IP address of the machine hosting the Graph Composer application on your local network

  3. Navigate to the stream page in your favorite web browser: http://<server IP address>:8211/streaming/client

  4. Click the “play” button to start streaming your application

To enable software encoding on the hardware where hardware encoding is not available, use the following command:

composer --enable-streaming websocket --enable-software-encoding

Note

Sometimes the above URL is not accessible because the port 8211 might have been occupied, in the case we need to replace 8211 with the right HTTP port number displayed in the console.

Note

Browser should be updated to the latest version.

Note

For a best user experience, it is recommended that only a single User at a time be provided with mouse or keyboard control while others remain in spectator mode.

WebRTC streaming

By leveraging the new WebRTC live-streaming, it is now possible to stream Graph Composer to web browsers.

WebRTC Streaming

Using the WebRTC live-stream is a straightforward process:

  1. In a command prompt or terminal, run the command: composer --enable-streaming webrtc

  2. Find the IP address of the machine hosting the Graph Composer application on your local network

  3. Navigate to the stream page in your favorite web browser: http://<server IP address>:8011/streaming/webrtc-client?server=<server IP address

  4. Click the “play” button to start streaming your application

Note

Sometimes the above URL is not accessible because the port 8011 might have been occupied, in the case we need to replace 8011 with the right HTTP port number displayed in the console.

Note

For a best user experience, it is recommended that only a single User at a time be provided with mouse or keyboard control while others remain in spectator mode.

Note

WebRTC Streaming is supported only on RTX GPUs.

Restrictions

  1. Currently the Composer is well supported only on NVIDIA GPU setup.

Trouble Shooting

Instructions for resolving issues when running the Graph Composer.

Component Type not found

In some cases users will see such messages as “Component type invalid” while opening a graph, which means some component types are not available in the current component list thus the loaded graph become incomplete. There are 2 major reasons for the issue: 1. The component list is empty or standalone 2. The graph is not compatible with the latest component list It is recommended for users to close the graph without saving it and perform “repo sync” through the registry menu and try again with the updated list. If the issue still occurs, users should review the graph to figure out which component is missing and replace it with the proper one from the latest component list.

Failure During the Repo Sync

Sometimes the “repo sync” process takes too long or gets stuck in the middle due to network issues and users can’t close the “repo sync” progress bar, in this case it is recommended to close the Graph Composer app and restart it again.