Skip to main content
Skip table of contents

Graph Best Practices

The platform exposes a rich interface to manipulate graphs for generating a wide variety of datasets. While generated images and videos have virtually infinite randomness, the graph parameters provide for the control one needs when addressing specific computer vision training and validation issues. These guidelines for graph editing help users get the most from channels.

Graph Basics

A basic graph performs three functions - object creation, scene composition, and scene rendering. Most channels are built with a set of objects of interest so the graph will have one or more nodes that create those objects. Objects of interest are important because they are used for generating object annotations. Another node creates the scene and places objects of interest in it. Finally, a simulator node renders the output of the scene into a synthetic image.

The following is a basic graph that performs these three operations.

Basic Graph

In the above graph, the Yo-yo node creates a yo-yo generator that is passed to the RandomPlacement node. The RandomPlacement node creates a scene and makes a cloud of yo-yos because it calls the Yo-yo generator 25 times and places the objects randomly in the scene. The RenderNode then renders the scene.

While some channels use placement to deliberately place objects on backgrounds, the example channel simulates dropping the toy objects over a container and a floor. Following is a graph that does this.

Adding Container and Floor to Scene

Generators: Objects and Modifiers

Though not required, channels developed by use generators for objects. An object generator is a factory that provides new instances of the objects as many times as the code requests one. The Ana generator class has a weight that can be used in a placement node. By using object generators instead of manually adding objects, a scene can be built procedurally based on the structure of the graph.

Object modifiers are generators with children and make changes to the children generators. For example, the ColorVariation modifier adds a call to the color method to it’s children.

ColorVariation Modifier

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.