验证码识别 深度学习 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
输出 (长度, 类别)
Recognize Handwritten Digits using Deep Learning on the browser itself.

MNIST on the Web An attempt to predict MNIST handwritten digits from my PyTorch model from the browser (client-side) and not from the server, with the

Harjyot Bagga 7 May 28, 2022
The official repository for BaMBNet

BaMBNet-Pytorch Paper

Junjun Jiang 18 Dec 04, 2022
Nb workflows - A workflow platform which allows you to run parameterized notebooks programmatically

NB Workflows Description If SQL is a lingua franca for querying data, Jupyter sh

Xavier Petit 6 Aug 18, 2022
As a part of the HAKE project, includes the reproduced SOTA models and the corresponding HAKE-enhanced versions (CVPR2020).

HAKE-Action HAKE-Action (TensorFlow) is a project to open the SOTA action understanding studies based on our Human Activity Knowledge Engine. It inclu

Yong-Lu Li 94 Nov 18, 2022
Systemic Evolutionary Chemical Space Exploration for Drug Discovery

SECSE SECSE: Systemic Evolutionary Chemical Space Explorer Chemical space exploration is a major task of the hit-finding process during the pursuit of

64 Dec 16, 2022
Trajectory Variational Autoencder baseline for Multi-Agent Behavior challenge 2022

MABe_2022_TVAE: a Trajectory Variational Autoencoder baseline for the 2022 Multi-Agent Behavior challenge This repository contains jupyter notebooks t

Andrew Ulmer 15 Nov 08, 2022
Single-Shot Motion Completion with Transformer

Single-Shot Motion Completion with Transformer 👉 [Preprint] 👈 Abstract Motion completion is a challenging and long-discussed problem, which is of gr

FuxiCV 78 Dec 29, 2022
Learning RGB-D Feature Embeddings for Unseen Object Instance Segmentation

Unseen Object Clustering: Learning RGB-D Feature Embeddings for Unseen Object Instance Segmentation Introduction In this work, we propose a new method

NVIDIA Research Projects 132 Dec 13, 2022
FedCV: A Federated Learning Framework for Diverse Computer Vision Tasks

FedCV: A Federated Learning Framework for Diverse Computer Vision Tasks Image Classification Dataset: Google Landmark, COCO, ImageNet Model: Efficient

FedML-AI 62 Dec 10, 2022
Parris, the automated infrastructure setup tool for machine learning algorithms.

README Parris, the automated infrastructure setup tool for machine learning algorithms. What Is This Tool? Parris is a tool for automating the trainin

Joseph Greene 319 Aug 02, 2022
PixelPick This is an official implementation of the paper "All you need are a few pixels: semantic segmentation with PixelPick."

PixelPick This is an official implementation of the paper "All you need are a few pixels: semantic segmentation with PixelPick." [Project page] [Paper

Gyungin Shin 59 Sep 25, 2022
This is an implementation of PIFuhd based on Pytorch

Open-PIFuhd This is a unofficial implementation of PIFuhd PIFuHD: Multi-Level Pixel-Aligned Implicit Function forHigh-Resolution 3D Human Digitization

Lingteng Qiu 235 Dec 19, 2022
SciPy fixes and extensions

scipyx SciPy is large library used everywhere in scientific computing. That's why breaking backwards-compatibility comes as a significant cost and is

Nico Schlömer 16 Jul 17, 2022
Implementation of paper "Decision-based Black-box Attack Against Vision Transformers via Patch-wise Adversarial Removal"

Patch-wise Adversarial Removal Implementation of paper "Decision-based Black-box Attack Against Vision Transformers via Patch-wise Adversarial Removal

4 Oct 12, 2022
Pre-trained models for a Cascaded-FCN in caffe and tensorflow that segments

Cascaded-FCN This repository contains the pre-trained models for a Cascaded-FCN in caffe and tensorflow that segments the liver and its lesions out of

300 Nov 22, 2022
Fake-user-agent-traffic-geneator - Python CLI Tool to generate fake traffic against URLs with configurable user-agents

Fake traffic generator for Gartner Demo Generate fake traffic to URLs with custo

New Relic Experimental 3 Oct 31, 2022
A fast, dataset-agnostic, deep visual search engine for digital art history

imgs.ai imgs.ai is a fast, dataset-agnostic, deep visual search engine for digital art history based on neural network embeddings. It utilizes modern

Fabian Offert 5 Dec 14, 2022
Hide screen when boss is approaching.

BossSensor Hide your screen when your boss is approaching. Demo The boss stands up. He is approaching. When he is approaching, the program fetches fac

Hiroki Nakayama 6.2k Jan 07, 2023
A nutritional label for food for thought.

Lexiscore As a first effort in tackling the theme of information overload in content consumption, I've been working on the lexiscore: a nutritional la

Paul Bricman 34 Nov 08, 2022