Self-hosted captcha solver: OpenCV grid detection + a fine-tuned Qwen3.5-9B vision LoRA served on vLLM.
Project description
captchakraken
The Python engine + CLI behind CaptchaKraken:
OpenCV grid detection + a fine-tuned Qwen3.5-9B vision LoRA served on
vLLM. Given a screenshot of a captcha grid, it locates the tiles and returns
the click plan. Ships the captchakraken command.
For demo videos, accuracy numbers, the browser driver, and the full self-hosting guide, see the main repo CaptchaKraken.
Install
pip install captchakraken # client: OpenCV detection + vLLM HTTP planner
pip install "captchakraken[serve]" # + the serving stack (vLLM/torch) to self-host
The base install is lightweight — everything you need to solve captchas against
a vLLM server (local or remote). The [serve] extra pulls the heavy stack only
if you want to run the model yourself. The one-command
setup.sh installs [serve],
downloads the weights, and writes an env file for you.
Hands-off server
The vLLM server is managed for you. On your first solve, if the configured
endpoint is local and nothing is listening, a server is started
automatically and reused. Point VLLM_BASE_URL at a server you already run to
skip local management entirely.
captchakraken server start | stop | status | run
Usage
# Solve an image/video: classify → find_grid → plan. Prints the click actions.
captchakraken path/to/captcha.png
captchakraken path/to/captcha.png --puzzle-source hcaptcha
from captchakraken import CaptchaSolver
solver = CaptchaSolver() # connects to / auto-starts a local vLLM
actions = solver.solve("captcha.png")
Pure-OpenCV tool subcommands (no model): find-grid, find-checkbox,
detect-selected, grid-cell-states, find-move, find-movable, and a
persistent serve worker the browser driver polls.
Configuration (model-agnostic)
Everything model-specific lives in captchakraken.config and is env-overridable
— the solver never hard-codes a model.
| Variable | Meaning | Default |
|---|---|---|
VLLM_BASE_URL |
Inference endpoint | http://localhost:8000/v1 |
CAPTCHA_KRAKEN_API_KEY |
Bearer token (VLLM_API_KEY also accepted) |
EMPTY |
CAPTCHA_BASE_MODEL |
Base weights vLLM loads | Qwen/Qwen3.5-9B |
CAPTCHA_LORA_ADAPTER |
Captcha adapter (HF id or path) | CaptchaKraken/CaptchaKraken_v1 |
CAPTCHA_LORA_NAME |
Served adapter name the client requests | captcha |
CAPTCHA_KRAKEN_AUTOSTART |
0 disables local auto-start |
1 |
License
GPL-3.0-or-later.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file captchakraken-2.0.0.tar.gz.
File metadata
- Download URL: captchakraken-2.0.0.tar.gz
- Upload date:
- Size: 90.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5976732d63765b007714622fe424edd7a47a39d4db7149f3975501a5fdfb576
|
|
| MD5 |
f2e99b25b841d9264966753889f0812f
|
|
| BLAKE2b-256 |
a69aec545a5eb8a925ac55e4ec5bc069d3fb24a0bdb9ac7fb1f4ac324a18224e
|
File details
Details for the file captchakraken-2.0.0-py3-none-any.whl.
File metadata
- Download URL: captchakraken-2.0.0-py3-none-any.whl
- Upload date:
- Size: 75.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f966725bc7446bce4a1b287453b92e83e0927ecdcad95fed6fb2cbb870ffb993
|
|
| MD5 |
1d29f44bd1bbd0f7f2f197db3139355e
|
|
| BLAKE2b-256 |
a7615deaaeec55f7660710ddf0e4b9c981afbf53458a28deeb384d1b22bc6511
|