Welcome to Crazy-OCR! π Your one-stop destination for all your Optical character recognition(OCR) needs. This repository contains a robust and versatile OCR pipeline I developed while working on ID Cards for KYC. Feel free to explore, clone, or fork!
This repository houses a comprehensive set of OCR tools that I developed, including (but not limited to) the following features:
- Deskewing π - A useful tool for aligning images for better analysis.
- Edge detection π - An algorithm designed to detect and highlight edges in your image.
- Contour Detection βΏ - A feature that detects and isolates contours in your image.
- Rotation β»οΈ - A handy tool to adjust the orientation of your images.
- Adaptive Thresholding π - This feature is to adjust the threshold level adaptively to make your image clearer.
- Multi image/file format compatibility π - Accepts and processes a wide variety of file formats for your convenience.
- Regex matching for FIN & DOB π’ - This tool helps in extracting and validating Financial Information Numbers (FIN) and Date of Birth (DOB) details.
- Interactive Morphing β¨ - A feature to interactively morph your images.
- Interactive Image Intensity correction π‘ - An interactive tool to correct the intensity of your image for better visibility.
- Angle Correction ποΈ - This feature corrects any angular distortions in your images.
- Auto Deskew looping through an entire folder of images π - Automates the deskewing process for a whole folder of images.
- ID CARD Image preprocessing π³ - A specific tool designed for pre-processing of ID card images.
All the files are extensively commented for your better understanding. Please refer to the code comments to know more about how specific files work. π
Clone this repository to your local machine and run the scripts according to your requirements. Each script is independent and self-explanatory. Just make sure you have the required dependencies installed! If you have any issues, feel free to open an issue. π
Here's a brief overview of the various scripts in the repository:
common.py
: π§ - Commonly used functions and utilities.crop_id_card_using_edge_contour_detection.py
: βοΈ - Script to crop ID cards using edge and contour detection techniques.deskew_image_from_AC20_C20.py
: π - A dedicated script to deskew images sourced from AC20_C20.deskew_image_rotate_loop.py
: π - Script for deskewing and rotating images in a loop.deskew_loop_image_folder.py
: π - A utility for deskewing all images in a given folder.id_card_detection_camera.py
: π· - Script to detect ID cards using a camera.id_card_dob_extractor.py
: π - A tool to extract DOB from ID cards.id_card_expiry_date_extractor.py
: π - Extracts the expiry date from ID cards.image_blurriness_detection.py
: π - An image quality analysis tool focused on blurriness detection.image_deskewer.py
: π - A utility for deskewing single images.interactive_image_morphing.py
: β¨ - A tool for interactively morphing images.loop_through_morphed_images.py
: π - Utility to loop through morphed images.morphology_operations.py
: βΏ - Perform morphology operations for image processing.pdf2jpg.py
: β‘οΈ - Utility to convert PDF files to JPG.pdf_page_extractor.py
: π€ - A script to extract specific pages from PDF files.photo_collage_maker.py
: :frame_photo: - A fun utility to create photo collages.preprocess_image.py
: π¨ - A script for preliminary image processing.rotate_image_certain_angle.py
: π - A utility to rotate images by a specified angle.show_image.py
: πΌοΈ - A script to display images.
Each file is extensively commented for better understanding. Refer to the code comments to know more about how specific files work. π
Contributions are always welcomed. π If you have some ideas or improvements, feel free to make a pull request or open an issue to discuss it.
This project is licensed under the MIT License - see the LICENSE file for details.
I would like to thank my colleagues and everyone who contributed to making this project possible. β€οΈ
Enjoy using Crazy-OCR! π Happy coding! π»