Batch Processing
This function block collects multiple input values into a single batch container to reduce memory usage during processing. Use it when you want to group items (images, data, or generic values) into a single stream that other blocks can consume as a batch.
π₯ Inputs
Input 1
First value to be included in the batch. Can be image data, numbers, text, lists, or other generic values.
Input 2
Second value to be included in the batch. Additional inputs can be connected depending on your workflow.
π€ Outputs
Batch
A single batched list that contains the connected input values grouped for batch processing.
πΉοΈ Controls
This function block has no interactive controls. It works by grouping whatever is connected to its input sockets.
π― Features
Groups multiple inputs into a single, memory-friendly batch object for downstream processing.
Accepts generic data types so it can batch images, numbers, text or lists.
Useful for lowering memory footprint when handling many items in a pipeline.
π How to use
Connect the items you want to group into
Input 1andInput 2(or more inputs if available).The block will output a single
Batchthat contains those inputs as a list.Feed the
Batchoutput into blocks that accept batch-style input or into blocks that can iterate over the batch.
βοΈ Running behavior
When the scenario runs, the function block collects values present at its input sockets and emits them bundled as a single Batch. If an input is missing or invalid, the batch will include a placeholder for that entry so downstream blocks can handle it consistently.
π‘ Tips and Tricks
Create grouped image sets from multiple sources by combining image inputs like
Load Image,Camera USB,Camera IP (ONVIF), orVideointo a singleBatchfor processing.Use
Batch Processingbefore heavy AI blocks such asObject Detection,Mask Detection,Super Resolution, orOCRto reduce peak memory usage when running many images.After processing a batch, use
Debatchto split the results back into individual items for drawing or saving.Merge multiple batches with
Batch Concatenationwhen you need to combine batches created in different parts of a workflow.Use
Get Batch SizeandGet Elementto inspect or access items inside theBatchfor conditional logic or selective processing.When saving results, connect the per-item outputs (after
Debatch) toImage Logger,Image Write, orRecord Videoto store processed images efficiently.
π οΈ Troubleshooting
No data in
Batch: Verify the upstream blocks are producing values on the inputs. If an input is intentionally empty, that empty slot will appear in the batch.Unexpected item order: The batch preserves the order of inputs as connected. Reorder connections if a different sequence is required.
Downstream blocks not accepting the batch: Some blocks expect single items rather than batches. Use
Debatchto convert a batch back to individual items before feeding those blocks.
Last updated
Was this helpful?