{"id":17995880,"url":"https://github.com/doubangotelecom/ultimatecreditcard-sdk","last_synced_at":"2025-03-26T03:32:11.911Z","repository":{"id":97372540,"uuid":"247401120","full_name":"DoubangoTelecom/ultimateCreditCard-SDK","owner":"DoubangoTelecom","description":"Bank credit card deep layout analysis, fields extraction and recognition/OCR (ScanToPay) using deep learning","archived":false,"fork":false,"pushed_at":"2023-10-23T23:41:43.000Z","size":288929,"stargazers_count":101,"open_issues_count":1,"forks_count":36,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-21T05:21:47.697Z","etag":null,"topics":["ai","android","banking","credit-card","deep-learning","fintech","ios","linux","ocr","ocr-recognition","ocr-sdk","payment","payment-processing","python","raspberry-pi","recognition","scan-tool","sdk","tensorflow","windows"],"latest_commit_sha":null,"homepage":"https://www.doubango.org/webapps/credit-card-ocr","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":"2020-03-15T04:27:50.000Z","updated_at":"2025-01-22T10:10:11.000Z","dependencies_parsed_at":"2024-10-29T22:09:20.408Z","dependency_job_id":null,"html_url":"https://github.com/DoubangoTelecom/ultimateCreditCard-SDK","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubangoTelecom%2FultimateCreditCard-SDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubangoTelecom%2FultimateCreditCard-SDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubangoTelecom%2FultimateCreditCard-SDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DoubangoTelecom%2FultimateCreditCard-SDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DoubangoTelecom","download_url":"https://codeload.github.com/DoubangoTelecom/ultimateCreditCard-SDK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245585320,"owners_count":20639668,"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","android","banking","credit-card","deep-learning","fintech","ios","linux","ocr","ocr-recognition","ocr-sdk","payment","payment-processing","python","raspberry-pi","recognition","scan-tool","sdk","tensorflow","windows"],"created_at":"2024-10-29T21:12:04.676Z","updated_at":"2025-03-26T03:32:06.900Z","avatar_url":"https://github.com/DoubangoTelecom.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"  - [Getting started](#getting-started)\n  - [Android](#android)\n  \t- [Sample applications](#sample-applications-android)\n\t\t- [Benchmark](#sample-application-benchmark-android)\n\t\t- [CCardVideoRecognizer](#sample-application-videorecognizer-android)\n\t- [Trying the samples](#trying-the-samples-android)\n\t- [Adding the SDK to your project](#adding-the-sdk-to-your-project-android)\n\t- [Using the Java API](#using-the-java-api-android)\n - [Raspberry Pi (Raspbian OS), Linux, Windows and others](#others)\n \t- [Sample applications](#sample-applications-others)\n\t\t- [Benchmark](#sample-application-benchmark-others)\n\t\t- [Recognizer](#sample-application-recognizer-others)\n\t- [Using the C++ API](#using-the-cpp-api-others)\n - [Getting help](#technical-questions)\n  \n - Full documentation at https://www.doubango.org/SDKs/credit-card-ocr/docs/\n - Online demo at https://www.doubango.org/webapps/credit-card-ocr/\n - Open source Computer Vision library: https://github.com/DoubangoTelecom/compv\n  \n\u003chr /\u003e\n \nThis is a state-of-the-art **DeepLayout Analysis** implementation based on Tensorflow to accurately detect, qualify, extract and recognize/OCR every field from a bank credit card using a single image: **Number, Holder's name, Validity, Company...**\n\nOur implementation works with all cards (**credit, debit, travel, prepaid, corporate...**) from all payment networks (**Visa, MasterCard, American Express, RuPay, Discover...**).\n\nBoth **Embossed** and **UnEmbossed** formats are supported.\n\nUnlike other implementations we're not doing brute force OCR (trying multiple images/parameters until match). You only need a single image to get the correct result. There is no template matching which means the data could be malformed or at any position and you'll still have the correct result ([WYSIWYG](https://en.wikipedia.org/wiki/WYSIWYG\u003e)).\n\nNext [video](https://youtu.be/BBI_3AJIc1c) ([https://youtu.be/BBI_3AJIc1c](https://youtu.be/BBI_3AJIc1c)) shows [CCardVideoRecognizer sample](#sample-application-videorecognizer-android) Running on Android: \u003cbr /\u003e\n[![CCardVideoRecognizer Running on Android](https://img.youtube.com/vi/BBI_3AJIc1c/maxresdefault.jpg)](https://www.youtube.com/watch?v=BBI_3AJIc1c)\n   \n\u003chr /\u003e\n\nYou can reach **100% precision** on the credit card number recognition using [validation process](https://www.doubango.org/SDKs/credit-card-ocr/docs/Data_validation.html).\n\nThe number of use cases in FinTech industry are countless: **Scan To Pay, Helping visually impaired users, Online shopping speed-up, payment forms auto-filling, better user experience, reducing typing errors, process automation...**\n\nDon't take our word for it, come check our implementation. **No registration, license key or internet connection is required**, 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 for [Android](#sample-applications-android), [Raspberry Pi, Windows and Linux](#sample-applications-others) to help you get started easily. \n\nYou can also check our online [cloud-based implementation](https://www.doubango.org/webapps/credit-card-ocr/) (*no registration required*) to check out the accuracy and precision before starting to play with the SDK.\n\nPlease check full documentation at https://www.doubango.org/SDKs/credit-card-ocr/docs/\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/credit-card-ocr/docs/Architecture_overview.html#supportedoperatingsystems) and comes with support for many [programming languages](https://www.doubango.org/SDKs/credit-card-ocr/docs/Architecture_overview.html#supportedprogramminglanguages) but the next sections focus on [Android](#android) and [Raspberry pi](#others). \n\n\u003ca name=\"android\"\u003e\u003c/a\u003e\n# Android #\n\nThe next sections are about Android and Java API.\n\n\u003ca name=\"sample-applications-android\"\u003e\u003c/a\u003e\n## Sample applications (Android) ##\nThe source code comes with #2 Android sample applications: [Benchmark](#sample-application-benchmark-android) and [CCardVideoRecognizer](#sample-application-videorecognizer-android).\n\n\u003ca name=\"sample-application-benchmark-android\"\u003e\u003c/a\u003e\n### Benchmark (Android) ###\nThis application is used to check everything is ok and running as fast as expected. The information about the maximum frame rate (**27fps**) on Snapdragon 855 devices could be checked using this application. It's open source and doesn't require registration or license key.\n\n\u003ca name=\"sample-application-videorecognizer-android\"\u003e\u003c/a\u003e\n### CCardVideoRecognizer (Android) ###\nThis application should be used as reference code by any developer trying to add ultimateCreditCard to their products. It shows how to detect and recognize credit cards in realtime using live video stream from the camera.\n\u003cp align=\"center\" style=\"text-align: center\"\u003e\n  \u003cimg src=\"https://www.doubango.org/SDKs/credit-card-ocr/docs/_images/poster_ocr.jpg\"\u003e\n  \u003cbr /\u003e\n  \u003cem\u003e\u003cu\u003e\u003ca href=\"#sample-application-videorecognizer-android\"\u003eCCardVideorecognizer sample application\u003c/a\u003e on Android\u003c/u\u003e\u003c/em\u003e\n\u003c/p\u003e\n\n\u003ca name=\"trying-the-samples-android\"\u003e\u003c/a\u003e\n## Trying the samples (Android) ##\nTo try the sample applications on Android:\n 1. Open Android Studio and select \"Open an existing Android Studio project\"\n![alt text](https://www.doubango.org/SDKs/credit-card-ocr/docs/_images/android_studio_open_existing_project.jpg \"Open an existing Android Studio project\")\n\n 2. Navigate to **ultimateCreditCard-SDK/samples**, select **android** folder and click **OK**\n![alt text](https://www.doubango.org/SDKs/credit-card-ocr/docs/_images/android_studio_select_samples_android.jpg \"Select project\")\n\n 3. Select the sample you want to try (e.g. **ccardvideorecognizer**) and press **run**.\n![alt text](https://www.doubango.org/SDKs/credit-card-ocr/docs/_images/android_studio_select_samples_videorecognizer.jpg \"Select sample\")\n            \n\u003ca name=\"adding-the-sdk-to-your-project-android\"\u003e\u003c/a\u003e\n## Adding the SDK to your project (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.\n\nIn your *build.gradle* file add:\n\n```python\nandroid {\n\n      # This is the block to add within \"android { } \" section\n      sourceSets {\n         main {\n             jniLibs.srcDirs += ['path-to-your-ultimateCreditCard-SDK/binaries/android/jniLibs']\n             java.srcDirs += ['path-to-your-ultimateCreditCard-SDK/java/android']\n             assets.srcDirs += ['path-to-your-ultimateCreditCard-SDK/assets/models']\n         }\n      }\n}\n```\n\n\u003ca name=\"using-the-java-api-android\"\u003e\u003c/a\u003e\n## Using the Java API (Android) ##\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 [here](https://www.doubango.org/SDKs/credit-card-ocr/docs/cpp-api.html).\n\n```java\n\n\timport org.doubango.ultimateAlpr.Sdk.ULTCCARD_SDK_IMAGE_TYPE;\n\timport org.doubango.ultimateAlpr.Sdk.UltCreditCardSdkEngine;\n\timport org.doubango.ultimateAlpr.Sdk.UltCreditCardSdkResult;\n\n\tfinal static String CONFIG = \"{\" +\n\t\t\"\\\"debug_level\\\": \\\"info\\\",\" + \n\t\t\"\\\"gpgpu_enabled\\\": true,\" + \n\n\t\t\"\\\"detect_minscore\\\": 0.5,\" + \n\t\t\"\\\"detect_quantization_enabled\\\": true,\" + \n\n\t\t\"\\\"recogn_score_type\\\": \\\"min\\\",\" + \n\t\t\"\\\"recogn_minscore\\\": 0.2,\" + \n\t\t\"\\\"recogn_rectify_enabled\\\": false,\" + \n\t\t\"\\\"recogn_quantization_enabled\\\": true\" + \n\t\"}\";\n\n\t@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\t// Initialize the engine\n\t\tassert UltCreditCardSdkEngine.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    // Credit card detection and recognition\n\t\t\t\t    final Image.Plane[] planes = image.getPlanes();\n\t\t\t\t    final UltCreditCardSdkResult result = UltCreditCardSdkEngine.process(\n\t\t\t\t        ULTCCARD_SDK_IMAGE_TYPE.ULTCCARD_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    );\n\t\t\t\t    assert result.isOK();\n\n\t\t\t\t    // The result contains JSON string to parse in order to get recognitions\n\t\t\t\t    // result.json();\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 UltCreditCardSdkEngine.deInit().isOK();\n\n\t\tsuper.onDestroy();\n\t}\n```\n\nAgain, please check the sample applications for [Android](#sample-applications-android) and [Raspberry Pi](#sample-applications-others) and [full documentation](https://www.doubango.org/SDKs/credit-card-ocr/docs/) for more information.\n\n\u003ca name=\"others\"\u003e\u003c/a\u003e\n# Raspberry Pi (Raspbian OS), Linux, Windows and others #\n\n\u003ca name=\"sample-applications-others\"\u003e\u003c/a\u003e\n## Sample applications (Others) ##\nThe source code comes with #2 [C++ sample applications](samples/c++): [Benchmark](#sample-application-benchmark-others) and [Recognizer](#sample-application-recognizer-others). These sample applications can be used on all supported platforms: **Android**, **Windows**, **Raspberry pi**, **iOS**, **OSX**, **Linux**...\n\n\u003ca name=\"sample-application-benchmark-others\"\u003e\u003c/a\u003e\n### Benchmark (Others) ###\nThis application is used to check everything is ok and running as fast as expected. \nThe information about the maximum frame rate could be checked using this application. \nIt's open source and doesn't require registration or license key.\n\nFor more information on how to build and run this sample please check [samples/c++/benchmark](samples/c++/benchmark/README.md).\n\n\u003ca name=\"sample-application-recognizer-others\"\u003e\u003c/a\u003e\n### Recognizer (Others) ###\nThis is a command line application used to detect and recognize a license plate from any JPEG/PNG/BMP image.\n\nFor more information on how to build and run this sample please check [samples/c++/recognizer](samples/c++/recognizer/README.md).\n\n\u003ca name=\"using-the-cpp-api-others\"\u003e\u003c/a\u003e\n## Using the C++ API ##\nThe C++ API is defined at https://www.doubango.org/SDKs/credit-card-ocr/docs/cpp-api.html.\n\n```cpp\n\t#include \u003cultimateCreditCard-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/credit-card-ocr/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\"\"\n\t\"\\\"detect_roi\\\": [0, 0, 0, 0],\"\n\t\"\\\"detect_minscore\\\": 0.5,\"\n\t\"\"\n\t\"\\\"recogn_minscore\\\": 0.2,\"\n\t\"\\\"recogn_score_type\\\": \\\"min\\\"\"\n\t\"}\";\n\n\t// Local variable\n\tUltCreditCardSdkResult result;\n\n\t// Initialize the engine (should be done once)\n\tULTCCARD_SDK_ASSERT((result = UltCreditCardSdkEngine::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\tULTCCARD_SDK_ASSERT((*result_ = UltCreditCardSdkEngine::process(\n\t\t\tULTCCARD_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\tULTCCARD_SDK_ASSERT((result = UltCreditCardSdkEngine::deInit()).isOK());\n```\n\nAgain, please check the [sample applications](#sample-applications-others) for more information on how to use the API.\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%2Fultimatecreditcard-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoubangotelecom%2Fultimatecreditcard-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoubangotelecom%2Fultimatecreditcard-sdk/lists"}