# CaptchaCracker
![](https://img.shields.io/badge/TensorFlow-2.5.0-red.svg)
![](https://img.shields.io/badge/NumPy-1.19.5-blue.svg)
[![Linkedin Badge](https://img.shields.io/badge/-WooilJeong-blue?style=plastic&logo=Linkedin&logoColor=white&link=https://www.linkedin.com/in/wooil/)](https://www.linkedin.com/in/wooil/)
[한국어 문서](https://github.com/WooilJeong/CaptchaCracker/blob/main/README-ko.md)
## 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](https://github.com/WooilJeong/CaptchaCracker/raw/main/assets/example01.png)
### Output
```
023062
```
## Installation
```bash
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.
- [Download Sample Dataset](https://github.com/WooilJeong/CaptchaCracker/raw/main/sample.zip)
![png](https://github.com/WooilJeong/CaptchaCracker/raw/main/assets/example02.png)
```python
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
```python
import CaptchaCracker as cc
# Training image data size
img_width = 200
img_height = 50
# Training image label length
max_length = 5
# Training 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
- https://keras.io/examples/vision/captcha_ocr/
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
资源分类:Python库 所属语言:Python 资源全名:CaptchaCracker-0.0.5.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
CaptchaCracker-0.0.5.tar.gz (10个子文件)
CaptchaCracker-0.0.5
PKG-INFO 4KB
CaptchaCracker.egg-info
PKG-INFO 4KB
SOURCES.txt 220B
top_level.txt 15B
dependency_links.txt 1B
setup.cfg 42B
setup.py 792B
README.md 3KB
CaptchaCracker
core.py 13KB
__init__.py 312B
共 10 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于微信小程序的点餐系统源码(高分项目代码)
- YOLOv3 的最小 PyTorch 实现.zip
- python 字符解析 单词表 排版 txt转excel 自动分列
- C++中的`std::move`与`std::forward`:完美转发与移动语义的精髓
- yolov3 的 tensorflow 实现.zip
- python-android-dist-v0.7.1.tar.gz
- YOLOv3 的 Keras 实现(Tensorflow 后端).zip
- 深入解析YOLO算法:边界框预测与代码实现
- YoloV3 在 Tensorflow 2.0 中的实现.zip
- C#winform 一个简单的图形配置工具.zip,插入电子元件,虚线方框等等
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功