{"id":23084726,"url":"https://github.com/hari9-9/captcha-solver","last_synced_at":"2026-04-15T07:32:40.016Z","repository":{"id":267207176,"uuid":"900538793","full_name":"hari9-9/Captcha-Solver","owner":"hari9-9","description":"A Scalable CAPTCHA solving Solution using CNN's","archived":false,"fork":false,"pushed_at":"2024-12-09T02:27:50.000Z","size":67,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T15:12:58.923Z","etag":null,"topics":["captcha-solver","deep-neural-networks","scalability","tensorflow","tf-lite"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hari9-9.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-09T02:04:46.000Z","updated_at":"2025-01-27T16:54:52.000Z","dependencies_parsed_at":"2025-05-03T08:30:34.100Z","dependency_job_id":null,"html_url":"https://github.com/hari9-9/Captcha-Solver","commit_stats":null,"previous_names":["hari9-9/captcha-solver"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hari9-9/Captcha-Solver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hari9-9%2FCaptcha-Solver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hari9-9%2FCaptcha-Solver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hari9-9%2FCaptcha-Solver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hari9-9%2FCaptcha-Solver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hari9-9","download_url":"https://codeload.github.com/hari9-9/Captcha-Solver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hari9-9%2FCaptcha-Solver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259777939,"owners_count":22909758,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["captcha-solver","deep-neural-networks","scalability","tensorflow","tf-lite"],"created_at":"2024-12-16T16:42:57.563Z","updated_at":"2025-10-25T05:46:33.689Z","avatar_url":"https://github.com/hari9-9.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CAPTCHA Solver: A Scalable and Efficient Approach\n\n## Overview\nThis project focuses on building a scalable CAPTCHA solving system capable of identifying text-based CAPTCHAs with varying character lengths (1 to 6) and diverse fonts. Using a modular approach,implemented and trained seven deep learning models: one for predicting CAPTCHA length and six specialized for CAPTCHA classification based on length.\n\nThe project emphasizes scalability by leveraging TensorFlow Lite (TFLite) for efficient deployment on resource-constrained devices like Raspberry Pi, ensuring fast and accurate CAPTCHA classification.\n\n---\n\n## Features\n- **Scalable Design:** Utilizes a modular seven-model architecture to handle variable CAPTCHA lengths efficiently.\n- **Font Robustness:** Models trained on datasets containing diverse fonts to improve generalization.\n- **Efficient Deployment:** Conversion of TensorFlow models to TFLite format ensures compatibility with edge devices like Raspberry Pi.\n- **High Performance:** Employs preprocessing and optimized training configurations to achieve high accuracy and efficient resource utilization.\n\n---\n\n## Architecture\nThe system is based on a **divide-and-conquer** approach, where:\n1. **Length Prediction Model:** Predicts the length of the CAPTCHA.\n2. **Classification Models:** Six specialized models classify CAPTCHAs for lengths 1 through 6.\n\n### Key Components\n- **Data Preprocessing:** Explored various preprocessing techniques, with the best configuration enhancing image clarity and model performance.\n- **Training Models:** Each model trained on datasets specific to its target length for optimized performance.\n- **Font Handling:** Included images of all font variations in training datasets to ensure robustness.\n\n### Training Configuration\n- **Epochs:** 20\n- **Batch Size:** 64\n- **Early Stopping:** Enabled to prevent overfitting.\n\n### Dataset\n- Generated 64,000 images for training each model (90/10 train-test split).\n- Data preprocessing included thresholding and noise removal to enhance input quality.\n\n---\n\n## TensorFlow Lite Conversion\nTo ensure scalability and compatibility with resource-constrained environments:\n1. **Model Conversion:** TensorFlow models were converted to TFLite format.\n2. **Quantization (Optional):** Experimented with quantized models for faster inference, though with reduced accuracy.\n\nThe TFLite models were deployed on a Raspberry Pi, achieving efficient classification within acceptable time limits.\n\n---\n\n## Scalability\n- **Local vs. Edge Computing:** Training was performed on local machines with GPU acceleration, while inference was executed on Raspberry Pi using TFLite models.\n- **Performance Metrics:** The system demonstrated high computational efficiency on edge devices:\n  - **Classification Time:** ~900 seconds for 4,000 images.\n  - **Resource Utilization:** Optimal use of CPU cores and memory during inference.\n\n---\n\n## Results\n- **Score:** 2249/4000\n- **Deployment Metrics:**\n  - Classification time on Raspberry Pi: ~900 seconds.\n  - Efficient model loading and prediction pipeline reduced resource usage and processing time.\n\n---\n\n## Future Work\n- **Optimized Multithreading:** To enhance classification speed on Raspberry Pi.\n- **Advanced Preprocessing:** Explore image segmentation and additional preprocessing techniques.\n- **Quantization-aware Training:** Improve TFLite model performance without significant accuracy loss.\n\n\n\n---\n\n## How to Use\n- Run length_model training length_model_train.py\n- Run cpatha_model/process.sh to automatically generate model for all six lengths\n- Pi/ folder has tf to tf_lite converter and classifier files\n   \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhari9-9%2Fcaptcha-solver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhari9-9%2Fcaptcha-solver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhari9-9%2Fcaptcha-solver/lists"}