验证码识别 深度学习 tensorflow 神经网络

Overview

captcha_tf2

验证码识别 深度学习 tensorflow 神经网络
使用卷积神经网络,对字符,数字类型验证码进行识别,tensorflow使用2.0以上

目前项目还在更新中,诸多bug,欢迎提出issue和PR, 希望和你一起共同完善项目。

实例demo

训练过程

  • 优化器选择: Adam
  • 损失函数: MSLE(均方对数误差)
  • 数据集: 随机生成的10000张图片,按照8:2用于训练和验证
  • 设备: Titan X 在训练过程中第5次epoch即可达到 80的accuracy50以上的val_accuracy
    经过30次epoch accuracy达到93, val_acc在85以上
    最高达到97 acc

目前训练val提升可以,loss下降稳定


demo图片
效果

效果
效果

目录

1. 项目结构

1.1 文件目录

序号 文件 说明
1 model/ 模型权重文件
2 network/ 神经网络
3 settings_tf 项目配置文件
4 tools/ 工具文件
5 data/ 数据文件

1.2 主要文件

序号 文件 说明
1 train.py 训练程序
2 detect.py 测试程序
3 make_data.py 训练集合成程序
4 create_image.py 数据集生产脚本

2. 使用

修改主路径下derect.py的配置变量注:注意config.py的图片size
直接调用python detcet.py
保存格式:*.txt: [6, 9, 5, 6] 1.jpg

3. 训练

3.1 数据准备:

  • 如果自己收集数据较为繁琐,可直接调用create_image.py,修改相应配置即可快速生成图片集和标注文件 无需其他步骤
  • 或是自己去网络上寻找验证码图片集, 保存格式需以数字顺序保存,且标注文件存放在某个单独的 txt中,标注结果是对应的图片名数字-1作为下标 默认采用数据集样式为1.jpg, 2.jpg ...的顺序格式
| ̄ ̄data/
|   |
|   | ̄ ̄images/
|   |   |
|   |   | ̄ ̄1.jpg
|   |   |
|   |   | ̄ ̄2.jpg
|   |    
|   | ̄ ̄label.txt

3.2开始训练

首先修改congig.py配置文件
接着修改train.py

  • 开始训练 python train.py
    训练中

网络

序号
输入 (B, 60, 160, 1)
1 卷积(32) relu BN
2 卷积(64) relu BN 相等池化
3 卷积(128) relu BN 相等池化
4 卷积(64) relu BN 相等池化
5 卷积(32) relu BN 相等池化
6 扁平化
8 全链接(onehot) softmax
输出 (长度, 类别)
Cosine Annealing With Warmup

CosineAnnealingWithWarmup Formulation The learning rate is annealed using a cosine schedule over the course of learning of n_total total steps with an

zhuyun 4 Apr 18, 2022
Download & Install mods for your favorit game with a few simple clicks

Husko's SteamWorkshop Downloader 🔴 IMPORTANT ❗ 🔴 The Tool is currently being rewritten so updates will be slow and only on the dev branch until it i

Husko 67 Nov 25, 2022
Code for ICE-BeeM paper - NeurIPS 2020

ICE-BeeM: Identifiable Conditional Energy-Based Deep Models Based on Nonlinear ICA This repository contains code to run and reproduce the experiments

Ilyes Khemakhem 65 Dec 22, 2022
Code for "Reconstructing 3D Human Pose by Watching Humans in the Mirror", CVPR 2021 oral

Reconstructing 3D Human Pose by Watching Humans in the Mirror Qi Fang*, Qing Shuai*, Junting Dong, Hujun Bao, Xiaowei Zhou CVPR 2021 Oral The videos a

ZJU3DV 178 Dec 13, 2022
Library for fast text representation and classification.

fastText fastText is a library for efficient learning of word representations and sentence classification. Table of contents Resources Models Suppleme

Facebook Research 24.1k Jan 01, 2023
Official implementation of Meta-StyleSpeech and StyleSpeech

