All Projects → sml2h3 → ddddocr

sml2h3 / ddddocr

Licence: MIT license
带带弟弟 通用验证码识别OCR pypi版

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ddddocr

Captcha platform
[验证码识别-部署] This project is based on CNN+BLSTM+CTC to realize verificationtion. This projeccode identificat is only for deployment models.
Stars: ✭ 458 (-88.81%)
Mutual labels:  ocr, captcha
ocr api server
使用ddddocr的最简api搭建项目,支持docker
Stars: ✭ 222 (-94.58%)
Mutual labels:  captcha, ddddocr
Baiduyun deeplearning competition
百度云魅族深度学习应用大赛
Stars: ✭ 393 (-90.4%)
Mutual labels:  ocr, captcha
Easyocr
Java OCR 识别组件(基于Tesseract OCR 引擎)。能自动完成图片清理、识别 CAPTCHA 验证码图片内容的一体化工作。Java Image cleanup, OCR recognition component (based Tesseract OCR engine, automatically cleanup image and identification CAPTCHA verification code picture content).
Stars: ✭ 466 (-88.61%)
Mutual labels:  ocr, captcha
Captcha break
验证码识别
Stars: ✭ 2,268 (-44.59%)
Mutual labels:  ocr, captcha
Rnn ctc
Recurrent Neural Network and Long Short Term Memory (LSTM) with Connectionist Temporal Classification implemented in Theano. Includes a Toy training example.
Stars: ✭ 220 (-94.62%)
Mutual labels:  ocr, captcha
Cintruder
Captcha Intruder (CIntrud3r) is an automatic pentesting tool to bypass captchas.
Stars: ✭ 192 (-95.31%)
Mutual labels:  ocr, captcha
Imageocr
PHP验证码识别[PHP CAPTCHA Recognition]
Stars: ✭ 241 (-94.11%)
Mutual labels:  ocr, captcha
memento
Organize your meme image cluster in a better format using OCR from the meme to sort them using tesseract along with editing memes by segmenting them using OpenCV within a directory
Stars: ✭ 70 (-98.29%)
Mutual labels:  ocr
scanbot-sdk-example-ios
No description or website provided.
Stars: ✭ 17 (-99.58%)
Mutual labels:  ocr
baidu-chain-dog
百度莱茨狗爬虫。
Stars: ✭ 52 (-98.73%)
Mutual labels:  ocr
jochre
Java Optical CHaracter Recognition
Stars: ✭ 18 (-99.56%)
Mutual labels:  ocr
form-segmentation
Let's explore how we can extract text from forms
Stars: ✭ 42 (-98.97%)
Mutual labels:  ocr
SynthText Chinese
Modify from https://github.com/JarveeLee/SynthText_Chinese_version.git with python3 and cv3.
Stars: ✭ 35 (-99.14%)
Mutual labels:  ocr
crnn.mxnet
crnn in mxnet.can train with chinese characters
Stars: ✭ 47 (-98.85%)
Mutual labels:  ocr
doctr
docTR (Document Text Recognition) - a seamless, high-performing & accessible library for OCR-related tasks powered by Deep Learning.
Stars: ✭ 1,409 (-65.58%)
Mutual labels:  ocr
RARBG-scraper
With Selenium headless browsing and CAPTCHA solving
Stars: ✭ 38 (-99.07%)
Mutual labels:  captcha
captcha-canvas
A captcha generator by using skia-canvas.
Stars: ✭ 40 (-99.02%)
Mutual labels:  captcha
Snipping-Ocr
A simple Snipping tool for Windows with OCR capabilities
Stars: ✭ 82 (-98%)
Mutual labels:  ocr
video-subtitle-extractor
视频硬字幕提取,生成srt文件。无需申请第三方API,本地实现文本识别。基于深度学习的视频字幕提取框架,包含字幕区域检测、字幕内容提取。A GUI tool for extracting hard-coded subtitle (hardsub) from videos and generating srt files.
Stars: ✭ 1,763 (-56.93%)
Mutual labels:  ocr

header.png

带带弟弟OCR通用验证码识别SDK免费开源版

当前版本为1.4.7

1.4.3更新内容

本次升级的主要原因为,dddd_trainer 的开源进行适配,使dddd_trainer 训练出的模型可以直接无缝导入到ddddocr里面来使用

支持使用ddddocr调用 dddd_trainer 训练后的自定义模型

dddd_trainer 训练后会在models目录里导出charsets.json和onnx模型

如下所示,import_onnx_path为onnx所在地址,charsets_path为onnx所在地址

import ddddocr

ocr = ddddocr.DdddOcr(det=False, ocr=False, import_onnx_path="myproject_0.984375_139_13000_2022-02-26-15-34-13.onnx", charsets_path="charsets.json")

with open('888e28774f815b01e871d474e5c84ff2.jpg', 'rb') as f:
    image_bytes = f.read()

res = ocr.classification(image_bytes)
print(res)

捐赠 (如果项目有帮助到您,可以选择捐赠一些费用用于ddddocr的后续版本维护,本项目长期维护)

Test Test

赞助合作商

赞助合作商 推荐理由
YesCaptcha YesCaptcha 谷歌reCaptcha验证码 / hCaptcha验证码 / funCaptcha验证码商业级识别接口 点我 直达VIP4

