All Projects → xmfbit → captcha-recognition

xmfbit / captcha-recognition

Licence: other
End-to-end captcha image recognition using PyTorch and CTC loss binding.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to captcha-recognition

Captcha break
验证码识别
Stars: ✭ 2,268 (+7720.69%)
Mutual labels:  captcha, ctc-loss
mCaptcha
A no-nonsense CAPTCHA system with seamless UX | Backend component
Stars: ✭ 473 (+1531.03%)
Mutual labels:  captcha
Captcha-Cracking
Crack number and Chinese captcha with both traditional and deep learning methods, based on Torch and python.
Stars: ✭ 35 (+20.69%)
Mutual labels:  captcha
scp-079-captcha
Provide challenges for newly joined members
Stars: ✭ 52 (+79.31%)
Mutual labels:  captcha
captcha-canvas
A captcha generator by using skia-canvas.
Stars: ✭ 40 (+37.93%)
Mutual labels:  captcha
antirobot aiogram
Телеграм бот для блокировки спама
Stars: ✭ 26 (-10.34%)
Mutual labels:  captcha
simple-recaptcha-v3
🤖 This repository contains simple reCAPTCHA v3 integration for your Laravel application.
Stars: ✭ 25 (-13.79%)
Mutual labels:  captcha
Captcha
.net core Captcha Service
Stars: ✭ 38 (+31.03%)
Mutual labels:  captcha
Raid-Protect-Discord-Bot
A Discord Bot that allows you to protect your Discord server with captcha, anti profanity, anti nudity image, anti spam, account age required, logs...
Stars: ✭ 182 (+527.59%)
Mutual labels:  captcha
Server-Captcha
Protect Your Server From Automated Bots With Captcha Now !
Stars: ✭ 18 (-37.93%)
Mutual labels:  captcha
CapMonsterCloud
a C# wrapper for CapMonster Cloud API
Stars: ✭ 17 (-41.38%)
Mutual labels:  captcha
ddddocr
带带弟弟 通用验证码识别OCR pypi版
Stars: ✭ 4,093 (+14013.79%)
Mutual labels:  captcha
ocr api server
使用ddddocr的最简api搭建项目,支持docker
Stars: ✭ 222 (+665.52%)
Mutual labels:  captcha
wp-recaptcha-integration
WordPress reCaptcha integration supporting Ninja Forms and Contact Form 7
Stars: ✭ 50 (+72.41%)
Mutual labels:  captcha
esaj
Scrapers for many e-SAJ systems
Stars: ✭ 35 (+20.69%)
Mutual labels:  captcha
RARBG-scraper
With Selenium headless browsing and CAPTCHA solving
Stars: ✭ 38 (+31.03%)
Mutual labels:  captcha
DNTCaptcha.Core
DNTCaptcha.Core is a captcha generator and validator for ASP.NET Core applications
Stars: ✭ 181 (+524.14%)
Mutual labels:  captcha
EasyShiro
基于 RBAC 模型功能全面的 Shiro 安全集成&简化&扩展组件。Shiro integration & simplifies & Extension component based RBAC
Stars: ✭ 47 (+62.07%)
Mutual labels:  captcha
CAPTCHA Reader
🐝 PHP 验证码识别与训练 脚手架
Stars: ✭ 142 (+389.66%)
Mutual labels:  captcha
captcha.js
Captcha in Node.js
Stars: ✭ 23 (-20.69%)
Mutual labels:  captcha

Captcha Recognition

This repo is a demo for how to use warpctc in PyTorch to recognize captcha in images.

Warpctc PyTorch Binding

Baidu's warpctc project is a famous library to compute CTC loss. It's writen by C++11, which makes it easy to bind warpctc with other deep learning framework, such as MXNet and PyTorch.

There is a warpctc binding for Caffe. Here, we use warpctc binding for PyTorch.

Install WarpCTC binding for PyTorch

Please refer to this page: deepspeech.pytorch to install WarpCTC binding for PyTorch first.

Generate Data

The python package captcha is used to generate dataset for training and testing.

You can use python generate_captcha.py to generate the captcha images. The default data folder is $PROJECT_DIR/data. If you want to specific another one, you need to modify the variable DATASET_PATH in utils.py.

Train

The neural network is a stacked LSTM. See model.py for detail. neural network

To train the model, run the following command:

python main.py

If tensorboard has been installed, a logging event file will be generated in the folder $PROJECT_DIR/log, which can be used to visualize the training process using tensorboard command of TensorFlow.

train loss

train accuracy

test accuracy

The testing accuracy may be weird because a global step is used, which leads to a larger logging interval for testing, comparing with training.

During the training process, it will save checkpoint every 10 epochs. The default folder to save the checkpoints is $PROJECT_DIR/pretrained

Test

When the training is done, you can check the trained model using this command:

python test.py test_image_path trained_model_path

The output are two figures, showing the probabilities of different digits vs column. demo

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].