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! 💻