{"id":13488712,"url":"https://github.com/PatrickLib/captcha_recognize","last_synced_at":"2025-03-28T01:37:25.749Z","repository":{"id":45677282,"uuid":"91751341","full_name":"PatrickLib/captcha_recognize","owner":"PatrickLib","description":"Image Recognition captcha without image segmentation 无需图片分割的验证码识别","archived":false,"fork":false,"pushed_at":"2023-03-20T16:32:40.000Z","size":83,"stargazers_count":557,"open_issues_count":23,"forks_count":173,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-10-31T00:40:09.682Z","etag":null,"topics":["captcha","captcha-breaking","image-recognition-captchas","python","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PatrickLib.png","metadata":{"files":{"readme":"README-zhcn.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-19T01:07:21.000Z","updated_at":"2024-09-24T06:46:44.000Z","dependencies_parsed_at":"2024-10-31T00:32:41.191Z","dependency_job_id":"1af65e1c-0f83-4633-96c4-2abde17c8abb","html_url":"https://github.com/PatrickLib/captcha_recognize","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickLib%2Fcaptcha_recognize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickLib%2Fcaptcha_recognize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickLib%2Fcaptcha_recognize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatrickLib%2Fcaptcha_recognize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatrickLib","download_url":"https://codeload.github.com/PatrickLib/captcha_recognize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245952919,"owners_count":20699560,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["captcha","captcha-breaking","image-recognition-captchas","python","tensorflow"],"created_at":"2024-07-31T18:01:20.504Z","updated_at":"2025-03-28T01:37:25.741Z","avatar_url":"https://github.com/PatrickLib.png","language":"Python","readme":"介绍\n====\n### 其他语言： [English](https://github.com/PatrickLib/captcha_recognize/blob/master/README.md) [中文](https://github.com/PatrickLib/captcha_recognize/blob/master/README-zhcn.md)\n\n基于TensorFlow的验证码识别，不需要对图片进行切割，运行环境Ubuntu 16.04，Python 2.7\n\n![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/CMQVA_num717_1.png)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/CMQZJ_num908_1.png)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/CRGEU_num339_1.png)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/CZHBN_num989_1.png)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/DZPEW_num388_1.png)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/CZWED_num21_1.png)\n\n使用captcha_eval.py评估的准确率为99.7%，训练集大小为50000，20000轮训练，验证码的生成代码见项目：https://github.com/lepture/captcha\n\n![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/1ab2s_num286.jpg)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/1ezx8_num398.jpg)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/1iv22_num346.jpg)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/1kxw2_num940.jpg)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/3mtj9_num765.jpg)![captcha](https://raw.githubusercontent.com/PatrickLib/captcha_recognition/master/data/test_data/1vuy5_num17.jpg)\n\n使用captcha_eval.py评估的准确率为52.1%，训练集大小为100000，200000轮训练，验证码的生成代码见项目：https://github.com/Gregwar/CaptchaBundle\n \n依赖环境\n=======\n### python 2.7\n### Anaconda2 4.3.1\nhttps://www.continuum.io/downloads#linux\n### TensorFlow 1.1\nhttps://github.com/tensorflow/tensorflow\n### captcha\nhttps://pypi.python.org/pypi/captcha/0.1.1\n\n使用步骤\n=======\n## 1.准备验证码图片\n将验证码图片分别放在 **\u003c工作目录\u003e/data/train_data/** 用于模型训练，**\u003c工作目录\u003e/data/valid_data/** 用于模型效果评估， **\u003c工作目录\u003e/data/test_data/** 用于验证码识别测试，图片命名样式是 **验证码内容_\\*.jpg** 或者 **验证码内容_\\*.png** ，图片大小最好为 **128x48** . 可以执行默认的验证码生成:\n```\npython captcha_gen_default.py\n```\n\n## 2.将验证码图片转换为tfrecords格式\n生成的结果为 **\u003c工作目录\u003e/data/train.tfrecord** 和 **\u003c工作目录\u003e/data/valid.tfrecord** ，执行：\n```\npython captcha_records.py\n```\n\n## 3.模型训练\n可以在CPU或者一个GPU上进行模型训练，执行：\n```\npython captcha_train.py\n```\n也可以在多个GPU上进行模型训练，执行：\n```\npython captcha_multi_gpu_train.py\n```\n\n## 4.模型评估\n用于评估训练的效果，执行：\n```\npython captcha_eval.py\n```\n\n## 5.验证码识别\n训练好模型后，可以对 **\u003c工作目录\u003e/data/test_data/** 目录下的原始图片进行识别，执行：\n```\npython captcha_recognize.py\n```\n结果如下\n```\n...\nimage WFPMX_num552.png recognize ----\u003e 'WFPMX'\nimage QUDKM_num468.png recognize ----\u003e 'QUDKM'\n```\n\n","funding_links":[],"categories":["Python","Łamanie"],"sub_categories":["Ogólne"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPatrickLib%2Fcaptcha_recognize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPatrickLib%2Fcaptcha_recognize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPatrickLib%2Fcaptcha_recognize/lists"}