Skip to main content

A library to break captchas using ONNX models.

Project description

Captcha Breaker PyPI - Latest Version GitHub Tag

A library to break captchas using a deep learning model.

Provenance

This project's inference code is adapted from the Hugging Face Space by docparser.

The underlying model is a copy of DocParser/captcha, licensed under CC BY 4.0.

A local copy of the model is hosted in this repository for convenience https://github.com/ramSeraph/captchabreaker/releases/tag/model.

Installation

To install the necessary dependencies, run:

pip install captchabreaker

Usage

To use the captcha breaker, you can use the captchabreaker.solve() function. It takes a PIL Image object as input and returns the predicted text.

Here is an example:

from PIL import Image
import captchabreaker

if __name__ == '__main__':
    # This is an example of how to use the captchabreaker package.
    # You need to have a captcha image file (e.g., captcha.png) in the same directory.
    try:
        img = Image.open("sample.png")
        text = captchabreaker.solve(img)
        print(f"Predicted text: {text}")
    except FileNotFoundError:
        print("Error: captcha.png not found. Please provide a captcha image.")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

captchabreaker-0.1.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

captchabreaker-0.1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file captchabreaker-0.1.1.tar.gz.

File metadata

  • Download URL: captchabreaker-0.1.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for captchabreaker-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5df632f3e333f723b489328f01e70f19822f8a94496b755e0681484f9b7da425
MD5 e4495b64803654164e4ac42a8d2e5d9b
BLAKE2b-256 bab13bd6f8cd6c340dd323b2f0a8f1e91abce74b835e3e294c848a88d6894cd7

See more details on using hashes here.

File details

Details for the file captchabreaker-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: captchabreaker-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for captchabreaker-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29f4d5fbed161ff7445d7b6db5fa5e95a4f43a28cf72b2e23a0df79dc1598533
MD5 88f204bf5731e9874fb35bb134df9f6e
BLAKE2b-256 e2d2cbf07fc06117f8b36867b0d7f72c4ecc2492ba2841859a1ebbaf9581d36f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page