Browse our Products

Latest release

What was changed

KeySummaryCategory
OCRJAVA‑460Performance and Memory Consumption issue: add enableMemoryPattern and enableCpuMemArena to configure ONNX Runtime.Enhancement

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OCR for Java 26.3 that may affect the code of existing applications.

Added public APIs:

No changes.

Updated public APIs:

The following public APIs have been updated in this release:

Aspose.OCR.OnnxRuntimeSessionOptions

Added property ’enableMemoryPattern’

Added property ’enableCpuMemArena’

Removed public APIs:

No changes.

Examples

The code samples below illustrate the changes introduced in this release:

Detect and recognize tables

import com.aspose.ocr.models.*;

// When enabled saves memory usage but increases execution time
OnnxRuntimeSessionOptions.enableMemoryPattern = true;
OnnxRuntimeSessionOptions.enableCpuMemArena = true;

// Initialize recognition API
AsposeOCR api = new AsposeOCR();

// Add an image to OcrInput object
com.aspose.ocr.OcrInput input = new OcrInput(InputType.SingleImage);
input.Add("source.png");

// Recognize image
com.aspose.ocr.OcrOutput results = api.Recognize(input, set);