{"id":29022943,"url":"https://github.com/ollycassidy13/captcha","last_synced_at":"2026-04-29T09:02:26.392Z","repository":{"id":299798089,"uuid":"1003041162","full_name":"ollycassidy13/CAPTCHA","owner":"ollycassidy13","description":"Python toolflow to pass CAPTCHA tests","archived":false,"fork":false,"pushed_at":"2025-06-18T10:12:37.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-18T11:25:08.211Z","etag":null,"topics":["captcha","captcha-solver","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ollycassidy13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2025-06-16T14:28:37.000Z","updated_at":"2025-06-18T10:12:40.000Z","dependencies_parsed_at":"2025-06-18T11:35:31.864Z","dependency_job_id":null,"html_url":"https://github.com/ollycassidy13/CAPTCHA","commit_stats":null,"previous_names":["ollycassidy13/captcha"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ollycassidy13/CAPTCHA","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollycassidy13%2FCAPTCHA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollycassidy13%2FCAPTCHA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollycassidy13%2FCAPTCHA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollycassidy13%2FCAPTCHA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ollycassidy13","download_url":"https://codeload.github.com/ollycassidy13/CAPTCHA/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ollycassidy13%2FCAPTCHA/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261990351,"owners_count":23241188,"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","captcha-solver","tensorflow"],"created_at":"2025-06-26T03:04:21.929Z","updated_at":"2026-04-29T09:02:26.328Z","avatar_url":"https://github.com/ollycassidy13.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔓 CAPTCHA Breaker\n\n\u003cdiv align=\"center\"\u003e\n\n![Python](https://img.shields.io/badge/python-v3.10+-blue.svg)\n![TensorFlow](https://img.shields.io/badge/TensorFlow-v2.10+-orange.svg)\n![License](https://img.shields.io/badge/license-MIT-green.svg)\n![GPU](https://img.shields.io/badge/GPU-Accelerated-brightgreen.svg)\n\n*Breaking CAPTCHAs with 98%+ accuracy using Convolutional Recurrent Neural Networks and CTC loss*\n\u003c/div\u003e\n\n---\n\n## 🌟 Headlines\n\n- **🎯 98%+ character accuracy** on synthetic CAPTCHAs\n- **⚡ GPU-accelerated training** with mixed precision\n- **🔄 End-to-end pipeline** from data generation to deployment\n- **🧠 Full CTC evaluation** \n- **🎨 Synthetic data generation** - no manual labeling required\n\n## 🚀 Quick Start\n\nGet up and running in minutes:\n\n### 1️⃣ Install Dependencies\n```bash\npip install tensorflow tensorflow-addons omegaconf hydra-core tqdm matplotlib captcha pillow\n```\n\n### 2️⃣ Generate Training Data\n```bash\npython generate_synthetic_dataset.py -n 20000\n```\n*Creates 20,000 synthetic CAPTCHA images like `ABC123_001.png`*\n\n### 3️⃣ Train the Model\n```bash\npython train.py\n```\n*Auto-detects GPU based on TensorFlow, trains with mixed precision, saves best model*\n\n### 4️⃣ Test Your Model\n```bash\npython evaluate.py\npython predict.py path/to/your/captcha.png\n```\n\n\n---\n\n## 📖 How It Works\n\n### 🧠 The Architecture\n\nOur CRNN (Convolutional Recurrent Neural Network) combines three powerful components:\n\n```\n📸 CAPTCHA Image → 🔍 CNN Feature Extractor → 🔄 Bidirectional LSTM → 📝 CTC Decoder → ✨ Text Output\n```\n\n#### 1. **CNN Backbone** 🔍\n- ResNet-inspired feature extractor\n- Batch normalization + ReLU activation\n- Progressive max pooling for spatial reduction\n- Converts images to rich feature representations\n\n#### 2. **Sequence Modeling** 🔄\n- **Bidirectional LSTM layers** capture left-to-right AND right-to-left context\n- Handles variable-length sequences automatically\n- Dropout prevents overfitting\n\n#### 3. **CTC Magic** ✨\n- **Connectionist Temporal Classification** eliminates need for character-level alignment\n- Handles variable-length outputs elegantly\n- Proper decoding removes duplicates and blank tokens\n\n### 🎯 Why CTC is Crucial\n\n**❌ Traditional Approach:**\n```\nRequires: [A][B][C][1][2][3] ← Exact alignment needed\n```\n\n**✅ CTC Approach:**\n```\nHandles: [A][A][_][B][C][_][1][2][3][3][_] ← Automatic alignment\n         ↓ CTC Decoding ↓\nOutput:  ABC123\n```\n\n---\n\n## 🎯 Results \u0026 Performance\n\n### 📊 Accuracy Metrics\n\n| Metric | Score | Description |\n|--------|-------|-------------|\n| **Character Accuracy** | 99.3% | Individual character recognition |\n| **Sequence Accuracy** | 97.9% | Complete CAPTCHA solved correctly |\n| **Training Time** | \u003c1 hour | On RTX 3050 (mixed precision) |\n| **Inference Speed** | ~10ms | Per image on GPU |\n\n### 🏆 Benchmarks\n\n**Training Performance:**\n- **Dataset:** 20,000 synthetic CAPTCHAs\n- **Convergence:** 20-40 epochs (early stopping)\n- **Memory Usage:** ~2GB GPU memory\n- **Speed:** 40% faster with mixed precision\n\n### 📈 Learning Curves\n\nThe model typically shows:\n- Rapid initial learning (epochs 1-10)\n- Gradual improvement (epochs 10-30)\n- Convergence with early stopping\n\n---\n\n### 🐛 Troubleshooting\n\n**Common Issues:**\n\n1. **CUDA out of memory:**\n   ```yaml\n   # Reduce batch size in config.yaml\n   batch_size: 64  # or 32\n   ```\n\n2. **Mixed precision errors:**\n   ```yaml\n   # Disable for older GPUs\n   mixed_precision: false\n   ```\n\n---\n\n## 📜 License\n\nThis project is licensed under the **MIT License** - see [LICENSE.txt](LICENSE.txt) for details.\n\n**TL;DR:** Use it freely for educational and commercial purposes! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follycassidy13%2Fcaptcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Follycassidy13%2Fcaptcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Follycassidy13%2Fcaptcha/lists"}