MCPcopy Index your code
hub / github.com/Vinyzu/recognizer

github.com/Vinyzu/recognizer @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
111 symbols 552 edges 21 files 8 documented · 7%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

🎭 reCognizer

<a href="https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python/releases/latest">
    <img alt="Patchright Version" src="https://img.shields.io/github/v/release/microsoft/playwright-python?display_name=release&label=Version">
</a>
<a href="https://github.com/Vinyzu/recognizer/actions">
    <img src="https://github.com/Vinyzu/recognizer/actions/workflows/ci.yml/badge.svg">
</a>
<a href="https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python/releases">
    <img alt="GitHub Downloads (all assets, all releases)" src="https://img.shields.io/pepy/dt/patchright?color=seagreen">
</a>
<a href="https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python/blob/main/LICENSE">
    <img src="https://img.shields.io/badge/License-GNU%20GPL-green">
</a>

reCognizer is a free-to-use AI based reCaptcha Solver.

Usable with an easy-to-use API, also available for Async and Sync Playwright.

You can pass almost any format into the Challenger, from full-page screenshots, only-captcha images and no-border images to single images in a list.

Note: You Should use an undetected browser engine like Patchright or Botright to solve the Captchas consistently.

reCaptcha detects normal Playwright easily and you probably wont get any successful solves despite correct recognitions.


Sponsors

Want to Sponsor this Project? [Contact Me](https://discordapp.com/users/935224495126487150)! --- ## Install it from PyPI
pip install recognizer
--- ## Examples ### Possible Image Inputs ![Accepted Formats](https://i.ibb.co/nztTD9Z/formats.png) ### Example Solve Video (Good IP & Botright) https://github.com/Vinyzu/recognizer/assets/50874994/95a713e3-bb46-474b-994f-cb3dacae9279 --- ## Basic Usage
# Only for Type-Hints
from typing import TypeVar, Sequence, Union
from pathlib import Path
from os import PathLike

accepted_image_types = TypeVar("accepted_image_types", Path, Union[PathLike[str], str], bytes, Sequence[Path], Sequence[Union[PathLike[str], str]], Sequence[bytes])

# Real Code
from recognizer import Detector

detector = Detector(optimize_click_order=True)

task_type: str = "bicycle"
images: accepted_image_types = "recaptcha_image.png"
area_captcha: bool = False

response, coordinates = detector.detect(task_type, images, area_captcha=area_captcha)
--- ## Playwright Usage ### Sync Playwright
from playwright.sync_api import sync_playwright, Playwright
from recognizer.agents.playwright import SyncChallenger


def run(playwright: Playwright):
    browser = playwright.chromium.launch()
    page = browser.new_page()

    challenger = SyncChallenger(page, click_timeout=1000)
    page.goto("https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox-explicit.php")

    challenger.solve_recaptcha()

    browser.close()


with sync_playwright() as playwright:
    run(playwright)
### Async Playwright
import asyncio

from playwright.async_api import async_playwright, Playwright
from recognizer.agents.playwright import AsyncChallenger


async def run(playwright: Playwright):
    browser = await playwright.chromium.launch()
    page = await browser.new_page()

    challenger = AsyncChallenger(page, click_timeout=1000)
    await page.goto("https://recaptcha-demo.appspot.com/recaptcha-v2-checkbox-explicit.php")

    await challenger.solve_recaptcha()

    await browser.close()


async def main():
    async with async_playwright() as playwright:
        await run(playwright)


asyncio.run(main())
--- ## Copyright and License © [Vinyzu](https://github.com/Vinyzu/) [GNU GPL](https://choosealicense.com/licenses/gpl-3.0/) (Commercial Usage is allowed, but source, license and copyright has to made available. reCaptcha Challenger does not provide and Liability or Warranty) --- ## Projects/AIs Used [YOLO11m-seg](https://github.com/ultralytics/ultralytics) [flavour/CLIP ViT-L/14](https://huggingface.co/flavour/CLIP-ViT-B-16-DataComp.XL-s13B-b90K) [CIDAS/clipseg](https://huggingface.co/CIDAS/clipseg-rd64-refined) []() ## Thanks to [QIN2DIM](https://github.com/QIN2DIM) (For basic project structure) --- ## Disclaimer This repository is provided for **educational purposes only**. \ No warranties are provided regarding accuracy, completeness, or suitability for any purpose. **Use at your own risk**—the authors and maintainers assume **no liability** for **any damages**, **legal issues**, or **warranty breaches** resulting from use, modification, or distribution of this code.\ **Any misuse or legal violations are the sole responsibility of the user**. --- ![Version](https://img.shields.io/pypi/v/reCognizer?display_name=release&label=reCognizer) ![License](https://img.shields.io/badge/License-GNU%20GPL-green) ![Python](https://img.shields.io/badge/Python-v3.x-lightgrey) [![my-discord](https://img.shields.io/badge/My_Discord-000?style=for-the-badge&logo=google-chat&logoColor=blue)](https://discordapp.com/users/935224495126487150) [![buy-me-a-coffee](https://img.shields.io/badge/Buy_Me_A_Coffee-000?style=for-the-badge&logo=ko-fi&logoColor=brown)](https://ko-fi.com/vinyzu)

Core symbols most depended-on inside this repo

solve_recaptcha
called by 34
recognizer/agents/playwright/async_control.py
check_loaded
called by 33
recognizer/components/detector.py
detect
called by 24
recognizer/components/detector.py
draw_coordinates
called by 7
examples/demo_detect.py
load_captcha
called by 5
recognizer/agents/playwright/async_control.py
load_captcha
called by 5
recognizer/agents/playwright/sync_control.py
handle_single_image
called by 3
recognizer/components/image_processor.py
calculate_segmentation_response
called by 2
recognizer/components/detection_processor.py

Shape

Function 70
Method 35
Class 6

Languages

Python100%

Modules by API surface

tests/test_recaptcha_sites.py29 symbols
recognizer/components/detector.py19 symbols
recognizer/agents/playwright/sync_control.py11 symbols
recognizer/agents/playwright/async_control.py11 symbols
tests/test_inputs.py9 symbols
tests/conftest.py7 symbols
tests/test_detector.py6 symbols
recognizer/components/image_processor.py5 symbols
recognizer/components/detection_processor.py5 symbols
tests/test_playwright_async.py2 symbols
recognizer/components/prompt_handler.py2 symbols
tests/test_playwright_sync.py1 symbols

For agents

$ claude mcp add recognizer \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact