通过简单的卷积神经网络直接预测出验证码图片中滑块的位置

Overview

使用说明

1. 在本地测试

  • 运行python3 prdict_one.py即可,默认需要预测的图片路径位于testImg文件夹下的test1.png
  • 运行python3 predict_folder.py预测testImg下的所有图片

2. 部署到服务器

  • 运行python3 run_a_server.py 8888即在端口8888部署api,也可以在本地运行测试,如果不填写端口,默认端口为7000

3. 通过所部署API进行预测

运行python3 predict_by_server.py即可调用所部署的api进行testImg文件夹下所有图片的预测

4. 打包为可执行文件

pyinstaller -F run_a_server.py

即可打包为可执行文件,打包结束后会在dist文件夹下生成可执行文件。直接运行不需要python环境

注意!运行打包后的二进制文件时需要将trained_weights.h5放在同级目录下

其他说明

  • 通过测试,调用本地API预测一张图平均所需约0.05s,服务器1C2G占用内存200~400mb之间
  • 我所用的tensorflo和Keras版本分别为:1.15.2和2.3.1
  • model.py 存放网络结构
  • trained_weights.h5 训练的权重文件
  • 简单curl命令测试
curl -X POST -F [email protected]/test1.png 'http://localhost:7000/predict'

成功后会返回

{"predictions":0.553,"success":true}

本模型所针对的输入图片尺寸大小必须为140x360,没有适配其他图片大小,有能力的可以根据网络结构进行修改从而适应所需。

免责声明: 本仓库项目中所涉及的脚本,仅用于测试和学习研究,不保证其合法性,准确性,完整性和有效性,请根据情况自行判断。请勿将本项目的任何内容用于商业或非法途径,否则后果由使用者自负。如果您认为该项目的内容可能涉嫌侵犯其权利,请与我联系,我会尽快删除文件。如果您使用或复制了本仓库项目中的任何内容,则视为您已接受此免责声明。

You might also like...
Releases(publish)
This repository contains code for building education startup.

Learning Management System Overview It's the code for EssayBrain, a tool for teacher that automatically grades and validates essays. In order to valid

Shyam Das Shrestha 1 Nov 21, 2021
This is the repo for Uncertainty Quantification 360 Toolkit.

UQ360 The Uncertainty Quantification 360 (UQ360) toolkit is an open-source Python package that provides a diverse set of algorithms to quantify uncert

International Business Machines 207 Dec 30, 2022
A module to prevent invites and joins to Matrix rooms by checking the involved server(s)' domain.

Synapse Domain Rule Checker A module to prevent invites and joins to Matrix rooms by checking the involved server(s)' domain. Installation From the vi

matrix.org 4 Oct 24, 2022
A script that will warn you, by opening a new browser tab, when there are new content in your favourite websites.

web check A script that will warn you, by opening a new browser tab, when there are new content in your favourite websites. What it does The script wi

Jaime Álvarez 52 Mar 15, 2022
pyshell is a Linux subprocess module

pyshell A Linux subprocess module, An easier way to interact with the Linux shell pyshell should be cross platform but has only been tested with linux

4 Mar 02, 2022
Here, I have discuss the three methods of list reversion. The three methods are built-in method, slicing method and position changing method.

Three-different-method-for-list-reversion Here, I have discuss the three methods of list reversion. The three methods are built-in method, slicing met

Sachin Vinayak Dabhade 4 Sep 24, 2021
Create standalone, installable R Shiny apps using Electron

WARNING This is still very much a work in progress and nothing can be assumed stable in any way Temp notes: Two types of created installer, based on w

Chase Clark 5 Dec 24, 2021
Practice10 - Operasi String With Python

Operasi String MY SOSIAL MEDIA : Apa itu Python String ? String adalah urutan si

Maulana Reza Badrudin 1 Jan 05, 2022
A competition for forecasting electricity demand at the country-level using a standard backtesting framework

A competition for forecasting electricity demand at the country-level using a standard backtesting framework

5 Jul 12, 2022
Sudoku-Solver

Sudoku-Solver This is a personal project, that put all my today knowledges to the test, is a project that im developing alone with a lot of effort and

Carlos Ismael Gitto Bernales 5 Nov 08, 2021
Python implementation of the ASFLIP advection method

This is a python implementation of the ASFLIP advection method . We would like to hear from you if you appreciate this work.

Raymond Yun Fei 133 Nov 13, 2022
Osu statistics right on your desktop, made with pyqt

Osu!Stat Osu statistics right on your desktop, made with Qt5 Credits Would like to thank these creators for their projects and contributions. ppy, osu

Aditya Gupta 21 Jul 13, 2022
Free APN For Python

Free APN For Python

XENZI GANZZ 4 Apr 22, 2022
An easy python calculator for those who want's to know how if statements, loops, and imports works give it a try!

A usefull calculator for any student or anyone who want's to know how to build a simple 2 mode python based calculator.

Antonio Sánchez 1 Jan 06, 2022
Script to calculate the italian fiscal code of a person.

fiscal_code Hi! This is my first public repository, so please be kind if it is not well formatted or it contains errors. I started learning Python abo

FrancescoDiMuro 1 Nov 20, 2021
Project Faros is a reference implimentation of Red Hat OpenShift 4 on small footprint, bare-metal clusters.

Project Faros Project Faros is a reference implimentation of Red Hat OpenShift 4 on small footprint, bare-metal clusters. The project includes referen

project: Faros 9 Jul 18, 2022
通过简单的卷积神经网络直接预测出验证码图片中滑块的位置

使用说明 1. 在本地测试 运行python3 prdict_one.py即可,默认需要预测的图片路径位于testImg文件夹下的test1.png 运行python3 predict_folder.py预测testImg下的所有图片 2. 部署到服务器 运行python3 run_a_server

12 Mar 08, 2022
A working roblox account generator it doesnt bypass the capcha stuff cuz these didnt showed up in my test runs

A working roblox account generator (state 11.5.2021) it doesnt bypass the capcha stuff cuz these didnt showed up in my test runs

TerrificTable 22 Jan 03, 2023
Password manager using MySQL and Python 3.10.2

Password Manager Password manager using MySQL and Python 3.10.2 Installation Install my-project with github git clone https://github.com/AyaanSiddiq

1 Feb 18, 2022
Timetable scripts for python

Timetable Scripts timetable_to_json: https://beta.elektronplus.pl/timetable classes_taught_by_teacher: a.adam (aa) ['1Tc', '1Td', '3Te', '3Ti', '4Tf',

Elektron++ 2 Jan 02, 2022