Skip to main content
Version: 0.8.x [Latest Beta]

Core concepts

The main building blocks

Pipeline

A Pipeline is the graph that executes your complete inference workflow. You either:

  • load it from a .denkflow file, or
  • build it manually from .denkmodel files and utility nodes

A pipeline can be modified only before initialization.

# Load from export
pipeline = Pipeline.from_denkflow("model.denkflow", pat="YOUR-PAT")

# Or build manually
pipeline = Pipeline()
pipeline.add_image_resize_node(...)

Node

A Node is one processing step inside the pipeline, such as:

  • image resize
  • object detection
  • classification
  • OCR
  • segmentation
  • anomaly detection

Topic

A Topic is the connection name used to move tensors between producers and consumers. The common naming convention is:

node_name/output_name

Tensor

A Tensor is a payload flowing through the graph. Common tensor types include:

  • ImageTensor
  • BoundingBoxTensor
  • ScalarTensor
  • OcrTensor
  • SegmentationMaskTensor
  • InstanceSegmentationMaskTensor

Receiver

A Receiver subscribes to a topic and lets you wait for output data. This is how you collect inference results after calling run().

receiver = pipeline.subscribe("filter/output")
# Then use the typed receive method that matches the topic's tensor type:
# receiver.receive_bounding_box_tensor()

Typical evaluation workflow

Most inference scripts follow this shape:

  1. Create or load a pipeline
  2. Initialize the pipeline
  3. Subscribe to one or more output topics
  4. Publish input tensors
  5. Call run()
  6. Receive and decode the result
pipeline = Pipeline.from_denkflow("model.denkflow", pat="PAT")
pipeline.initialize()
receiver = pipeline.subscribe("output/topic")

pipeline.publish_image_tensor("camera/image", ImageTensor.from_file("image.jpg"))
pipeline.run()

objects = receiver.receive_bounding_box_tensor().to_objects(0.5)

.denkflow versus .denkmodel

.denkflow

Use .denkflow when:

  • you want the simplest deployment path
  • you want export-target-specific runtime configuration
  • you want quantized deployment artifacts

.denkmodel

Use .denkmodel when:

  • you want to assemble the graph yourself
  • you want to choose or force runtime strings like cuda, tensorrt, directml, or openvino from Python or C/C++
  • you want to combine multiple models in one hand-built pipeline

Execution providers and device IDs

Each inference node runs on an execution provider (cpu, cuda, tensorrt, directml, or openvino). Custom pipelines select it via execution_provider= (Python) or the C-API equivalent; exported .denkflow files carry the runtime intent chosen at export time and can be redirected per node before initialization.

For the full provider list, device-id semantics (e.g. OpenVINO -1/-2/>=0), and override rules, see Runtime and Device Selection.

  1. Export a .denkflow file from the Vision AI Hub
  2. Install the SDK for the target runtime and language
  3. Keep the SDK data directory persistent (default paths are in Configuration; in Docker, mount a host volume at that default path or at the path DENKFLOW_DATA_DIRECTORY points to)
  4. Deploy and benchmark on the actual target hardware