Detecting Text in an Image by Using a Single Request

Detect and recognize text in an image by calling the Optical Character Recognition (OCR) pretrained model with a single request in Vision.

The maximum size of each image is 5 MB.

To classify images in batch, see Detecting Text in an Image by Using a Batch Request. For more information about the image classification pretrained model, see Pretrained Image Analysis Models.

    1. Open the navigation menu and click Analytics & AI. Under AI Services, click Vision.
    2. On the Vision page, click Text detection.
    3. Select the compartment where you want to store the results.
    4. Select the location of the image, either Local file or Object storage.
    5. (Optional) If you selected Local file, drag the file to the Drop a file are, or click select one... and browse to the image.
    6. (Optional) If you selected Object storage, enter the image URL and click Upload.

      The analyzeImage API is invoked, and the model immediately analyzes the image. The Results area shows the extracted text, and the request and response JSON.

  • Use the analyze-image command and required parameters to detect the text in an image:

    oci ai-vision analyze-image [OPTIONS]
    For a complete list of flags and variable options for CLI commands, see the CLI Command Reference.
  • Run the AnalyzeImage operation to detect the text in an image.