Git Product home page Git Product logo

captcha_solver's Introduction

Captcha Solver

This module built to simplify the process of training NN to solve text captcha. (Cyrillic captcha is also available)

Using of pre-existing model for captcha from fssp.gov.ru

Installation of captcha-solver api with pre-trained model for captcha from fssp.gov.ru could be as simple as:

git clone [email protected]:punkerpunker/captcha_solver.git
cd captcha_solver
docker-compose up -d --build captcha-solver

This command registers API on port 2103.

Model works with images in base64 format. You can pass an image to API in a query argument. Example:

import requests
from matplotlib import pyplot as plt

url = 'http://0.0.0.0:2103/solve?'

img_bytes = requests.get('https://is.fssp.gov.ru/refresh_visual_captcha/').json()['image'].split(',')[1]

params = {'image': img_bytes}
resp = requests.get(url, params=params)

resp.json()

>>> 'л9м45'

Full example can be founded in test_app.ipynb:

alt text

Train model on external data

Model training is pretty simple. You need to create (or find) markup and store it in data/captcha_train folder. Each image must be in a .png format and have its solution written in name.

After you have your markup in data/captcha_train, run:

docker-compose up --build captcha-trainer

After its done, your model will be located in model folder. Then just run API container as usual:

docker-compose up -d --build captcha-solver

And then you can use Captcha Solver with model trained on your training dataset.

captcha_solver's People

Contributors

punkerpunker avatar marketinglogic avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.