{"id":17995826,"url":"https://github.com/doubangotelecom/ultimatemicr-sdk","last_synced_at":"2025-04-10T02:29:23.804Z","repository":{"id":97372609,"uuid":"208034881","full_name":"DoubangoTelecom/ultimateMICR-SDK","owner":"DoubangoTelecom","description":"Bank check information extraction/OCR from Magnetic Ink Character Recognition [MICR] (E-13B \u0026 CMC-7) using deep learning","archived":false,"fork":false,"pushed_at":"2024-10-24T20:24:23.000Z","size":591571,"stargazers_count":56,"open_issues_count":1,"forks_count":21,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-03T00:08:13.656Z","etag":null,"topics":["ai","banking","check","cmc-7","deep-learning","e-13b","fintech","micr","ocr","ocr-recognition","tensorflow"],"latest_commit_sha":null,"homepage":"https://www.doubango.org/webapps/micr/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DoubangoTelecom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-12T11:25:41.000Z","updated_at":"2025-01-10T16:21:33.000Z","dependencies_parsed_at":"2025-01-02T01:21:45.144Z","dependency_job_id":null,"html_url":"https://github.com/DoubangoTelecom/ultimateMICR-SDK","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubangoTelecom%2FultimateMICR-SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubangoTelecom%2FultimateMICR-SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubangoTelecom%2FultimateMICR-SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubangoTelecom%2FultimateMICR-SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DoubangoTelecom","download_url":"https://codeload.github.com/DoubangoTelecom/ultimateMICR-SDK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248144051,"owners_count":21054865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","banking","check","cmc-7","deep-learning","e-13b","fintech","micr","ocr","ocr-recognition","tensorflow"],"created_at":"2024-10-29T21:11:44.889Z","updated_at":"2025-04-10T02:29:23.783Z","avatar_url":"https://github.com/DoubangoTelecom.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":" - [Sample applications](#Sample-applications)\n    - [MICRVideoRecognizer-E13B](#Sample-applications-Video-Recognizer-e13b)\n    - [MICRVideoRecognizer-CMC7](#Sample-applications-Video-Recognizer-cmc7)\n    - [Benchmark](#Sample-applications-Benchmark)\n    - [Trying the samples](#Sample-applications-Trying-the-samples)\n      - [Android](#Sample-applications-Trying-the-samples-Android)\n      - [Linux, Windows, Raspberry Pi and Others](#Sample-applications-Trying-the-samples-Raspberry-Pi-and-Others)\n- [Getting-started](#Getting-started)\n  - [Adding the SDK to your project](#Getting-started-Adding-the-SDK-to-your-project)\n    - [Android](#Getting-started-Adding-the-SDK-to-your-project-Android)\n    - [Linux, Windows, Raspberry Pi and Others](#Getting-started-Adding-the-SDK-to-your-project-Raspberry-Pi-Windows-and-Others)\n   - [Using the API](#Getting-started-Using-the-API)\n     - [Android (Java)](#Getting-started-Using-the-API-Android-Java)\n     - [Linux, Windows, Raspberry Pi and Others (C++)](#Getting-started-Using-the-API-Linux-Windows-Raspberry-Pi-and-Others-Cpp)\n - [Getting help](#technical-questions)\n  \n - Full documentation at https://www.doubango.org/SDKs/micr/docs/\n - Online demo at https://www.doubango.org/webapps/micr/\n - Open source Computer Vision Library: https://github.com/DoubangoTelecom/compv\n  \n\u003chr /\u003e\n\nThis is state-of-the-art [Magnetic ink character recognition (MICR)](https://en.wikipedia.org/wiki/Magnetic_ink_character_recognition) dectector and recognizer using **deep learning**.\n\nUnlike other solutions you can find on the web, you don't need to adjust the camera/image to define a Region Of Interest (ROI). \nWe also don't try to use small ROI to decrease the processing time or false-positives. The whole image (**up to 4K supported**) is processed and every pixel is checked. \nNo matter if the MICR lines are **small**, **far away**, **blurred**, **partially occluded**, **skewed** or **slanted**, our implementation can accurately detect and recognize every character.\n\nThe detector is agnostic and doesn't decode (recognize/OCR) the text to check it against some pre-defined rules (regular expressions) \nwhich means **we support all MICR types** regardless the font, content, shape or country. **Both [E-13B](https://en.wikipedia.org/wiki/Magnetic_ink_character_recognition#E-13B) and [CMC-7](https://en.wikipedia.org/wiki/Magnetic_ink_character_recognition#CMC-7) formats are supported.**\n\nAutomating Bank account information extraction from [MICR (Magnetic ink character recognition)](https://en.wikipedia.org/wiki/Magnetic_ink_character_recognition) zones on bank scanned checks/document **above human-level accuracy** is a very challenging task. \nOur implementation reaches such level of accuracy using latest deep learning techniques. \nWe outperform both [ABBYY](https://www.abbyy.com/ocr_sdk/) and [LEADTOOLS](https://demo.leadtools.com/JavaScript/BankCheckReader/) in terms of accuracy and speed (**almost #30 times faster**).\n\nUsing a single model we're able to accurately locate the [MICR (Magnetic ink character recognition)]( https://en.wikipedia.org/wiki/Magnetic_ink_character_recognition) zones, infer the type (**[E-13B](https://en.wikipedia.org/wiki/Magnetic_ink_character_recognition#E-13B)** or **[CMC-7](https://en.wikipedia.org/wiki/Magnetic_ink_character_recognition#CMC-7)**) and recognize the fields: **one-shot deep model**. \nThe performance gap between us and the other companies is more important for **[CMC-7](https://en.wikipedia.org/wiki/Magnetic_ink_character_recognition#CMC-7)** format which is more challenging than **[E-13B](https://en.wikipedia.org/wiki/Magnetic_ink_character_recognition#E-13B)**.\n\nThe next [video](https://doubango.org/videos/micr/e13b-x264.mp4) shows [MICRVideoRecognizer-E13B sample](#Sample-applications-Video-Recognizer-e13b) running on Android: \u003cbr /\u003e\n[![MICRVideoRecognizer-E13B Running on Android](https://www.doubango.org/SDKs/micr/docs/_images/vlcsnap-2020-03-29-06h32m47s066.jpg)](https://doubango.org/videos/micr/e13b-x264.mp4)\n\u003chr /\u003e\n\nThe next [video](https://doubango.org/videos/micr/cmc7-x264.mp4) shows [MICRVideoRecognizer-CMC7 sample](#Sample-applications-Video-Recognizer-cmc7) running on Android: \u003cbr /\u003e\n[![MICRVideoRecognizer-CMC7 Running on Android](https://www.doubango.org/SDKs/micr/docs/_images/vlcsnap-2020-03-29-06h29m05s771.jpg)](https://doubango.org/videos/micr/cmc7-x264.mp4)\n\u003chr /\u003e\n\nThis technology is a key component of [Remote Deposit Capture](https://www.remotedepositcapture.com/overview/rdc.overview.aspx) applications to process bank checks sent using mobile phones or scanners. **It's a must have** technology for any [FinTech](https://en.wikipedia.org/wiki/Financial_technology) company.\n\nDon't take our word for it, come check our implementation. \n**No registration, license key or internet connection is needed**, just clone the code and start coding/testing. Everything runs on the device, no data is leaving your computer. \nThe code released here comes with many ready-to-use samples to help you get started easily. You can also check our online cloud-based implementation (no registration required) at  https://www.doubango.org/webapps/micr/ to check out the accuracy and precision before starting to play with the SDK.\n\n - Github repo: https://github.com/DoubangoTelecom/ultimateMICR-SDK\n - Cloud-based implementation: https://www.doubango.org/webapps/micr/\n \n \n\u003ca name=\"Sample-applications\"\u003e\u003c/a\u003e\n# Sample applications # \nThe source code comes with #3 sample applications: [MICRVideoRecognizer-E13B](samples/c++/recognizer), [MICRVideoRecognizer-CMC7](samples/c++/recognizer) and [Benchmark](samples/c++/Benchmark). All sample applications are open source and don’t require registration or license key.\n\nThe source code is at [samples](samples).\n\n\u003ca name=\"Sample-applications-Video-Recognizer-e13b\"\u003e\u003c/a\u003e\n## MICRVideoRecognizer-E13B ##\nThis application should be used as reference code by any developer trying to add ultimateMICR to their products. It shows how to detect and recognize **[MICR E-13B](https://en.wikipedia.org/wiki/Magnetic_ink_character_recognition#E-13B)** lines in realtime using live video stream from the camera.\n\n\u003ca name=\"Sample-applications-Video-Recognizer-cmc7\"\u003e\u003c/a\u003e\n## MICRVideoRecognizer-CMC7 ##\nThis application should be used as reference code by any developer trying to add ultimateMICR to their products. It shows how to detect and recognize **[MICR CMC-7](https://en.wikipedia.org/wiki/Magnetic_ink_character_recognition#CMC-7)** lines in realtime using live video stream from the camera.\n \n\u003ca name=\"Sample-applications-Benchmark\"\u003e\u003c/a\u003e\n## Benchmark ##\nThis application is used to check everything is ok and running as fast as expected. The information about the maximum frame rate on ARM devices could be checked using this application. \n\n\u003ca name=\"Sample-applications-Trying-the-samples\"\u003e\u003c/a\u003e\n## Trying the samples ##\n\n\u003ca name=\"Sample-applications-Trying-the-samples-Android\"\u003e\u003c/a\u003e\n### Android ###\n\nTo try the sample applications on Android:\n- Open Android Studio and select **Open an existing Android Studio project**\n    ![Open an existing Android Studio project](https://www.doubango.org/SDKs/micr/docs/_images/android_studio_open_existing_project.jpg \"Open an existing Android Studio project\")\n   \n - Navigate to [**\u003cultimateMICR-SDK\u003e/samples**](samples), select **android** folder and click **Open**\n    ![Select project](https://www.doubango.org/SDKs/micr/docs/_images/android_studio_select_samples_android.jpg \"Select project\")\n\n- Select the sample you want to try (e.g. **videorecognize**), the device (e.g. **samsung SM-G975F**) and press **run**\n    ![Select sample](https://www.doubango.org/SDKs/micr/docs/_images/android_studio_select_samples_videorecognizer.jpg \"Select sample\")\n\n\u003ca name=\"Sample-applications-Trying-the-samples-Raspberry-Pi-and-Others\"\u003e\u003c/a\u003e\n### Linux, Windows, Raspberry Pi and Others ###\nFor Raspberry Pi and other Linux systems you need to build the sample applications from source. More info at [samples/c++/README.md](samples/c++/README.md).\n\n\n\n\u003ca name=\"Getting-started\"\u003e\u003c/a\u003e\n# Getting started # \nThe SDK works on [many platforms](https://www.doubango.org/SDKs/micr/docs/Architecture_overview.html#supportedoperatingsystems) and comes with support for many [programming languages](https://www.doubango.org/SDKs/micr/docs/Architecture_overview.html#supportedprogramminglanguages). \n\n\u003ca name=\"Getting-started-Adding-the-SDK-to-your-project\"\u003e\u003c/a\u003e\n## Adding the SDK to your project ##\nThis Github repository contains [binaries](binaries) for **Android** and **Raspberry Pi**. The next sections explain how to add the SDK to an existing project.\n\n\u003ca name=\"Getting-started-Adding-the-SDK-to-your-project-Android\"\u003e\u003c/a\u003e\n### Android ###\nThe SDK is distributed as an Android Studio module and you can add it as reference or you can also build it and add the AAR to your project. But, the easiest way to add the SDK to your project is by directly including the source.\nIn your **build.gradle** file add:\n```python\nandroid {\n\n      # This is the block to add within \"android { } \" section\n      sourceSets {\n         main {\n             jniLibs.srcDirs += ['path-to-your-ultimateMICR-SDK/binaries/android/jniLibs']\n             java.srcDirs += ['path-to-your-ultimateMICR-SDK/java/android']\n             assets.srcDirs += ['path-to-your-ultimateMICR-SDK/assets/models']\n         }\n      }\n}\n```\n\n\u003ca name=\"Getting-started-Adding-the-SDK-to-your-project-Raspberry-Pi-Windows-and-Others\"\u003e\u003c/a\u003e\n### Linux, Windows, Raspberry Pi and Others ###\n\nThe shared libraries are under [**ultimateMICR-SDK/binaries/\u003cplatform\u003e**](binaries). The header file at [c++](c++). You can use any C++ compiler/linker.\n\n\u003ca name=\"Getting-started-Using-the-API\"\u003e\u003c/a\u003e\n## Using the API ##\n\nIt's hard to be lost when you try to use the API as there are only 3 useful functions: init, process and deInit.\n\nThe C++ API is defined at https://www.doubango.org/SDKs/micr/docs/cpp-api.html.\n\n\u003ca name=\"Getting-started-Using-the-API-Android-Java\"\u003e\u003c/a\u003e\n### Android (Java) ###\n```java\n\timport org.doubango.ultimateMicr.Sdk.ULTMICR_SDK_IMAGE_TYPE;\n\timport org.doubango.ultimateMicr.Sdk.UltMicrSdkEngine;\n\timport org.doubango.ultimateMicr.Sdk.UltMicrSdkResult;\n\n\t// JSON configuration string\n\t// More info at https://www.doubango.org/SDKs/micr/docs/Configuration_options.html\n\tfinal static String CONFIG = \"{\" +\n\t\t\"\\\"debug_level\\\": \\\"info\\\",\" + \n\t\t\"\\\"debug_write_input_image_enabled\\\": false,\" + \n\t\t\"\\\"debug_internal_data_path\\\": \\\".\\\",\" + \n\t\t\"\" + \n\t\t\"\\\"num_threads\\\": -1,\" + \n\t\t\"\\\"gpgpu_enabled\\\": true,\" + \n\t\t\"\\\"gpgpu_workload_balancing_enabled\\\": true,\" + \n\t\t\"\" + \n\t\t\"\\\"segmenter_accuracy\\\": \\\"high\\\",\" + \n\t\t\"\\\"interpolation\\\": \\\"bilinear\\\",\" + \n\t\t\"\\\"roi\\\": [0, 0, 0, 0],\" + \n\t\t\"\\\"score_type\\\": \\\"min\\\",\" + \n\t\t\"\\\"min_score\\\": 0.3\" + \n\t\"}\";\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\n\t\t// Initialize the engine\n\t\tassert UltMicrSdkEngine.init(\n\t\t\t\tgetAssets(),\n\t\t\t\tCONFIG\n\t\t).isOK();\n\t}\n\n\t// Camera listener: https://developer.android.com/reference/android/media/ImageReader.OnImageAvailableListener\n\tfinal ImageReader.OnImageAvailableListener mOnImageAvailableListener = new ImageReader.OnImageAvailableListener() {\n\n\t\t@Override\n\t\tpublic void onImageAvailable(ImageReader reader) {\n\t\t\t\ttry {\n\t\t\t\t    final Image image = reader.acquireLatestImage();\n\t\t\t\t    if (image == null) {\n\t\t\t\t        return;\n\t\t\t\t    }\n\n\t\t\t\t    // MICR recognition\n\t\t\t\t    final int exifOrientation = 1; // Normal (landscape) - no rotation\n\t\t\t\t    final Image.Plane[] planes = image.getPlanes();\n\t\t\t\t    final UltMicrSdkResult result = UltMicrSdkEngine.process(\n\t\t\t\t        ULTMICR_SDK_IMAGE_TYPE.ULTMICR_SDK_IMAGE_TYPE_YUV420P,\n\t\t\t\t        planes[0].getBuffer(),\n\t\t\t\t        planes[1].getBuffer(),\n\t\t\t\t        planes[2].getBuffer(),\n\t\t\t\t        image.getWidth(),\n\t\t\t\t        image.getHeight(),\n\t\t\t\t        planes[0].getRowStride(),\n\t\t\t\t        planes[1].getRowStride(),\n\t\t\t\t        planes[2].getRowStride(),\n\t\t\t\t        planes[1].getPixelStride(),\n\t\t\t\t        exifOrientation\n\t\t\t\t    );\n\t\t\t\t    assert result.isOK();\n\n\t\t\t\t    image.close();\n\n\t\t\t\t} catch (final Exception e) {\n\t\t\t\t   e.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t};\n\n\t@Override\n\tpublic void onDestroy() {\n\t\t// DeInitialize the engine\n\t\tassert UltMicrSdkEngine.deInit().isOK();\n\n\t\tsuper.onDestroy();\n\t}\n ```\n \n \u003ca name=\"Getting-started-Using-the-API-Linux-Windows-Raspberry-Pi-and-Others-Cpp\"\u003e\u003c/a\u003e\n ### Linux, Windows, Raspberry Pi and Others (C++) ###\n The C++ API is defined at https://www.doubango.org/SDKs/micr/docs/cpp-api.html.\n\n```cpp\n\t#include \u003cultimateMICR-SDK-API-PUBLIC.h\u003e // Include the API header file\n\n\t// JSON configuration string\n\t// More info at https://www.doubango.org/SDKs/micr/docs/Configuration_options.html\n\tstatic const char* __jsonConfig =\n\t\"{\"\n\t\"\\\"debug_level\\\": \\\"info\\\",\"\n\t\"\\\"debug_write_input_image_enabled\\\": false,\"\n\t\"\\\"debug_internal_data_path\\\": \\\".\\\",\"\n\t\"\"\n\t\"\\\"num_threads\\\": -1,\"\n\t\"\\\"gpgpu_enabled\\\": true,\"\n\t#if defined(__arm__) || defined(__thumb__) || defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || defined(_ARM) || defined(_M_ARM) || defined(_M_ARMT) || defined(__arm) || defined(__aarch64__)\n\t\"\\\"gpgpu_workload_balancing_enabled\\\": true,\"\n\t#else // Disable GPGPU/CPU work balancing on x86 and enable it on ARM -\u003e https://devtalk.nvidia.com/default/topic/494659/execute-kernels-without-100-cpu-busy-wait-/\n\t\"\\\"gpgpu_workload_balancing_enabled\\\": false,\"\n\t#endif\n\t\"\"\n\t\"\\\"segmenter_accuracy\\\": \\\"high\\\",\"\n\t\"\\\"interpolation\\\": \\\"bilinear\\\",\"\n\t\"\\\"roi\\\": [0, 0, 0, 0],\"\n\t\"\\\"score_type\\\": \\\"min\\\",\"\n\t\"\\\"min_score\\\": 0.3\"\n\t\"}\";\n\n\t// Local variable\n\tUltMicrSdkResult result(0, \"OK\", \"{}\");\n\n\t// Initialize the engine (should be done once)\n\tULTMICR_SDK_ASSERT((result = UltMicrSdkEngine::init(\n\t\t__jsonConfig\n\t)).isOK());\n\n\t// Processing (detection + recognition)\n\t// Call this function for every video frame\n\tconst void* imageData = nullptr;\n\tULTMICR_SDK_ASSERT((result = UltMicrSdkEngine::process(\n\t\t\tULTMICR_SDK_IMAGE_TYPE_RGB24,\n\t\t\timageData,\n\t\t\timageWidth,\n\t\t\timageHeight\n\t\t)).isOK());\n\n\t// DeInit\n\t// Call this function before exiting the app to free the allocate resources\n\t// You must not call process() after calling this function\n\tULTMICR_SDK_ASSERT((result = UltMicrSdkEngine::deInit()).isOK());\n```\n\nAgain, please check the [sample applications](#Sample-applications) for more information on how to use the API.\n\n\n\u003ca name=\"Technical-questions\"\u003e\u003c/a\u003e\n # Technical questions #\n Please check our [discussion group](https://groups.google.com/forum/#!forum/doubango-ai) or [twitter account](https://twitter.com/doubangotelecom?lang=en)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoubangotelecom%2Fultimatemicr-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoubangotelecom%2Fultimatemicr-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoubangotelecom%2Fultimatemicr-sdk/lists"}