Skip to main content

CaptchaCracker is an open source Python library that provides functions to create and apply deep learning models for Captcha Image recognition.

Project description

CaptchaCracker

Linkedin Badge

한국어 문서

Introduction

CaptchaCracker is an open source Python library that provides functions to create and apply deep learning models for Captcha Image recognition. You can create a deep learning model that recognizes numbers in the Captcha Image as shown below and outputs a string of numbers, or you can try the model yourself.

Input

png

Output

023062

Installation

pip install CaptchaCracker

Dependency

pip install numpy==1.19.5 tensorflow==2.5.0

Examples

Train and save the model

Before executing model training, training data image files in which the actual value of the Captcha image is indicated in the file name should be prepared as shown below.

png

import glob
from CaptchaCracker import CreateModel

train_img_path_list = glob.glob("../data/train_numbers_only/*.png")

CM = CreateModel(train_img_path_list)
model = CM.train_model(epochs=100)
model.save_weights("../model/weights.h5")

Load a saved model to make predictions

from CaptchaCracker import ApplyModel

weights_path = "../model/weights.h5"
AM = ApplyModel(weights_path)

target_img_path = "../data/target.png"
pred = AM.predict(target_img_path)
print(pred)

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CaptchaCracker-0.0.3.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

CaptchaCracker-0.0.3-py3-none-any.whl (6.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page