Skip to main content
This guide will help you get started with IRIS, Scale’s proprietary OCR capability integrated with Dex. You’ll learn how to parse documents with IRIS through the Dex SDK, work with parse results, and integrate IRIS into your document processing workflows.

Overview

IRIS is Scale’s proprietary OCR capability that provides complete pipeline control for custom document processing needs. When using IRIS through Dex, you get:
  • Use any OCR model: Experiment with different OCR engines to optimize for your specific documents. DEX can use any model hosted in SGP.
  • Complete Pipeline Control: Configure layout detection and OCR processing independently
  • Unified Document Management: Upload and manage files through Dex’s file system
  • Async Processing: Non-blocking parse jobs that process documents in the background
  • Project Organization: Group files and parse results within Dex projects
  • Extensibility: Add custom OCR models through SGP for specialized needs

Prerequisites

Before using IRIS, ensure you have:
  • Dex SDK installed
  • SGP Account ID and API Key
  • Access to a Dex instance

Basic Usage

Initialize Dex Client

Parse a Document with IRIS

What should I use for IrisParseEngineOptions? A common query when using Iris is “How can I get the best OCR results without spending time worrying about all the parameters in IrisParseEngineOptions?”. This section gives quick-start suggestions that you can use depending on your requirements that have been shown to perform consistently well across use-cases.

Option 1: I only need text, I don’t need bounding boxes.

Suggestion: text_ocr=“openai/gpt-5.4” + layout=“whole_page” This bypasses the layout detection step, and instead passes the full page to the OCR model. This has been shown to consistently perform consistently well across benchmarks. Suggestion (open-source required): text_ocr="<Qwen/Qwen3.6-27B>" + layout="whole_page" This is the same as the previous suggestion, but with the open-source Qwen/Qwen3.6-27B model instead, which has been shown to almost match gpt-5.4 in English and often exceed gpt-5.4 in Arabic. Using the Qwen model with Iris requires a deployed model endpoint available through SGP.

Option 2: I need bounding boxes.

The default config values were designed for this case, so you only need to specify which OCR model to use. The suggestion and open-source suggestion is the same for this case, with the only difference is we do not specify layout so that it uses the default layout model option rt_detr_bce.

Custom evaluation

In order to get the highest OCR accuracy, you can run a custom evaluation workflow on your own data in SGP-Workflows. This includes evaluating the performance of the OCR models in Iris as well as comparing performance to Reducto. You can evaluate OCR results in 2 ways:
  1. Evaluating the OCR performance against the ground truth using DEX & eval cards in Workflows.
  2. Evaluate the impact of the OCR results on your downstream tasks by plugging in your own downstream tasks and evaluation workflow into our SGP-workflow template in Workflows.

Supported Document Types

IRIS supports various document formats:
  • PDF documents (.pdf)
  • Images (.png, .jpg, .jpeg, .tiff)
  • Scanned documents with printed or handwritten text
  • Multi-page documents

Parsing PDFs

Basic PDF Parsing

Complete PDF Example


Parsing Images

IRIS supports various image formats including PNG, JPG, and TIFF.

Basic Image Parsing

Complete Image Example


Uploading Files from Memory

You can also upload files directly from memory streams:

Configuration Options

IrisParseEngineOptions

Customize IRIS behavior using parse engine options:

Understanding Parse Results

Result Structure

IRIS returns parsed content organized into chunks, where each chunk represents a section of the document:

Working with Different Content Types

IRIS detects and processes different content regions: Each ParseBlock.type is a layout label. IRIS returns capitalized labels such as Text, Section-header, and Table. The example uses .lower() to compare them with the lowercase labels below:
  • Text-family: text, title, caption, list-item, section-header, page-header, page-footer, formula, footnote
  • Tables: table
  • Images / figures: picture

File Management

List Files in Project

Get File Download URL

Check File Details


Error Handling

Handle Upload Errors

Handle Parse Errors


Processing Multiple Documents

Batch Processing


Multi-Language Support

Language coverage depends on the OCR models you configure. Confirm that your models support each required language, then evaluate accuracy on representative text, tables, and scanned pages. Choose models that support your document languages through text_ocr and table_ocr (both default to openai/gpt-5.4), or configure one task-conditioned model. Iris routes regions to those configured models by content type; it does not choose a different model automatically based on detected language.

Best Practices

Use Environment Variables for Credentials

Organize Files by Project

Wait for Parse Completion


Common Use Cases

Extract All Text from Document

Process Forms and Structured Documents

Replace process_table and process_text with your own processing functions.

Performance Considerations

Processing Time

Parse job duration depends on:
  • Document length (number of pages)
  • Image resolution and quality
  • Content complexity (tables, mixed layouts)
  • Selected OCR models

Optimization Tips

  • Batch processing: Process multiple documents concurrently when possible
  • Pre-processing: Ensure documents are properly oriented and of good quality
  • Project organization: Group related documents in the same project for better management

Next Steps

Now that you understand how to use IRIS:
  1. Review the Introduction to IRIS to learn about the underlying OCR pipeline
  2. Explore the Dex documentation for additional capabilities
  3. Integrate IRIS into your document processing workflows
  4. Use parsed results with Dex’s extraction and vector store features
For questions or support, please contact the Scale AI team.