{ "info": { "author": "Abdullah Selek", "author_email": "abdullahselek@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "mocr\n======\n\n.. image:: https://img.shields.io/pypi/v/mocr.svg\n :target: https://pypi.org/pypi/mocr/\n\n.. image:: https://img.shields.io/pypi/pyversions/mocr.svg\n :target: https://pypi.org/project/mocr\n\n.. image:: https://travis-ci.org/verifid/mocr.svg?branch=master\n :target: https://travis-ci.org/verifid/mocr\n\n.. image:: https://codecov.io/gh/verifid/mocr/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/verifid/mocr\n\n\nMeaningful Optical Character Recognition from identity cards with Deep Learning.\n\nIntroduction\n============\n\n**mocr** is a library that can be used to detect meaningful optical characters from identity cards. Code base is pure ``Python`` and\nworks with 2.7 and most of the 3.x versions. It has some low level dependencies such as ``Tesseract``. **mocr** uses a pre-trained east\ndetector with OpenCV and applies it's Deep Learning techniques.\n\nIt has a pre-trained east detector inside the module and a custom trained model can be given as a parameter.\n\nPrerequisites\n=============\n\n* `Tessaract `_ must be installed on your computer before using OCR. Please check `installation link `_ for details.\n* The other dependencies are listed on ``requirements.txt`` and will be installed when you install with pip.\n\nInstallation\n============\n\n**From source**\n\nInstall module using `pip`::\n\n $ pip install mocr\n\nDownload the latest `mocr` library from: https://github.com/verifid/mocr\n\nInstall module using `pip`::\n\n $ pip install -e .\n\nExtract the source distribution and run::\n\n $ python setup.py build\n $ python setup.py install\n\nRunning Tests\n=============\n\nThe test suite can be run against a single Python version which requires ``pip install pytest`` and optionally ``pip install pytest-cov`` (these are included if you have installed dependencies from ``requirements.testing.txt``)\n\nTo run the unit tests with a single Python version::\n\n $ py.test -v\n\nto also run code coverage::\n\n $ py.test -v --cov-report html --cov=mocr\n\nTo run the unit tests against a set of Python versions::\n\n $ tox\n\nSample Usage\n============\n\n* ``text_recognition`` Initiating the ``TextRecognizer`` with identity image and then finding the texts with their frames:\n\n.. code:: python\n\n import os\n from mocr import TextRecognizer\n\n image_path = os.path.join('tests', 'data/sample_uk_identity_card.png')\n east_path = os.path.join('mocr', 'model/frozen_east_text_detection.pb')\n\n text_recognizer = TextRecognizer(image_path, east_path)\n (image, _, _) = text_recognizer.load_image()\n (resized_image, ratio_height, ratio_width, _, _) = text_recognizer.resize_image(image, 320, 320)\n (scores, geometry) = text_recognizer.geometry_score(east_path, resized_image)\n boxes = text_recognizer.boxes(scores, geometry)\n results = text_recognizer.get_results(boxes, image, ratio_height, ratio_width)\n\n # results: Meaningful texts with bounding boxes\n\n* ``face_detection``:\n\n.. code:: python\n\n from mocr import face_detection\n\n image_path = 'YOUR_IDENTITY_IMAGE_PATH'\n face_image = face_detection.detect_face(image_path)\n # face_image is the byte array detected and cropped image from original image\n\nCLI\n===\n\nSample command line usage\n\n* Optical Character Recognition\n\n.. code::\n\n python -m mocr --image tests/data/sample_uk_identity_card.png --east tests/model/frozen_east_text_detection.pb\n\n* Face detection\n\n.. code::\n\n python -m mocr --image-face 'tests/data/sample_de_identity_card.jpg'\n\nScreenshots\n-----------\n\n**Before**\n\n|image_before|\n\n**After**\n\n|image_after|\n\n.. |image_before| image:: https://raw.githubusercontent.com/verifid/mocr/master/screenshots/sample_uk_identity_card.png\n.. |image_after| image:: https://raw.githubusercontent.com/verifid/mocr/master/screenshots/uk_identity_card_after_detection.png\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://pypi.org/project/mocr/", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/verifid/mocr", "keywords": "ocr,optical character recognition,identity card,deep learning,opencv,meaningful", "license": "MIT License", "maintainer": "Abdullah Selek", "maintainer_email": "abdullahselek@gmail.com", "name": "mocr", "package_url": "https://pypi.org/project/mocr/", "platform": "Any", "project_url": "https://pypi.org/project/mocr/", "project_urls": { "Download": "https://pypi.org/project/mocr/", "Homepage": "https://github.com/verifid/mocr" }, "release_url": "https://pypi.org/project/mocr/0.2.1/", "requires_dist": [ "opencv-python", "opencv-contrib-python", "pillow", "pytesseract", "imutils", "numpy" ], "requires_python": "", "summary": "Meaningful Optical Character Recognition from identity cards with Deep Learning.", "version": "0.2.1" }, "last_serial": 5606185, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d531c7ea74c0de51ac1f64e886b1d1be", "sha256": "d9ef09b619c3c69f47e90deffa500136535f3460cc7ca5c5bf9a50294c8ab043" }, "downloads": -1, "filename": "mocr-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d531c7ea74c0de51ac1f64e886b1d1be", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5741, "upload_time": "2018-12-03T18:57:33", "url": "https://files.pythonhosted.org/packages/9a/3e/d765f890753a0931b69add351d233ba5f1df77415a41ba78888ef9584ff6/mocr-0.1-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "22d87eee081d50c34b525dfc85eaafb4", "sha256": "da0879cca6e913ac2b74e37178a9333f3acc2a145cfb7e7cb7634f924c63c1ce" }, "downloads": -1, "filename": "mocr-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "22d87eee081d50c34b525dfc85eaafb4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6779, "upload_time": "2018-12-09T20:51:35", "url": "https://files.pythonhosted.org/packages/37/19/40fb807c96e3f1eb529ebcd502a661348b3a3024e6b780e95278572bb879/mocr-0.1.1-py2.py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "879d720c5effeb93ff9bea7a2a7d34f7", "sha256": "8909d46dd1839b884542ce125ac3d1b29c0cf31fdcb520425f9b9a3ba1a8d247" }, "downloads": -1, "filename": "mocr-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "879d720c5effeb93ff9bea7a2a7d34f7", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 145451, "upload_time": "2019-02-27T18:12:28", "url": "https://files.pythonhosted.org/packages/9f/bc/a01fbc9e9a0841412dc8462afaf7d68a8314a088b30af39dd30c6b8d2698/mocr-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4d1db89a945d145a1107031f2cdf2e54", "sha256": "4ade83da67fe5e50c77bd7e026edb7adbb2aa72fef56dc923db7b54ee078b532" }, "downloads": -1, "filename": "mocr-0.2.0.tar.gz", "has_sig": false, "md5_digest": "4d1db89a945d145a1107031f2cdf2e54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 144002, "upload_time": "2019-02-27T18:12:31", "url": "https://files.pythonhosted.org/packages/db/86/389a4213da1b4f8e136d2bc65e8e12bf91f8c89f665960449ba0653d09ed/mocr-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "ebebce4fc2770382b8572ddd70118d70", "sha256": "2a4fb243078ca2d1f931b230faeb9b388e586316ac21baf3c5ec383e73064cb2" }, "downloads": -1, "filename": "mocr-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ebebce4fc2770382b8572ddd70118d70", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 143862, "upload_time": "2019-07-30T07:08:43", "url": "https://files.pythonhosted.org/packages/5a/5c/a4275e5cb29a043b26b253767e5ae736be1b3fb12ce9ad0f875fb7fb0597/mocr-0.2.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ebebce4fc2770382b8572ddd70118d70", "sha256": "2a4fb243078ca2d1f931b230faeb9b388e586316ac21baf3c5ec383e73064cb2" }, "downloads": -1, "filename": "mocr-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ebebce4fc2770382b8572ddd70118d70", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 143862, "upload_time": "2019-07-30T07:08:43", "url": "https://files.pythonhosted.org/packages/5a/5c/a4275e5cb29a043b26b253767e5ae736be1b3fb12ce9ad0f875fb7fb0597/mocr-0.2.1-py2.py3-none-any.whl" } ] }