Skip to main content

A python command-line tool to compare and generate accuracy reports for custom built OCR models.

Project description


A python CLI that generates performance and accuracy reports of your OCR recognized data with the human - curated correct data


Works on python-3 environment and requires pip3 to install . In order to avoid environment conflicts setting up virtualenv is advisable.

$ pip install congruous

Just to confirm that congruous is installed correctly along with its dependency , run the --version comand.

$ congruous --version

This command should show you the lastest version number without any errors. However , its been reported that for some linux distribution python-tk is required to run this. Run the below command to fix it.

$ apt-get install python-tk

Quick Start

$ congruous --help

Lists all the available commands that can be used

Congruous mainly works based on the following three sub-commands ,

  • store
  • match
  • report

Currently supported document types : pan , aadhar

Command : store

The purpose of store command is to handle all the database operations. The term store intends to store something or to keep hold of . Congruous uses an in-built sqlite database to handle the store operations .

Here are some of the options that can be used along with the store command.

--seed - feeds the database based on document type , prints number of records seeded if successful .

--head - displays the first 10 records that were seeded during the seed operation. can be used to verify if your matching against the right set of data.

--tail - displays the last 10 records that were seeded during the seed operation. can be used to verify if your matching against the right set of data.

--count - displays the total number of records seeded for a document type.

--drop - drops all the records for a particular document type that was seeded .

Command : match

This command performs the match operation and gives the performance of the OCR . Match can be performed either against seeded records or with another file using the options below.

--ocrd - mandatory field that passes custom built OCR parsed data as an input to the tool. By default it will be matched to seeded records

--hcd - to match with a another file instead of the seeded records in stores . passes a file to the tool

--report - generates a report on the the given current run of the congruous .

Command : report

This command is helpful to get insights about your OCR model performance over a period of time. Right now it just displays history - performance in the last few congruous runs . More options are to be included in the future versions

--history - displays the performance of you OCR for the last 10 runs.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

congruous-0.1.6.tar.gz (8.6 kB view hashes)

Uploaded source

Built Distribution

congruous-0.1.6-py3-none-any.whl (10.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page