验证码识别 深度学习 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
输出 (长度, 类别)
EmoTag helps you train emotion detection model for Chinese audios

emoTag emoTag helps you train emotion detection model for Chinese audios. Environment pip install -r requirement.txt Data We used Emotional Speech Dat

_zza 4 Sep 07, 2022
Img-process-manual - Utilize Python Numpy and Matplotlib to realize OpenCV baisc image processing function

Img-process-manual - Opencv Library basic graphic processing algorithm coding reproduction based on Numpy and Matplotlib library

Jack_Shaw 2 Dec 12, 2022
A Machine Teaching Framework for Scalable Recognition

MEMORABLE This repository contains the source code accompanying our ICCV 2021 paper. A Machine Teaching Framework for Scalable Recognition Pei Wang, N

2 Dec 08, 2021
PyTorch implementation of the paper: Long-tail Learning via Logit Adjustment

logit-adj-pytorch PyTorch implementation of the paper: Long-tail Learning via Logit Adjustment This code implements the paper: Long-tail Learning via

Chamuditha Jayanga 53 Dec 23, 2022
Code for the paper "Can Active Learning Preemptively Mitigate Fairness Issues?" presented at RAI 2021.

Can Active Learning Preemptively Mitigate Fairness Issues? Code for the paper "Can Active Learning Preemptively Mitigate Fairness Issues?" presented a

ElementAI 7 Aug 12, 2022
Pytorch implementation of NeurIPS 2021 paper: Geometry Processing with Neural Fields.

Geometry Processing with Neural Fields Pytorch implementation for the NeurIPS 2021 paper: Geometry Processing with Neural Fields Guandao Yang, Serge B

Guandao Yang 162 Dec 16, 2022
Finite Element Analysis

FElupe - Finite Element Analysis FElupe is a Python 3.6+ finite element analysis package focussing on the formulation and numerical solution of nonlin

Andreas D. 20 Jan 09, 2023
O-CNN: Octree-based Convolutional Neural Networks for 3D Shape Analysis

O-CNN This repository contains the implementation of our papers related with O-CNN. The code is released under the MIT license. O-CNN: Octree-based Co

Microsoft 607 Dec 28, 2022
Replication Code for "Self-Supervised Bug Detection and Repair" NeurIPS 2021

Self-Supervised Bug Detection and Repair This is the reference code to replicate the research in Self-Supervised Bug Detection and Repair in NeurIPS 2

Microsoft 85 Dec 24, 2022
Research code for the paper "Variational Gibbs inference for statistical estimation from incomplete data".

Variational Gibbs inference (VGI) This repository contains the research code for Simkus, V., Rhodes, B., Gutmann, M. U., 2021. Variational Gibbs infer

Vaidotas Šimkus 1 Apr 08, 2022
[CVPR 2022 Oral] MixFormer: End-to-End Tracking with Iterative Mixed Attention

MixFormer The official implementation of the CVPR 2022 paper MixFormer: End-to-End Tracking with Iterative Mixed Attention [Models and Raw results] (G

Multimedia Computing Group, Nanjing University 235 Jan 03, 2023
Official implementation of the paper "Steganographer Detection via a Similarity Accumulation Graph Convolutional Network"

SAGCN - Official PyTorch Implementation | Paper | Project Page This is the official implementation of the paper "Steganographer detection via a simila

ZHANG Zhi 1 Nov 26, 2021
Numerical Methods with Python, Numpy and Matplotlib

Numerical Bric-a-Brac Collections of numerical techniques with Python and standard computational packages (Numpy, SciPy, Numba, Matplotlib ...). Diffe

Vincent Bonnet 10 Dec 20, 2021
A video scene detection algorithm is designed to detect a variety of different scenes within a video

Scene-Change-Detection - A video scene detection algorithm is designed to detect a variety of different scenes within a video. There is a very simple definition for a scene: It is a series of logical

1 Jan 04, 2022
PyTorch implementation for the Neuro-Symbolic Sudoku Solver leveraging the power of Neural Logic Machines (NLM)

Neuro-Symbolic Sudoku Solver PyTorch implementation for the Neuro-Symbolic Sudoku Solver leveraging the power of Neural Logic Machines (NLM). Please n

Ashutosh Hathidara 60 Dec 10, 2022
Train a state-of-the-art yolov3 object detector from scratch!

TrainYourOwnYOLO: Building a Custom Object Detector from Scratch This repo let's you train a custom image detector using the state-of-the-art YOLOv3 c

AntonMu 616 Jan 08, 2023
Let's Git - Versionsverwaltung & Open Source Hausaufgabe

Let's Git - Versionsverwaltung & Open Source Hausaufgabe Herzlich Willkommen zu dieser Hausaufgabe für unseren MOOC: Let's Git! Wir hoffen, dass Du vi

1 Dec 13, 2021
Official implementation for Multi-Modal Interaction Graph Convolutional Network for Temporal Language Localization in Videos

Multi-modal Interaction Graph Convolutioal Network for Temporal Language Localization in Videos Official implementation for Multi-Modal Interaction Gr

Zongmeng Zhang 15 Oct 18, 2022
A python3 tool to take a 360 degree survey of the RF spectrum (hamlib + rotctld + RTL-SDR/HackRF)

RF Light House (rflh) A python script to use a rotor and a SDR device (RTL-SDR or HackRF One) to measure the RF level around and get a data set and be

Pavel Milanes (CO7WT) 11 Dec 13, 2022
PyTorch implementation of some learning rate schedulers for deep learning researcher.

pytorch-lr-scheduler PyTorch implementation of some learning rate schedulers for deep learning researcher. Usage WarmupReduceLROnPlateauScheduler Visu

Soohwan Kim 59 Dec 08, 2022