Skip to content

shiroinock/captcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CAPTCHA OCR

PyTorch CRNN model for CAPTCHA recognition.

Model

  • Architecture: CNN + BiLSTM
  • Input: Grayscale image (64x192)
  • Output: 5 characters (a-z, A-Z, 0-9)
  • Validation accuracy: ~80%

Usage

# Setup
python -m venv .venv
source .venv/bin/activate
uv pip install -r pyproject.toml

# Train
python src/train.py --data-dir images

# Analyze errors
python src/analyze_errors.py --model runs/<run_dir>/best_model.pt

Dataset

This project uses the CAPTCHA Dataset from Kaggle.

  • License: CC0 1.0 Universal
  • ~113,000 CAPTCHA images
  • 5 alphanumeric characters per image

Project Structure

captcha/
├── src/
│   ├── model.py          # CRNN model
│   ├── dataset.py        # Dataset & transforms
│   ├── train.py          # Training script
│   └── analyze_errors.py # Error analysis
├── docs/
│   └── STATUS.md         # Project status & roadmap
└── runs/                 # Training artifacts

License

MIT

About

CAPTCHA OCR with PyTorch CRNN model

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages