Back to rankings

zhaipro/easy12306

Python

使用机器学习算法完成对12306验证码的自动识别

deep-learningmathematicscaptcha12306
Star Growth
Stars
2.9k
Forks
725
Weekly Growth
Issues
9
1k2k
Jan 2023Mar 2024May 2025Jul 2026
ArtifactsPyPIpip install easy12306
README

# easy12306

两个必要的数据集:

  1. 文字识别,model.h5
  2. 图片识别,12306.image.model.h5

识别器数据的下载地址:

  1. 百度网盘
  2. https://drive.google.com/drive/folders/1GDCQyaHr36c7y1H-19pOKjc_EdAI1wn0

python3 main.py <img.jpg>

我把设计思路写在维基中了:https://github.com/zhaipro/easy12306/wiki

如何?

2

~$ python3 main.py 2.jpg 2> /dev/null
电子秤
风铃        # 要找的是以上两样东西
0 0 电子秤  # 第一行第一列就是电子秤
0 1 绿豆
0 2 蒸笼
0 3 蒸笼
1 0 风铃
1 1 电子秤
1 2 网球拍
1 3 网球拍

识别前所未见的图片

8

具体的编号:texts.txt

~$ python3 mlearn_for_image.py 8.jpg
[0.8991613]  # 可信度
[0]          # 0 表示的就是打字机

什么?

只是想拿来识别12306的验证码?可以回顾3.0.0,使用相似图搜索。

Related repositories
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

C++Apache License 2.0tensorflowmachine-learning
tensorflow.org
196.5k75.7k
AUTOMATIC1111/stable-diffusion-webui

Stable Diffusion web UI

PythonPyPIGNU Affero General Public License v3.0deep-learningdiffusion
164.3k30.4k
huggingface/transformers

🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

PythonPyPIApache License 2.0nlpnatural-language-processing
huggingface.co/transformers
162.8k34k
pytorch/pytorch

Tensors and Dynamic neural networks in Python with strong GPU acceleration

PythonPyPIOtherneural-networkautograd
pytorch.org
101.8k28.4k
rasbt/LLMs-from-scratch

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

Jupyter NotebookOthergptlarge-language-models
amzn.to/4fqvn0D
99.5k15.3k
opencv/opencv

Open Source Computer Vision Library

C++Apache License 2.0opencvc-plus-plus
opencv.org
90.1k56.9k
Developer-Y/cs-video-courses

List of Computer Science courses with video lectures.

computer-sciencealgorithms
82.6k11.4k
d2l-ai/d2l-zh

《动手学深度学习》:面向中文读者、能运行、可讨论。中英文版被70多个国家的500多所大学用于教学。

PythonPyPIApache License 2.0deep-learningbook
zh.d2l.ai
79.1k12.3k
dair-ai/Prompt-Engineering-Guide

🐙 Guides, papers, lessons, notebooks and resources for prompt engineering, context engineering, RAG, and AI Agents.

MDXMIT Licensedeep-learningprompt-engineering
promptingguide.ai
76.8k8.4k
labmlai/annotated_deep_learning_paper_implementations

🧑‍🏫 60+ Implementations/tutorials of deep learning papers with side-by-side notes 📝; including transformers (original, xl, switch, feedback, vit, ...), optimizers (adam, adabelief, sophia, ...), gans(cyclegan, stylegan2, ...), 🎮 reinforcement learning (ppo, dqn), capsnet, distillation, ... 🧠

PythonPyPIMIT Licensedeep-learningdeep-learning-tutorial
nn.labml.ai
67.2k6.7k
keras-team/keras

Deep Learning for humans

PythonPyPIApache License 2.0deep-learningtensorflow
keras.io
64.2k19.7k
CorentinJ/Real-Time-Voice-Cloning

Clone a voice in 5 seconds to generate arbitrary speech in real-time

PythonPyPIOtherdeep-learningpytorch
60k9.4k