{"id":22692091,"url":"https://github.com/python3webspider/deeplearningimagecaptcha","last_synced_at":"2025-04-12T23:12:03.277Z","repository":{"id":37640287,"uuid":"358942426","full_name":"Python3WebSpider/DeepLearningImageCaptcha","owner":"Python3WebSpider","description":"DeepLearning Image Captcha","archived":false,"fork":false,"pushed_at":"2021-05-04T08:07:14.000Z","size":672,"stargazers_count":27,"open_issues_count":4,"forks_count":24,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T17:11:33.823Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Python3WebSpider.png","metadata":{"files":{"readme":"README.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}},"created_at":"2021-04-17T17:33:16.000Z","updated_at":"2024-09-06T02:09:47.000Z","dependencies_parsed_at":"2022-09-07T23:13:45.626Z","dependency_job_id":null,"html_url":"https://github.com/Python3WebSpider/DeepLearningImageCaptcha","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/Python3WebSpider%2FDeepLearningImageCaptcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python3WebSpider%2FDeepLearningImageCaptcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python3WebSpider%2FDeepLearningImageCaptcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Python3WebSpider%2FDeepLearningImageCaptcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Python3WebSpider","download_url":"https://codeload.github.com/Python3WebSpider/DeepLearningImageCaptcha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643004,"owners_count":21138355,"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":[],"created_at":"2024-12-10T01:13:39.232Z","updated_at":"2025-04-12T23:12:03.250Z","avatar_url":"https://github.com/Python3WebSpider.png","language":"Python","readme":"深度学习识别验证码\n=========\n\nOrigin Repo: [https://github.com/dee1024/pytorch-captcha-recognition](https://github.com/dee1024/pytorch-captcha-recognition).\n\n本项目致力于使用神经网络来识别各种验证码。\n\n特性\n===\n- __端到端，不需要做更多的图片预处理（比如图片字符切割、图片尺寸归一化、图片字符标记、字符图片特征提取）__\n- __验证码包括数字、大写字母、小写__\n- __采用自己生成的验证码来作为神经网络的训练集合、测试集合、预测集合__\n- __纯四位数字，验证码识别率高达 99.9999 %__\n- __四位数字 + 大写字符，验证码识别率约 96 %__\n- __深度学习框架pytorch + 验证码生成器ImageCaptcha__\n\n\n原理\n===\n\n- __训练集合生成__\n\n    使用常用的 Python 验证码生成库 ImageCaptcha，生成 10w 个验证码，并且都自动标记好;\n    如果需要识别其他的验证码也同样的道理，寻找对应的验证码生成算法自动生成已经标记好的训练集合或者手动对标记，需要上万级别的数量，纯手工需要一定的时间，再或者可以借助一些网络的打码平台进行标记\n\n- __训练卷积神经网络__\n    构建一个多层的卷积网络，进行多标签分类模型的训练\n    标记的每个字符都做 one-hot 编码\n    批量输入图片集合和标记数据，大概15个Epoch后，准确率已经达到 96% 以上\n\n\n验证码识别率展示\n========\n![](https://raw.githubusercontent.com/dee1024/pytorch-captcha-recognition/master/docs/number.png)\n![](https://raw.githubusercontent.com/dee1024/pytorch-captcha-recognition/master/docs/number2.png)\n\n\n快速开始\n====\n- __步骤一：10分钟环境安装__\n\n    Python3.5+ 、ImageCaptcha库(pip install captcha)、 Pytorch(参考官网http://pytorch.org)\n\n\n- __步骤二：生成验证码__\n    ```bash\n    python generate.py\n    ```\n    执行以上命令，会在目录 dataset/train/ 下生成多张验证码图片，图片已经标注好，数量可以是 1w、5w、10w，通过 captcha-gen.py 内的 count 参数设定\n    \n- __步骤三：训练模型__\n    ```bash\n    python train.py\n    ```\n    使用步骤一生成的验证码图集合用CNN模型（在 catcha_cnn_model 中定义）进行训练，训练完成会生成文件 model.pkl\n\n- __步骤四：测试模型__\n    ```bash\n    python test.py\n    ```\n    可以在控制台，看到模型的准确率（如 95%） ，如果准确率较低，回到步骤一，生成更多的图片集合再次训练\n\n- __步骤五：使用模型做预测__\n    ```bash\n    python predict.py\n    ```\n    可以在控制台，看到预测输出的结果\n    \n作者\n===\n* __Dee Qiu__ \u003ccoolcooldee@gmail.com\u003e\n* __Germey__ \u003ccqc@cuiqingcai.com\u003e","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython3webspider%2Fdeeplearningimagecaptcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython3webspider%2Fdeeplearningimagecaptcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython3webspider%2Fdeeplearningimagecaptcha/lists"}