robokudo.descriptors.analysis_engines.parallel¶
Analysis engine demonstrating parallel processing capabilities.
This module provides an analysis engine that demonstrates how to implement parallel processing within a pipeline. It shows how to configure and execute multiple annotators concurrently using a parallel execution policy.
The pipeline implements the following functionality:
Kinect camera data input
Pipeline trigger for controlled execution
Parallel execution of slow annotators
Synchronized completion policy
Note
This is a demonstration pipeline that uses simulated slow annotators to illustrate parallel processing behavior. The annotators have different sleep durations to show asynchronous execution.
Classes¶
Analysis engine demonstrating parallel processing capabilities. |
Module Contents¶
- class robokudo.descriptors.analysis_engines.parallel.AnalysisEngine¶
-
Bases:
robokudo.analysis_engine.AnalysisEngineInterfaceAnalysis engine demonstrating parallel processing capabilities.
This class implements a pipeline that demonstrates parallel execution of annotators. It uses the BetterParallel component with a synchronized completion policy to ensure all parallel tasks complete before proceeding.
The pipeline includes:
Pipeline trigger for controlled execution
Camera data collection and preprocessing
Fast annotator (1s processing time)
Parallel slow annotators (2s and 4s processing times)
Final slow annotator (2s processing time)
Note
The pipeline uses simulated processing times to demonstrate the benefits of parallel execution compared to sequential processing.
- name()¶
-
Get the name of the analysis engine.
- Returns:
-
The name identifier of this analysis engine
- Return type:
-
str
- implementation()¶
-
Create a pipeline with parallel processing capabilities.
This method constructs a processing pipeline that demonstrates parallel execution of annotators. It configures two slow annotators to run in parallel, with different processing times to show asynchronous execution.
Pipeline execution sequence:
Pipeline trigger (wait for user)
Clear outputs
Read camera data
Preprocess image
Fast annotator (1s)
Parallel annotators (2s and 4s)
Final slow annotator (2s)
- Returns:
-
The configured pipeline with parallel processing
- Return type: