Batch Concatenation

This function block merges multiple batch/list inputs into a single combined batch. Use it when you want to join several lists of items (for example images, detections, or generic data lists) into one list for downstream processing.

πŸ“₯ Inputs

  • Batch One or more batch/list inputs. Each input can contain a list of items (images, detections, generic values). Inputs are accepted as batch sockets.

  • Batch A second batch/list input (the block accepts multiple batch inputs when added).

πŸ“€ Outputs

  • Batch A single batch/list output that contains the concatenation of all provided input lists, preserving item order.

πŸ•ΉοΈ Controls

This function block has no user-facing controls. It operates automatically using the provided inputs.

βš™οΈ Running mechanism

When the scenario runs, the block collects the lists provided on its batch inputs, merges them by appending items from each input in order, and outputs one combined batch. Empty inputs result in an unchanged merged list (items from other inputs are preserved).

🎯 Features

  • Simple list merging: concatenates multiple lists into a single list.

  • Preserves original order of items from each input.

  • Accepts generic batch/list items (images, numbers, dictionaries, etc.).

πŸ“ How to use

  1. Feed one or more batch/list outputs into the block's batch inputs.

  2. Connect the block's single batch output to downstream blocks that expect a list or batch.

  3. Use this when you need to combine parallel branches (for example, outputs from separate cameras or parallel detectors) back into a single processing stream.

πŸ’‘ Tips and Tricks

  • Combine with Debatch when you need to split a merged batch back into individual elements for per-item processing.

  • Use Get Batch Size to inspect how many items are in the merged batch.

  • Use Get Element to extract specific items from the merged batch by index.

  • If you need to process large lists memory-efficiently, pair with Batch Processing to handle items in smaller chunks.

  • To filter out missing or invalid entries before merging, use Exclude Nones or Replace None on incoming lists.

  • Common downstream consumers of merged image batches include Collage Images, Image Concatenate, Image Logger, or any detector/analysis block that accepts image lists.

πŸ› οΈ Troubleshooting

  • If the merged batch appears empty: verify each input batch contains items and that inputs are actually connected.

  • If order matters, ensure inputs are provided in the desired sequence since the block preserves input order when concatenating.

  • If some items are unexpected (e.g., None), use filtering blocks like Exclude Nones before merging.

Last updated

Was this helpful?