Meta-StyleSpeech : Multi-Speaker Adaptive Text-to-Speech Generation Dongchan Min, Dong Bok Lee, Eunho Yang, and Sung Ju Hwang This is an official code

min95 168 Dec 28, 2022
code for Grapadora research paper experimentation

Road feature embedding selection method Code for research paper experimentation Abstract Traffic forecasting models rely on data that needs to be sens

Eric López Manibardo 0 May 26, 2022
Code for our ACL 2021 paper "One2Set: Generating Diverse Keyphrases as a Set"

One2Set This repository contains the code for our ACL 2021 paper “One2Set: Generating Diverse Keyphrases as a Set”. Our implementation is built on the

Jiacheng Ye 63 Jan 05, 2023
Official code release for: EditGAN: High-Precision Semantic Image Editing

Official code release for: EditGAN: High-Precision Semantic Image Editing

565 Jan 05, 2023
Towards Calibrated Model for Long-Tailed Visual Recognition from Prior Perspective

Towards Calibrated Model for Long-Tailed Visual Recognition from Prior Perspective Zhengzhuo Xu, Zenghao Chai, Chun Yuan This is the PyTorch implement

Sincere 16 Dec 15, 2022
Robotic Process Automation in Windows and Linux by using Driagrams.net BPMN diagrams.

BPMN_RPA Robotic Process Automation in Windows and Linux by using BPMN diagrams. With this Framework you can draw Business Process Model Notation base

23 Dec 14, 2022
This repository is an implementation of paper : Improving the Training of Graph Neural Networks with Consistency Regularization

CRGNN Paper : Improving the Training of Graph Neural Networks with Consistency Regularization Environments Implementing environment: GeForce RTX™ 3090

THUDM 28 Dec 09, 2022
Language-Agnostic Website Embedding and Classification

Homepage2Vec Language-Agnostic Website Embedding and Classification based on Curlie labels https://arxiv.org/pdf/2201.03677.pdf Homepage2Vec is a pre-

25 Dec 27, 2022
Mememoji - A facial expression classification system that recognizes 6 basic emotions: happy, sad, surprise, fear, anger and neutral.

a project built with deep convolutional neural network and ❤️ Table of Contents Motivation The Database The Model 3.1 Input Layer 3.2 Convolutional La

Jostine Ho 761 Dec 05, 2022
Pytorch implementation of Supporting Clustering with Contrastive Learning, NAACL 2021

Supporting Clustering with Contrastive Learning SCCL (NAACL 2021) Dejiao Zhang, Feng Nan, Xiaokai Wei, Shangwen Li, Henghui Zhu, Kathleen McKeown, Ram

231 Jan 05, 2023
MINOS: Multimodal Indoor Simulator

MINOS Simulator MINOS is a simulator designed to support the development of multisensory models for goal-directed navigation in complex indoor environ

194 Dec 27, 2022
An inofficial PyTorch implementation of PREDATOR based on KPConv.

PREDATOR: Registration of 3D Point Clouds with Low Overlap An inofficial PyTorch implementation of PREDATOR based on KPConv. The code has been tested

ZhuLifa 14 Aug 03, 2022
A visualisation tool for Deep Reinforcement Learning

DRLVIS - Visualising Deep Reinforcement Learning Created by Marios Sirtmatsis with the support of Alex Bäuerle. DRLVis is an application used for visu

Marios Sirtmatsis 1 Nov 04, 2021
Codes for our IJCAI21 paper: Dialogue Discourse-Aware Graph Model and Data Augmentation for Meeting Summarization

DDAMS This is the pytorch code for our IJCAI 2021 paper Dialogue Discourse-Aware Graph Model and Data Augmentation for Meeting Summarization [Arxiv Pr

xcfeng 55 Dec 27, 2022
A quantum game modeling of pandemic (QHack 2022)

Contributors: @JongheumJung, @YoonjaeChung, @GyunghunKim Abstract In the regime of a global pandemic, leaders around the world need to consider variou

Yoonjae Chung 8 Apr 03, 2022