idvpackage


Nameidvpackage JSON
Version 2.0.18 PyPI version JSON
download
home_pageNone
SummaryThis repository contains a Python program designed to execute Optical Character Recognition (OCR) and Facial Recognition on images.
upload_time2024-12-02 07:14:30
maintainerNone
docs_urlNone
authorFahad Patel
requires_python>=3.7
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Optical Character Recognition (OCR) and Facial Recognition Program
This repository contains a Python program designed to execute Optical Character Recognition (OCR) and Facial Recognition on images.

## Table of Contents
1. Introduction
2. Prerequisites
3. Usage
4. Modules Description

## Introduction
The Python program imports several packages necessary for OCR and facial recognition. It accepts a list of images as input, performs OCR, rotates the images to the busiest rotation, extracts ID information, and performs facial recognition by extracting the biggest face from the images. The program then computes the similarity between the faces and exports the extracted ID information into a JSON file.

## Prerequisites
Ensure the following packages are installed:
cv2
PIL (Image)
easyocr
pandas (pd)
skimage.transform (radon)
regular expressions (re)
datetime
concurrent.futures
NumPy (np)
TensorFlow (tf)
VGG16 model from Keras (tensorflow.keras.applications.vgg16)
tensorflow.keras.preprocessing (image)
scipy.spatial.distance
model_from_json from Keras (tensorflow.keras.models)
subprocess
urllib.request
dlib
time
matplotlib.pyplot
facenet
json
io
importlib.resources
You can install these packages using pip:

pip install opencv-python Pillow easyocr pandas scikit-image regex datetime concurrent.futures numpy tensorflow dlib matplotlib facenet-pytorch jsonpickle importlib_resources

Note: Keras and the VGG16 model come with TensorFlow, so there is no need to install them separately.

## Usage
To use this program, you can clone the repository, place your images in the same directory and modify the IMAGES list accordingly. Run the program in your terminal or command prompt as:
python ocr_and_facial_recognition.py

Please note that this program does not include any user interface and does not handle any errors or exceptions beyond what is included in the code.

## Modules Description
Importing Necessary Packages:
The program begins by importing all the necessary packages used in the OCR and Facial recognition steps.

## Data Introduction:
This section defines a list of image file names that will be used as input for the OCR and facial recognition steps of the program.

## Load easyocr and Anti-Spoofing Model:
Two functions to load the easyOCR package with English language support and the anti-spoofing model respectively.

## Data Preprocessing:
Several functions are defined here to open and read an image file, convert it to grayscale, perform a radon transform, find the busiest rotation, and rotate the image accordingly.

## Facial recognition:
This section is dedicated to detecting faces in an image using a HOG (Histogram of Oriented Gradients) face detector, extracting features, and computing the similarity between two sets of features using the cosine similarity metric.

## Information Extraction:
Finally, the program uses OCR to extract information from an image, computes the similarity between faces in different images, and outputs this information in a JSON file.

Please refer to the source code comments for more detailed explanations.

