Skip to content

shallowManica/PyTorch_CAPTCHA_Recognition

Repository files navigation

PyTorch CAPTCHA Recognition

Overview

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.

Features

  • 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.

Installation

To get started with, follow these steps:

  1. Clone the repository:

    git clone https://github.com/shallowManica/pytorch-recognition.git
    cd pytorch-recognition
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate   # On Windows use `venv\Scripts\activate`
  3. Install the required dependencies:

    pip install -r requirements.txt

Usage

Generating CAPTCHA Images

To generate CAPTCHA images for training, run:

python captcha_gen.py

Training the Model

To train the model, use the following command:

python captcha_train.py

Testing the Model

To test the model's accuracy, run:

python captcha_test.py

Predicting CAPTCHA

For inference, use:

python captcha_predict.py

Directory Structure

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

Releases

No releases published

Packages

No packages published

Languages