1.4.0版本更新内容

本次更新新增了两种滑块识别算法,算法非深度神经网络实现,仅使用opencv和PIL完成。

算法1

小滑块为单独的png图片,背景是透明图,如下图

Test

然后背景为带小滑块坑位的,如下图

Test

  det = ddddocr.DdddOcr(det=False, ocr=False)
  
  with open('target.png', 'rb') as f:
      target_bytes = f.read()
  
  with open('background.png', 'rb') as f:
      background_bytes = f.read()
  
  res = det.slide_match(target_bytes, background_bytes)
  
  print(res)

提示:如果小图无过多背景部分,则可以添加simple_target参数, 通常为jpg或者bmp格式的图片

    slide = ddddocr.DdddOcr(det=False, ocr=False)
    
    with open('target.jpg', 'rb') as f:
        target_bytes = f.read()
    
    with open('background.jpg', 'rb') as f:
        background_bytes = f.read()
    
    res = slide.slide_match(target_bytes, background_bytes, simple_target=True)
    
    print(res)

算法2

一张图为带坑位的原图,如下图

Test

一张图为原图,如下图

Test

  slide = ddddocr.DdddOcr(det=False, ocr=False)

  with open('bg.jpg', 'rb') as f:
      target_bytes = f.read()
  
  with open('fullpage.jpg', 'rb') as f:
      background_bytes = f.read()
  
  img = cv2.imread("bg.jpg")
  
  res = slide.slide_comparison(target_bytes, background_bytes)

  print(res)

更新内容2

添加全局ocr关闭参数,初始化时传入

dddd = ddddocr.DdddOcr(ocr=False)

则为关闭ocr功能,如果det = True,则会自动关闭ocr

1.3.1版本更新内容

想必很多做验证码的新手,一定头疼碰到点选类型的图像,做样本费时费力,神经网络不会写,训练设备太昂贵,模型效果又不好。

市场上常见的点选类验证码图片如下图所示

Test

Test

Test

Test

那么今天,他来了,ddddocr带着重磅更新大摇大摆的走来了。

简介

ddddocr是由sml2h3开发的专为验证码厂商进行对自家新版本验证码难易强度进行验证的一个python库,其由作者与kerlomz共同合作完成,通过大批量生成随机数据后进行深度网络训练,本身并非针对任何一家验证码厂商而制作,本库使用效果完全靠玄学,可能可以识别,可能不能识别。

ddddocr奉行着开箱即用、最简依赖的理念,尽量减少用户的配置和使用成本,希望给每一位测试者带来舒适的体验

项目地址: 点我传送

更新说明

本次更新其实分为两部分,其中有一部分是在1.2.0版本就已经更新了,但是在这里还是有必要提一下的。

第一部分 OCR识别部分

在1.2.0开始,ddddocr的识别部分进行了一次beta更新,主要更新在于网络结构主体的升级,其训练数据并没有发生过多的改变,所以理论上在识别结果上,原先可能识别效果的很好的图形在1.2.0上有一小部分概率会有一定程度的下降,也有可能原本识别不好的图形在1.2.0之后效果却变得特别好。 测试代码:

import ddddocr

ocr = ddddocr.DdddOcr()

with open("test.jpg", 'rb') as f:
    image = f.read()

res = ocr.classification(image)
print(res)

通过在初始化ddddocr的时候使用beta参数即可快速切换新模型

import ddddocr

ocr = ddddocr.DdddOcr(beta=True)

with open("test.jpg", 'rb') as f:
    image = f.read()

res = ocr.classification(image)
print(res)

OCR部分应该已经有很多人做了测试,在这里就放一部分网友的测试图片。

Test Test Test Test Test Test Test Test Test Test Test Test 等等更多图片等你测试哟~

第二部分 目标检测部分

在本次1.3.0的更新中,目标检测部分隆重登场! 目标检测部分同样也是由大量随机合成数据训练而成,对于现在已有的点选验证码图片或者未知的验证码图片都有可能具备一定的识别能力,适用于文字点选和图标点选。 简单来说,对于点选类的验证码,可以快速的检测出图片上的文字或者图标。

import ddddocr
import cv2

det = ddddocr.DdddOcr(det=True)

with open("test.jpg", 'rb') as f:
    image = f.read()

poses = det.detection(image)
print(poses)

im = cv2.imread("test.jpg")

for box in poses:
    x1, y1, x2, y2 = box
    im = cv2.rectangle(im, (x1, y1), (x2, y2), color=(0, 0, 255), thickness=2)

cv2.imwrite("result.jpg", im)

举些例子:

Test Test Test Test Test Test Test

以上只是目前我能找到的点选验证码图片,做了一个简单的测试。

安装

环境支持

python <= 3.9

Windows/Linux/Macos..

暂时不支持Macbook M1(X),M1(X)用户需要自己编译onnxruntime才可以使用

安装命令

pip install ddddocr

以上命令将自动安装符合自己电脑环境的最新ddddocr

拓展 一键部署ddddocr api,支持docker部署

github

gitee

爬虫框架推荐

feapder

crawlab

交流群 (加我好友拉你进群)

五群链接 Test

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].