Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tautcony/captcha-tfjs-demo
Run an OCR model in the browser via tfjs
https://github.com/tautcony/captcha-tfjs-demo
captcha tensorflow tensorflowjs
Last synced: about 1 month ago
JSON representation
Run an OCR model in the browser via tfjs
- Host: GitHub
- URL: https://github.com/tautcony/captcha-tfjs-demo
- Owner: tautcony
- License: gpl-3.0
- Created: 2024-07-19T13:56:22.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-07-24T08:04:27.000Z (6 months ago)
- Last Synced: 2024-07-24T09:28:25.044Z (5 months ago)
- Topics: captcha, tensorflow, tensorflowjs
- Language: Python
- Homepage:
- Size: 2.9 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TensorFlow.js Captcha Recognition
This project aims to train and use TensorFlow.js to perform captcha recognition in the browser.
## Table of Contents
- [Introduction](#introduction)
- [Usage](#usage)
- [License](#license)## Introduction
In this project, we leverage the power of TensorFlow to train a machine learning model for captcha recognition. By using TensorFlow.js, we can perform captcha recognition directly in the browser without the need for server-side processing.
## Usage
Note: In this project, all captcha images are located in the `data` folder and are labeled by their filenames, with the following deformation characteristics:
1. The characters are surrounded by a lot of noise
1. The individual characters themselves are slightly distorted.![captcha example](./test/2589.png)
To implement the captcha recognition functionality in your browser, follow these steps:
1. prepare and label the captcha images for training
1. run `0-preprocess.py` to preprocess the captcha images
1. run `1-generate_dataset.py` to generate the dataset
1. run `2-train_model.py` to train the model
1. run `3-test_model.py` to test the model
1. run `4-convert_tfjs_model.py` to convert model for tensorflow.jsNow you have the model in the `web/tfjs_model` folder, start a server under the `web` directory, you can now perform captcha recognition in the browser.
## License
Distributed under the GPLv3+ License. See LICENSE for more information.