Batch Processing

When dealing with archival media, or analyzing many images that don't require an immediate response to a user, you might want to process your images asynchronously in Vision.

Input

The following details of the input images are needed:
  • compartment_id: The OCID of the compartment the images are in.
  • input_objects: A list of the object locations in the following format:
    • namespace: The name of the namespace.
    • bucket: The bucket name.
    • objects: The list of object names.

Output

As part of the request, you specify an output location for the results of your job. This output location is an Object Storage location defined by your namespace, object, and prefix. The results are the same type of JSON response as with the synchronous API, with one JSON record per image. However, for multipage PDFs, you get one JSON file per PDF file, and the results are paginated.

Provide the following information for the output file:
  • namespace: The name of the namespace.
  • bucket: The bucket name.
  • prefix: The name of the prefix.

Asynchronous API Operations

Vision provides two asynchronous APIs, one for analyzing documents, called documentJobs, and one for analyzing images, called ImageJobs. Here are the three key operations and their supported input formats:
Asynchronous Operation Input Details
Operation Description
Create Create a batch analysis job with given inputs and features.
Get Get details of a batch job.
Cancel Cancels the batch job

Information on the limits in batch jobs is in the Limits section. More information on the APIs can be found in the Vision API documentation, or in the Analyzing with the API chapter.

The batch job statuses are:
  • ACCEPTED
  • CANCELED
  • CANCELING
  • IN_PROGRESS
  • SUCCEEDED
  • FAILED