Skip to content

OCR model for reading captchas with 6 characters. This repository also contains a small dataset with 1040 examples.

Notifications You must be signed in to change notification settings

LucasNolasco/CaptchaSolver

Repository files navigation

CaptchaSolver

Model to solve six character captchas. The code available on this repository is based on the example presented here, which solves captchas with five characters. Besides the size of the captchas, the main difference in the code available here is that it applies morphological filtering to reduce the noise on the captcha images.

Example of captcha used to train the model

Dependencies

The dependencies for this repository are listed on the requirements file. To install them:

$ python -m pip install -r requirements.txt

How to run

To run the API for the captcha solver model:

$ python api.py

It will start a server locally, using the port 5000. In order to test this server, just run the test script:

$ python test.py

This script will iterate through all images on data/captcha_dataset, making a request for the server using each one of them.

Docker image

This repository also contains a docker image, which may facilitate the execution on a different environment. To build this image:

$ docker build -t captcha-api:latest -f Dockerfile .

After the image is built, you can start the server just running the image like this:

$ docker run -p 5000:5000 --name captcha-api captcha-api:latest

Documentation

With the server running, the API documentation may be found on http://localhost:5000/docs (or any other base url where the server is running).

About

OCR model for reading captchas with 6 characters. This repository also contains a small dataset with 1040 examples.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages