Coder Social home page Coder Social logo

nem0oo / ml-captcha-solver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alessandrozanatta/simple-captcha-solver

0.0 0.0 0.0 16.25 MB

This repo is about solving Captchas using Machine Learning techniques. This was definitely way way over complicated, but achives great scores in a very short time.

License: MIT License

Python 100.00%

ml-captcha-solver's Introduction

License

Captcha Solver (with Deep Learning)

This project is about an automatical solver of captchas, designed to break captchas from a certain challenge website. It turned out to be very efficient (yet very over-complicated) to use Deep Learning techniques.

This is the first project I created using Machine Learning techniques.

Solving process

  1. Download the captcha. The standard size for this particular example was 120x40. Captchas look like the following one: image
  2. Preprocess the images:
    1. Convert the image into its binary representation (which means turning all pixels to either black or white). This makes further processing way easier with an acceptable loss of information.
    2. Divide the captcha into the single letters that compose it. Considered captchas had 6 letters. This was done using the snake technique.
    3. Normalized obtained letters into a 32x32 pixels format in which letters are centered. This consistent format makes the Neural Network perform way better.
  3. Feed groups of letters into the trained Neural Network.
  4. Solved!

Neural Network Architecture

The following image is a representation of the Neural Network that was used. This architecture was designed for a wider range of possible letters but it works pretty good on smaller ranges too.

Training was done in the standard manner, which is using annotated data. The dataset was retrived by using the src/ocr/labeller.py script, which makes the process really fast. It took about 30-40 minutes to gain a solid amount of annotated letters (~ 1200).

Performances

The training of the Neural Network takes a very small amount of time (~5 minutes with a 2.6 GHz Intel i5-7x CPU only).

It takes it about 10 seconds to solve 50 captchas, including download and preprocessing.

On average, the trained Neural Network achieved a mean success rate of ~94%, peaking at 98%. Considering the amount of annotated data, I consider this a great result.

ml-captcha-solver's People

Contributors

alessandrozanatta 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.