Yaoshicn / Decaptcha
Licence: mit
Recognize captcha by machine learning. 机器学习识别图片验证码(专门应付本科毕业设计)
Stars: ✭ 192
Programming Languages
python
139335 projects - #7 most used programming language
Labels
Projects that are alternatives of or similar to Decaptcha
Recaptcha Module
🤖 Simple and easy Google reCAPTCHA integration with Nuxt.js
Stars: ✭ 143 (-25.52%)
Mutual labels: captcha
Python Anticaptcha
Client library for solve captchas with Anticaptcha.com support.
Stars: ✭ 137 (-28.65%)
Mutual labels: captcha
Captcha solver
Universal python API to captcha solving services
Stars: ✭ 152 (-20.83%)
Mutual labels: captcha
Sinesp
🚘 API em PHP para consultar informações de veículos na base de dados do SINESP Cidadão
Stars: ✭ 137 (-28.65%)
Mutual labels: captcha
Incapsula Cracker Py3
Python3 compatible way to bypass sites guarded with Incapsula
Stars: ✭ 132 (-31.25%)
Mutual labels: captcha
Friendly Pow
The PoW challenge library used by Friendly Captcha
Stars: ✭ 136 (-29.17%)
Mutual labels: captcha
Ngx Captcha
ReCaptcha components for Angular. Live preview:
Stars: ✭ 115 (-40.1%)
Mutual labels: captcha
Sinesp Client
Consulta de placas de veículos na base de dados do SINESP Cidadão sem a necessidade do preenchimento de captchas
Stars: ✭ 181 (-5.73%)
Mutual labels: captcha
Antiddos System
🛡️⚔️ Protect your web app from DDOS attack or the Dead Ping + CAPTCHA VERIFICATION in one line!
Stars: ✭ 173 (-9.9%)
Mutual labels: captcha
Decaptcha
English version Readme is available here .
通过简单的图像识别算法来完成验证码识别,打算把机器学习中的分类算法全部使用一遍。
使用方法
- 爬取验证码
- 对图像做处理并切分
- 手工标注数据
- 导入训练集
- 使用测试集
前期准备
enhancer = ImageEnhance.Contrast(img) # 增加对比对
img = enhancer.enhance(2)
enhancer = ImageEnhance.Sharpness(img) # 锐化
img = enhancer.enhance(2)
enhancer = ImageEnhance.Brightness(img) # 增加亮度
img = enhancer.enhance(2)
图像处理
静态图片
- 清除图片噪点
- 清除图片干扰线
- 切割图片
- 信息输出
动态图片
- 按帧转存 GIF
- 读取每个 GIF 的 Duration 属性
- 找到 Duration 最长的图片,后同静态图片处理
识别算法
KNN
# kNN algorithm
def classify0(inX, dataSet, labels, k):
dataSetSize = dataSet.shape[0]
diffMat = tile(inX, (dataSetSize, 1)) - dataSet
sqDiffMat = diffMat ** 2
sqDistances = sqDiffMat.sum(axis=1)
distances = sqDistances ** 0.5
sortedDistIndicies = distances.argsort()
classCount = {}
for i in range(k):
voteIlabel = labels[sortedDistIndicies[i]] # changed
classCount[voteIlabel] = classCount.get(voteIlabel, 0) + 1
sortedClassCount = sorted(classCount.iteritems(), key=operator.itemgetter(1), reverse=True)
return sortedClassCount[0][0]
SVM
根据算法的性质,可以问题设定成一个二分类问题:识别数字1和2(当然也可以是其他的任意两个数字)。
参考
- http://www.csie.ntu.edu.tw/~cjlin/libsvm/index.html?js=1#svm-toy-js
- http://www.pami.sjtu.edu.cn/people/gpliu/document/libsvm_src.pdf
- Machine Learning in Action
License
MIT
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].