Name | idvpackage JSON |
Version |
2.0.29
JSON |
| download |
home_page | None |
Summary | This repository contains a Python program designed to execute Optical Character Recognition (OCR) and Facial Recognition on images. |
upload_time | 2024-12-19 06:26:26 |
maintainer | None |
docs_url | None |
author | Fahad Patel |
requires_python | >=3.7 |
license | None |
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/85/fd/def1fefa6b38645afca5e345f70303565069c5c88eaf923c8baebf2aca60/idvpackage-2.0.29.tar.gz",
"platform": null,
"description": "# Optical Character Recognition (OCR) and Facial Recognition Program\r\nThis repository contains a Python program designed to execute Optical Character Recognition (OCR) and Facial Recognition on images.\r\n\r\n## Table of Contents\r\n1. Introduction\r\n2. Prerequisites\r\n3. Usage\r\n4. Modules Description\r\n\r\n## Introduction\r\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.\r\n\r\n## Prerequisites\r\nEnsure the following packages are installed:\r\ncv2\r\nPIL (Image)\r\neasyocr\r\npandas (pd)\r\nskimage.transform (radon)\r\nregular expressions (re)\r\ndatetime\r\nconcurrent.futures\r\nNumPy (np)\r\nTensorFlow (tf)\r\nVGG16 model from Keras (tensorflow.keras.applications.vgg16)\r\ntensorflow.keras.preprocessing (image)\r\nscipy.spatial.distance\r\nmodel_from_json from Keras (tensorflow.keras.models)\r\nsubprocess\r\nurllib.request\r\ndlib\r\ntime\r\nmatplotlib.pyplot\r\nfacenet\r\njson\r\nio\r\nimportlib.resources\r\nYou can install these packages using pip:\r\n\r\npip install opencv-python Pillow easyocr pandas scikit-image regex datetime concurrent.futures numpy tensorflow dlib matplotlib facenet-pytorch jsonpickle importlib_resources\r\n\r\nNote: Keras and the VGG16 model come with TensorFlow, so there is no need to install them separately.\r\n\r\n## Usage\r\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:\r\npython ocr_and_facial_recognition.py\r\n\r\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.\r\n\r\n## Modules Description\r\nImporting Necessary Packages:\r\nThe program begins by importing all the necessary packages used in the OCR and Facial recognition steps.\r\n\r\n## Data Introduction:\r\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.\r\n\r\n## Load easyocr and Anti-Spoofing Model:\r\nTwo functions to load the easyOCR package with English language support and the anti-spoofing model respectively.\r\n\r\n## Data Preprocessing:\r\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.\r\n\r\n## Facial recognition:\r\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.\r\n\r\n## Information Extraction:\r\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.\r\n\r\nPlease refer to the source code comments for more detailed explanations.\r\n\r\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.\r\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.29",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e5b50322840f327d529b02c03121d064daab3f862ddca4eced9d7517a7d37b7b",
"md5": "ae733f4793e4d4ceff8b344d0617daf8",
"sha256": "e59bc202388abf34a05f279e6cdec3e7804e3d90c33ed0178e9aa5021778cafb"
},
"downloads": -1,
"filename": "idvpackage-2.0.29-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ae733f4793e4d4ceff8b344d0617daf8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 3467156,
"upload_time": "2024-12-19T06:26:24",
"upload_time_iso_8601": "2024-12-19T06:26:24.160215Z",
"url": "https://files.pythonhosted.org/packages/e5/b5/0322840f327d529b02c03121d064daab3f862ddca4eced9d7517a7d37b7b/idvpackage-2.0.29-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "85fddef1fefa6b38645afca5e345f70303565069c5c88eaf923c8baebf2aca60",
"md5": "e10afd90d84d90d064b1153ed2d1a18f",
"sha256": "a41be829721d745c184c677eeb03400227151f324673709d7b710accb30c60ea"
},
"downloads": -1,
"filename": "idvpackage-2.0.29.tar.gz",
"has_sig": false,
"md5_digest": "e10afd90d84d90d064b1153ed2d1a18f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 3461094,
"upload_time": "2024-12-19T06:26:26",
"upload_time_iso_8601": "2024-12-19T06:26:26.980749Z",
"url": "https://files.pythonhosted.org/packages/85/fd/def1fefa6b38645afca5e345f70303565069c5c88eaf923c8baebf2aca60/idvpackage-2.0.29.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-19 06:26:26",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "idvpackage"
}