This is a basic explanation of the project and its usage. This project was last updated on 24th May 2023 and does not have any GUI or error handling beyond what is included in the code. For more details, please refer to the comments in the source code.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "idvpackage",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Fahad Patel",
    "author_email": "fahadpatel1403@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/65/01/f893183e52f7273ef1f05660dd939d9eb825a841c5ff0362c0c5f2a2d6c6/idvpackage-2.0.18.tar.gz",
    "platform": null,
    "description": "# Optical Character Recognition (OCR) and Facial Recognition Program\nThis repository contains a Python program designed to execute Optical Character Recognition (OCR) and Facial Recognition on images.\n\n## Table of Contents\n1. Introduction\n2. Prerequisites\n3. Usage\n4. Modules Description\n\n## Introduction\nThe Python program imports several packages necessary for OCR and facial recognition. It accepts a list of images as input, performs OCR, rotates the images to the busiest rotation, extracts ID information, and performs facial recognition by extracting the biggest face from the images. The program then computes the similarity between the faces and exports the extracted ID information into a JSON file.\n\n## Prerequisites\nEnsure the following packages are installed:\ncv2\nPIL (Image)\neasyocr\npandas (pd)\nskimage.transform (radon)\nregular expressions (re)\ndatetime\nconcurrent.futures\nNumPy (np)\nTensorFlow (tf)\nVGG16 model from Keras (tensorflow.keras.applications.vgg16)\ntensorflow.keras.preprocessing (image)\nscipy.spatial.distance\nmodel_from_json from Keras (tensorflow.keras.models)\nsubprocess\nurllib.request\ndlib\ntime\nmatplotlib.pyplot\nfacenet\njson\nio\nimportlib.resources\nYou can install these packages using pip:\n\npip install opencv-python Pillow easyocr pandas scikit-image regex datetime concurrent.futures numpy tensorflow dlib matplotlib facenet-pytorch jsonpickle importlib_resources\n\nNote: Keras and the VGG16 model come with TensorFlow, so there is no need to install them separately.\n\n## Usage\nTo use this program, you can clone the repository, place your images in the same directory and modify the IMAGES list accordingly. Run the program in your terminal or command prompt as:\npython ocr_and_facial_recognition.py\n\nPlease note that this program does not include any user interface and does not handle any errors or exceptions beyond what is included in the code.\n\n## Modules Description\nImporting Necessary Packages:\nThe program begins by importing all the necessary packages used in the OCR and Facial recognition steps.\n\n## Data Introduction:\nThis section defines a list of image file names that will be used as input for the OCR and facial recognition steps of the program.\n\n## Load easyocr and Anti-Spoofing Model:\nTwo functions to load the easyOCR package with English language support and the anti-spoofing model respectively.\n\n## Data Preprocessing:\nSeveral functions are defined here to open and read an image file, convert it to grayscale, perform a radon transform, find the busiest rotation, and rotate the image accordingly.\n\n## Facial recognition:\nThis section is dedicated to detecting faces in an image using a HOG (Histogram of Oriented Gradients) face detector, extracting features, and computing the similarity between two sets of features using the cosine similarity metric.\n\n## Information Extraction:\nFinally, the program uses OCR to extract information from an image, computes the similarity between faces in different images, and outputs this information in a JSON file.\n\nPlease refer to the source code comments for more detailed explanations.\n\nThis is a basic explanation of the project and its usage. This project was last updated on 24th May 2023 and does not have any GUI or error handling beyond what is included in the code. For more details, please refer to the comments in the source code.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "This repository contains a Python program designed to execute Optical Character Recognition (OCR) and Facial Recognition on images.",
    "version": "2.0.18",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b1d1bcaec25a8d243be32dd7ecdabb79e868e6bd3b2eacb9cea536612e7d68c9",
                "md5": "80934524a5358d167e16645e96fe3c77",
                "sha256": "8d669500f4ac22910758041ba5c2e0057b392448f4a6f07de5d8e6b6a5ab71d9"
            },
            "downloads": -1,
            "filename": "idvpackage-2.0.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "80934524a5358d167e16645e96fe3c77",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 22342220,
            "upload_time": "2024-12-02T07:14:23",
            "upload_time_iso_8601": "2024-12-02T07:14:23.155097Z",
            "url": "https://files.pythonhosted.org/packages/b1/d1/bcaec25a8d243be32dd7ecdabb79e868e6bd3b2eacb9cea536612e7d68c9/idvpackage-2.0.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6501f893183e52f7273ef1f05660dd939d9eb825a841c5ff0362c0c5f2a2d6c6",
                "md5": "6b20a0d40bf7d51ecdf0d123b0a153c3",
                "sha256": "ff5b167acab698c9939a0f1eee02850deaec5f267d805d044989db5719cbc0de"
            },
            "downloads": -1,
            "filename": "idvpackage-2.0.18.tar.gz",
            "has_sig": false,
            "md5_digest": "6b20a0d40bf7d51ecdf0d123b0a153c3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 22338437,
            "upload_time": "2024-12-02T07:14:30",
            "upload_time_iso_8601": "2024-12-02T07:14:30.243864Z",
            "url": "https://files.pythonhosted.org/packages/65/01/f893183e52f7273ef1f05660dd939d9eb825a841c5ff0362c0c5f2a2d6c6/idvpackage-2.0.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-02 07:14:30",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "idvpackage"
}
        
Elapsed time: 0.41443s