Skip to content

daletoniris/captcha-solver-ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CAPTCHA Solver with Machine Learning

Multiple approaches to automated CAPTCHA solving using computer vision and deep learning. Built as a research project exploring different ML strategies for visual recognition challenges.

TensorFlow Python OpenCV

Approaches

1. Selenium + Object Detection (selenium_approach/)

Automated browser interaction with TensorFlow-based CAPTCHA detection:

  • captchacrack.py — Headless Chrome + TF frozen graph for real-time CAPTCHA solving
  • captchacrack2.py — Improved version with better image preprocessing
  • anatomia-captcha.py — CAPTCHA anatomy analysis and segmentation

2. CNN Classification (cnn_model/)

Custom Convolutional Neural Network for character-level CAPTCHA recognition:

  • captcha_model.py — CNN architecture definition
  • captcha_train.py — Training pipeline with multi-GPU support
  • captcha_eval.py — Model evaluation
  • captcha_gen_default.py — Synthetic CAPTCHA generation for training data
  • captcha_recognize.py — Inference script

3. Letter Extraction + Classification (letter_extraction/)

Segment-then-classify approach:

  • extract_single_letters_from_captchas.py — Image segmentation to isolate individual characters
  • helpers.py — Preprocessing utilities (resize, threshold, contour detection)

Pipeline

┌─────────────┐     ┌──────────────────┐     ┌───────────────┐
│  CAPTCHA     │────▶│  Preprocessing   │────▶│  Recognition  │
│  Image       │     │  - Threshold     │     │  - CNN model  │
│              │     │  - Segmentation  │     │  - TF detect  │
└─────────────┘     │  - Contours      │     │  - Letter OCR │
                     └──────────────────┘     └───────────────┘

Requirements

tensorflow>=1.13
opencv-python
selenium
beautifulsoup4
pillow
numpy

Disclaimer: This project was built for educational and research purposes to understand ML-based visual recognition. Use responsibly.

Year

2019–2020

About

Multiple ML approaches to CAPTCHA solving: CNN, Selenium+TF detection, letter extraction

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages