Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

PyPI PyPI - Format PyPI - Downloads PyPI - Python Version GitHub license GitHub last commit

Python REST API for OMR Processing

Aspose.OMR for Cloud is a REST API that helps you to perform optical mark recognition in the cloud. We provide a series of SDKs. Along with that, you can get binaries to start working immediately and recognize various OMR forms.

Developers can embed optical recognition in any type of application to extract data from images of tests, exams, questionnaires, surveys, etc. In the repository you can find examples on how to start using Aspose.OMR API in your project.

OMR Processing Features

  • Perform recognition of scanned photos and images for OMR operations.
  • Ability to perform OMR on rotated & perspective (within 25 deg) photos.
  • Extract & recognize human-marked data from scanned tests, exams, surveys, etc.
  • Supports the export of OMR results to CSV file format.
  • Use textual markup to generate OMR templates, generate surveys, and test sheets.
  • Availability of GUI application for managing OMR templates.
  • Specify the number of OMR based questions & answers in the template.
  • Availability of GUI OMR editor as a cloud client.
  • Provide JSON rules to perform OMR answer grading.
  • Clip an area of interest from an image, save it as JPEG & perform OMR on it.
  • Perform highly accurate optical mark recognition (OMR).

Save OMR As


Read OMR Formats


How to use the SDK?

Our API is completely independent of your operating system, database system, or development language. You can use any language and platform that supports HTTP to interact with our API. However, manually writing client code can be difficult, error-prone, and time-consuming. Therefore, we have provided and support SDKs in many development languages to make it easier to integrate with us.


import asposeomrcloud.apis.storage_api as storage_api
from asposeomrcloud.configuration import Configuration
from asposeomrcloud.apis.omr_api import OmrApi
from asposeomrcloud.models import OmrFunctionParam

def run_demo():

    configuration = Configuration(apiKey=config.get('app_key'), appSid=config.get('app_sid'))

    api = OmrApi(configuration)
    storage = storage_api.StorageApi(configuration)

    # Step 1: Upload demo files on cloud and Generate template
    print("\t\tUploading demo files...")
    upload_demo_files(storage, data_dir)
    print("\t\tGenerate template...")
    res_gen = generate_template(api, storage, os.path.join(data_dir, TEMPLATE_DST_NAME), LOGOS_FOLDER_NAME)
    if res_gen.error_code == 0:
        deserialize_files(res_gen.payload.result.response_files, PATH_TO_OUTPUT)

    # Step 2: Validate template
    print("\t\tValidate template...")
    template_id = validate_template(api, storage, os.path.join(PATH_TO_OUTPUT, TEMPLATE_IMAGE_NAME), PATH_TO_OUTPUT)

    # Step 3: Recognize photos and scans
    print("\t\tRecognize image...")
    for user_image in TEMPLATE_USER_IMAGES_NAMES:
        res_rec = recognize_image(api, storage, template_id, os.path.join(data_dir, user_image))
        if res_rec.error_code == 0:
            result_file = deserialize_files(res_rec.payload.result.response_files, PATH_TO_OUTPUT)[0]
            print('Result file %s' % result_file)


Make your solution using SDK, follow these steps:

1. Clone from Github

Clone the solution using the command:

git clone --recurse-submodules

2. Get API keys if you haven't

Make a personal account on Aspose Cloud Dashboard and click Get Keys. These keys are useful for all OMR Cloud products. If you have any trouble, look at this detailed manual.

3. Install SDK

Install aspose-omr-cloud with PIP from PyPI by:

pip install aspose-omr-cloud

Or clone repository and install it via Setuptools:

python install

4. Run Demo

  • Checkout the SDK or get from PyPi
  • Set Your AppSid & AppKey
  • Run


This project includes:

  • Module "asposeomrcloud", this is SDK. You can integrate it in your application. It contains both Omr and Storage API
  • Module "demo". Sample API requests.
  • Module "test", unittests. You can take a look at them to see various code examples.


  • See requirements.txt

Versions support:

  • Python :: 3.6
  • Python :: 3.7
  • Python :: 3.8
  • Python :: 3.9

OMR Cloud SDKs

.NET Java PHP Ruby Python Node.js Perl

Documentation for API Endpoints

All URIs are relative to

Class Method HTTP request Description
OmrApi post_run_omr_task POST /omr/{name}/runOmrTask Run specific OMR task


Library uses OAUTH2 internally

Aspose.OMR Cloud SDKs in Popular Languages

.NET Java PHP Python Ruby Node.js
GitHub GitHub GitHub GitHub GitHub GitHub
NuGet Maven Composer PIP GEM NPM

Product Page | Documentation | API Reference | Code Samples | Blog | Free Support | Free Trial|


Python library for communicating with the Aspose.OMR Cloud API








No releases published


No packages published

Contributors 4