/ViT-SJTU-captcha

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

VIT-SJTU-captcha

Introduction

A captcha solver for SJTU based on ViT and some preprocessing tricks. The accuracy of character classification is 99.6%.

Getting Started

pip install -r requirements.txt

Usage

Inference

python inference.py --image image.png --model model.pth

Training

python main.py --path dataset

Dataset

The dataset is from here

Preprocessing

  1. Segment the captcha into some images with one character.
  2. Split the dataset into train and test sets.