Skip to main content

Open source Python Deep Learning low-code library for generating captcha image recognition models
🚀pip install CaptchaCracker --upgrade

PyPI Latest Release Downloads

한국어 문서


CaptchaCracker

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

Web Demo

Integrated into Huggingface Spaces 🤗 using Gradio. Try out the Web Demo: Hugging Face Spaces


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
import CaptchaCracker as cc

# Training image data path
train_img_path_list = glob.glob("../data/train_numbers_only/*.png")

# Training image data size
img_width = 200
img_height = 50

# Creating an instance that creates a model
CM = cc.CreateModel(train_img_path_list, img_width, img_height)

# Performing model training
model = CM.train_model(epochs=100)

# Saving the weights learned by the model to a file
model.save_weights("../model/weights.h5")

Load a saved model to make predictions

import CaptchaCracker as cc

# Target image data size
img_width = 200
img_height = 50
# Target image label length
max_length = 6
# Target image label component
characters = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'}

# Model weight file path
weights_path = "../model/weights.h5"
# Creating a model application instance
AM = cc.ApplyModel(weights_path, img_width, img_height, max_length, characters)

# Target image path
target_img_path = "../data/target.png"

# Predicted value
pred = AM.predict(target_img_path)
print(pred)

References


Contributors


Release files for CaptchaCracker 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CaptchaCracker 0.0.7
File Size Uploaded
CaptchaCracker-0.0.7.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CaptchaCracker 0.0.7
File Interpreter ABI Platform
CaptchaCracker-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size:14.1 kB

Release files / CaptchaCracker-0.0.7.tar.gz

Download URL CaptchaCracker-0.0.7.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1f813927c51e4a609b2ef5b5cb4081e034a271c4ca942acfd3ca929ce4bc08b3
BLAKE2b-256 checksum
How to use checksums
ddee2e0c7f7f6c9eb6b16d8dd8fe20d30324398209c9ac085d098e5fb955f85a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / CaptchaCracker-0.0.7-py3-none-any.whl

Download URL CaptchaCracker-0.0.7-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e21adf44dffe0daf6f3c07a0378582d26aaf8e8f7243ecea628de3b9f3f68a3
BLAKE2b-256 checksum
How to use checksums
ba4889897109f6b6aae28e195859fb5ef84087a0ee4b5d3f0f3a4c7a0577c834
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page