验证码识别 深度学习 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
输出 (长度, 类别)
A comprehensive and up-to-date developer education platform for Urbit.

curriculum A comprehensive and up-to-date developer education platform for Urbit. This project organizes developer capabilities into a hierarchy of co

Sigilante 36 Oct 04, 2022
An Approach to Explore Logistic Regression Models

User-centered Regression An Approach to Explore Logistic Regression Models This tool applies the potential of Attribute-RadViz in identifying correlat

0 Nov 12, 2021
Official repository for the CVPR 2021 paper "Learning Feature Aggregation for Deep 3D Morphable Models"

Deep3DMM Official repository for the CVPR 2021 paper Learning Feature Aggregation for Deep 3D Morphable Models. Requirements This code is tested on Py

38 Dec 27, 2022
GND-Nets (Graph Neural Diffusion Networks) in TensorFlow.

GNDC For submission to IEEE TKDE. Overview Here we provide the implementation of GND-Nets (Graph Neural Diffusion Networks) in TensorFlow. The reposit

Wei Ye 3 Aug 08, 2022
Chess reinforcement learning by AlphaGo Zero methods.

About Chess reinforcement learning by AlphaGo Zero methods. This project is based on these main resources: DeepMind's Oct 19th publication: Mastering

Samuel 2k Dec 29, 2022
Point-NeRF: Point-based Neural Radiance Fields

Point-NeRF: Point-based Neural Radiance Fields Project Sites | Paper | Primary c

Qiangeng Xu 662 Jan 01, 2023
Wenet STT Python

Wenet STT Python Beta Software Simple Python library, distributed via binary wheels with few direct dependencies, for easily using WeNet models for sp

David Zurow 33 Feb 21, 2022
Python scripts for performing 3D human pose estimation using the Mobile Human Pose model in ONNX.

Python scripts for performing 3D human pose estimation using the Mobile Human Pose model in ONNX.

Ibai Gorordo 99 Dec 31, 2022
scAR (single-cell Ambient Remover) is a package for data denoising in single-cell omics.

scAR scAR (single cell Ambient Remover) is a package for denoising multiple single cell omics data. It can be used for multiple tasks, such as, sgRNA

19 Nov 28, 2022
Hyperparameter tuning for humans

KerasTuner KerasTuner is an easy-to-use, scalable hyperparameter optimization framework that solves the pain points of hyperparameter search. Easily c

Keras 2.6k Dec 27, 2022
MetaBalance: Improving Multi-Task Recommendations via Adapting Gradient Magnitudes of Auxiliary Tasks

MetaBalance: Improving Multi-Task Recommendations via Adapting Gradient Magnitudes of Auxiliary Tasks Introduction This repo contains the pytorch impl

Meta Research 38 Oct 10, 2022
OpenMMLab Model Deployment Toolset

Introduction English | 简体中文 MMDeploy is an open-source deep learning model deployment toolset. It is a part of the OpenMMLab project. Major features F

OpenMMLab 1.5k Dec 30, 2022
Source code for CIKM 2021 paper for Relation-aware Heterogeneous Graph for User Profiling

RHGN Source code for CIKM 2021 paper for Relation-aware Heterogeneous Graph for User Profiling Dependencies torch==1.6.0 torchvision==0.7.0 dgl==0.7.1

Big Data and Multi-modal Computing Group, CRIPAC 6 Nov 29, 2022
This is the official pytorch implementation of the BoxEL for the description logic EL++

BoxEL: Box EL++ Embedding This is the official pytorch implementation of the BoxEL for the description logic EL++. BoxEL++ is a geometric approach bas

1 Nov 03, 2022
Easy to use Python camera interface for NVIDIA Jetson

JetCam JetCam is an easy to use Python camera interface for NVIDIA Jetson. Works with various USB and CSI cameras using Jetson's Accelerated GStreamer

NVIDIA AI IOT 358 Jan 02, 2023
A platform to display the carbon neutralization information for researchers, decision-makers, and other participants in the community.

Welcome to Carbon Insight Carbon Insight is a platform aiming to display the carbon neutralization roadmap for researchers, decision-makers, and other

Microsoft 14 Oct 24, 2022
Single-stage Keypoint-based Category-level Object Pose Estimation from an RGB Image

CenterPose Overview This repository is the official implementation of the paper "Single-stage Keypoint-based Category-level Object Pose Estimation fro

NVIDIA Research Projects 188 Dec 27, 2022
Implementation of "A MLP-like Architecture for Dense Prediction"

A MLP-like Architecture for Dense Prediction (arXiv) Updates (22/07/2021) Initial release. Model Zoo We provide CycleMLP models pretrained on ImageNet

Shoufa Chen 244 Dec 27, 2022
Video Autoencoder: self-supervised disentanglement of 3D structure and motion

Video Autoencoder: self-supervised disentanglement of 3D structure and motion This repository contains the code (in PyTorch) for the model introduced

157 Dec 22, 2022
FCA: Learning a 3D Full-coverage Vehicle Camouflage for Multi-view Physical Adversarial Attack

FCA: Learning a 3D Full-coverage Vehicle Camouflage for Multi-view Physical Adversarial Attack Case study of the FCA. The code can be find in FCA. Cas

IDRL 21 Dec 15, 2022