Multimedia Processing Canonical Workflow
Introduction
The Multimedia Processing Canonical Workflow will further process image subjobs generated by previous Aspire jobs, and as such, all of its stages are contained in the “onSubJob” event.
If an “image” subjob is received, it will be analyzed with the NVIDIA Model NIM to try to find either tables or charts inside said image. If no charts or tables are detected, it will generate a description of the image using the NVIDIA Gemma 3 Model NIM. If charts or tables are found within the image, it will generate a new subjob with the new “sub image” for further processing with either Gemma 3 and Paddle OCR for tables or Gemma 3 and Buffalo for charts.
If a table sub image is found, the image is processed with NVIDIA Gemma 3 Model NIM to extract its description, and it is also processed with NVIDIA Paddle OCR Model NIM and a tabular representation of said table image will be added to the document.
If a chart sub image is found, the image is processed with NVIDIA Gemma 3 Model NIM to extract its description; it is also processed with NVIDIA Cached Model NIM to detect chart elements, and lastly, it is processed again with NVIDIA Gemma 3 Model NIM to extract the chart.
For the instructions below, please request and reference the following file:
“workflow_multimedia processing canonical workflow_export.aspire”
Workflow configuration
Each Canonical Workflow has a configuration script where initialization variables can be set or changed according to the needs of the client. This script is always at the very beginning of the workflow stages.
Additionally, GenAI stages in the workflow need to be configured with the corresponding API key for their account in their corresponding “Initialization” section.
Configuration Variables
subjobImageDescriptionFieldName
This variable controls the name of the field where the subjob image description is stored.
subjobImageDescriptionErrorFieldName
This variable controls the name of the field where the subjob image generation error descriptions are stored.
subjobTableImageDescriptionFieldName
This variable controls the name of the field where the subjob detected tables image descriptions are stored.
subjobTableImageDescriptionErrorFieldName
This variable controls the name of the field where the subjob detected tables image generation error descriptions are stored.
subjobTableFieldName
This variable controls the name of the field where the subjob's detected table is stored.
subjobChartImageDescriptionFieldName
This variable controls the name of the field where the subjob's detected chart image descriptions are stored.
subjobChartImageDescriptionErrorFieldName
This variable controls the name of the field where the subjob's detected chart image generation error descriptions are stored.
subjobChartElementsFieldName
This variable controls the name of the field where the subjob's detected chart elements are stored.
subjobChartsFieldName
This variable controls the name of the field where the subjob's detected chart is stored.
Expected Input
Job input
Job variable name | Job variable description |
contentStream | This variable holds the content of the sub job image being processed. |
Document Input
Document variable name | Document variable description |
title | This variable is used to infer the type of the sub job image being processed. |
Workflow output
Job Output
No job output is generated.
Job variable name | Job variable description |
Document Output
Document variable name | Document variable description |
[user_defined_field for image description] | This field will contain a description of the subjob's image. The name of the field is defined by the user in the workflow configuration. |
[user_defined_field for detected errors during image description generation] | This field will contain the error description in the case a subjob's image description generation fails. The name of the field is defined by the user in the workflow configuration. |
[user_defined_field for detected table image description] | This field will contain a description of the subjob's image. The name of the field is defined by the user in the workflow configuration. |
[user_defined_field for detected table errors during image description generation] | subjob's |
[user_defined_field for detected table] | This field will contain a tabular representation of the table image that was detected. The name of the field is defined by the user in the workflow configuration. |
[user_defined_field for detected chart description] | This field will contain a description of the subjob's image. The name of the field is defined by the user in the workflow configuration. |
[user_defined_field for detected chart errors during image description generation] | This field will contain the error description in the case a subjob's image description generation fails. The name of the field is defined by the user in the workflow configuration. |
[user_defined_field for detected chart elements] | This field will contain an Aspire Object with chart elements of the chart image that was detected. The name of the field is defined by the user in the workflow configuration. |
[user_defined_field for detected chart] | This field will contain the chart that was extracted from the chart image that was detected. The name of the field is defined by the user in the workflow configuration. |
Here is an example of the output of document image description:
Here is an example of the output of a detected table image description:
Here is an example of the output for table detection:
Here is an example of the output of a detected chart image description:
Here is an example of the output for chart elements detection:
Here is an example of the output for chart detection:
Limitations
Hallucinations
Models may cause hallucinations for image descriptions.
Detection Quality
Detection quality for tables and charts is limited by the models that were used.
Errors and Troubleshooting
Done!
Your workflow is now configured and ready to be used.