def predict():
fnn=joblib.load(PKL)
dir='E:/????/??????/1 ???/captcha_master1/captcha_master/worddata/'
predictValue = []
for fr in os.listdir(dir):
dataset=[]
f = dir + fr
if f.rfind(u'.DS_Store') == -1 and f.rfind(u'Thumbs.db') == -1:
data = np.loadtxt(f, delimiter=',')
#data.reshape((1,2500))
for item in data:
dataset.append(int(item))
#print(len(dataset))
out = fnn.activate(dataset)
out = out.argmax()
iconset = ['3', 'c', 'd', 'e', 'f', 'h', 'j', 'k', 'l', 'm', 'n', 'w', 'x', 'y']
for y, word in enumerate(iconset):
if out == y:
print(word)
predictValue.append(word)
print(u'????%s' % (''.join(predictValue)))
pybrain_captcha.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录