CaptchaCracker is an open source Python library that provides functions to create and apply deep learning models for Captcha Image recognition.
Project description
CaptchaCracker
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
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.
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.4.tar.gz
(6.1 kB
view hashes)
Built Distribution
Close
Hashes for CaptchaCracker-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1bb6cf922af9199a2f182c3092506ded673e6befd688b2cff95e80ada42f152 |
|
MD5 | 6e8c17ebca800e1935a168d33bbf44bd |
|
BLAKE2b-256 | e587ea2a2562065d438dd9a11bfa26575e5bc7acc5d233e33682c856296fb1b8 |