Perform an analysis
Perform an AI analysis on specific inputs.
Last updated
Perform an AI analysis on specific inputs.
Last updated
To perform an analysis, an input and its context (ie. the name of the task group being analyzed) must be provided as inputs. The goal of the analysis is to return values computed by computer vision models on the tasks belonging to the task group analyzed. The context value is the name of the task group.
Two types of inputs are currently supported : images and PDF files.
Images can either be sent in Base64 or through URLs that give us access to the images. URLs can be public, signed or private URLs with IP whitelisting. The following prefix must be added to analyze Base64 images: data:image/jpg;base64,{your_base64_image}
PDF files can either be sent in Base64 or through URLs that give us access to the images. The following prefix must be added to analyze Base64 PDFs: data:application/pdf;base64,{your_base64_pdf}
Only one image can be analyzed per analysis and image size is limited to 5MB.
PDF size is limited to 8MB.
Depending on your configuration of the Deepomatic application, there may be two levels of analysis.
The first level (data conformity) validates the conformity of the inputs provided, particularly the photo. The second level (job conformity), which is only triggered if the first-level checks have been validated, corresponds to the more advanced analysis of the image with specific business rules.
All endpoints are described with the EU (Europe) server format. If your application runs on the US server, you will need to use the following format: https://api.{site-id}.customers.us1.deepomatic.com/v0.2/.
Every Deepomatic application is versioned. We recommend to not integrate any logic based on the tasks and task groups ids as those ids changes when a version is upgraded. You can instead use tasks and task groups names that are agnostic to version changes.
POST
https://api.{site-id}.customers.deepomatic.com/v0.2/work-orders/{id}/analyze/
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Response format
inputs
- array : array containing the different inputs sent to perform the analysis including the conformity_messages
associated in case a data conformity check is not passed.
conformity_messages
- array : array returned when a data conformity check is not passed. It contains information such as the code
, the name
and the message
associated to the check. The check level
is also provided and two values can be returned: "warning" and "error". Depending on the level
set in our platform, different responses will be returned (for more details on the responses' format, see below).
state
- object : object containing in particular the task analyzed_value
which is dependent on the task type
(eg. if the type
is "Boolean", then the value returned will be either True or False), the message
associated to the analysis and the analyzed_inputs
array that allows you to retrieve the bounding boxes detected.
It is recommended to display those 3 different informations (analyzed_value
, message
, and analyzed_inputs
) to the field workers to help them better understand AI results.
Only tasks impacted by the analysis are returned in the responses.
Below an example of response when no data conformity warning or error has been raised:
If only a warning or several warnings are triggered, the response will contain the conformity messages and the analysis on the tasks and task groups. Below an example of response with a Duplicate warning triggered:
If an error, several errors or both errors and warnings are triggered, then the response will contain the conformity messages and empty fields for tasks and task groups. In these cases the second-level analysis is therefore not provided.
Below an example of response with a Duplicate error triggered:
Name | Type | Description |
---|---|---|
id*
string
Id of the work order to send the inputs to. This id corresponds to the id returned in the create a work order API response.
Authorization*
string
Deepomatic API Key associated to your account.
Accept-Language
string
Language of the data conformity error message.
Language supported include English ("en"), French ("fr"), German ("de") and Spanish ("es").
inputs*
array
List of inputs The inputs depend on the logic of the Deepomatic application.
Contact our team for more information on the inputs needed for your specific application.
See below for more information on the format of the inputs to be transmitted.