PyTorch CAPTCHA Recognition is a project aimed at building and training models for CAPTCHA recognition using the PyTorch framework. This repository contains the necessary code, datasets, and instructions to replicate the experiments and results.
- Implementation of a Convolutional Neural Network (CNN) for CAPTCHA recognition.
- Utility scripts for generating CAPTCHA images and testing the model.
- Configurable settings for CAPTCHA generation and model training.
To get started with, follow these steps:
-
Clone the repository:
git clone https://github.com/shallowManica/pytorch-recognition.git cd pytorch-recognition
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
To generate CAPTCHA images for training, run:
python captcha_gen.py
To train the model, use the following command:
python captcha_train.py
To test the model's accuracy, run:
python captcha_test.py
For inference, use:
python captcha_predict.py
pytorch-recognition/
├── captcha_train.py # Script to train models
├── requirements.txt # List of dependencies
├── captcha_cnn_model.py # CNN model definition
├── captcha_gen.py # Script to generate CAPTCHA images
├── captcha_predict.py # Script for CAPTCHA prediction
├── captcha_test.py # Script to test the model
├── captcha_setting.py # CAPTCHA settings
└── README.md # Project documentation