Skip to main content

CaptchaConda

머신러닝 없이 고전 이미지 처리만으로 숫자 캡챠를 푸는 솔버. 학습 데이터도, GPU도, 프레임워크도 필요 없다. 매칭 코어는 C++ 백엔드로 이식돼 있고, Python은 얇은 껍데기 (전처리·세그멘테이션·오케스트레이션)로 남는다. 각 환경에 맞는 백엔드는 설치 후 한 번만 빌드한다.

설치

pip install CaptchaConda
python -m CaptchaConda init          # 이 환경에 맞게 C++ 백엔드 빌드 (CPU)
# 또는 GPU 환경:
python -m CaptchaConda init --cuda   # nvcc 로 CUDA 백엔드 빌드

init은 로컬 컴파일러(c++ 또는 nvcc)로 백엔드를 빌드한다. 컴파일러가 없으면 순수 Python 폴백으로 자동 전환된다(동일 결과, 조금 느림).

사용

from CaptchaConda import CaptchaConda

device = "cuda"  # 또는 "cpu"
cc = CaptchaConda(devices=device)   # 처음 1회만
cc.init()                            # 처음 1회만 (백엔드 빌드+로드)

print(cc.solve("captcha.png"))       # -> "39825"
print(cc.solve(pil_image, expected_n=5))
  • CaptchaConda(devices="cpu"|"cuda") — 백엔드 종류 선택
  • init(force=False) — 백엔드 빌드/로드(캐시됨; force=True로 재빌드)
  • solve(image, expected_n=None) — 이미지(경로 또는 PIL) → 숫자 문자열

왜 이런 구조인가

  • Python은 그대로 배포 → 이식성. 무거운 계산은 C++ 백엔드가 담당.
  • 백엔드는 소스로 배포되고 init 때 각 환경에 맞게 컴파일 → 배포 바이너리 호환성 문제를 피하고, CUDA가 있으면 GPU 백엔드로 빌드.
  • 학습이 없으므로 모델 파일·GPU·데이터셋 비용이 0. 필터 데이터(수십 KB)만 동봉.

동작 개요

이미지 → 배경 분리 → 숫자 분리 → (C++) 필터 매칭 + 위상 라우팅 + 이중필터 → 시퀀스. 정확도는 타깃 캡챠 분포에 맞춰 동봉 필터를 튜닝할수록 올라간다.

Metadata

Release files for CaptchaConda 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CaptchaConda 0.1.0
File Size Uploaded
captchaconda-0.1.0.tar.gz 86.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CaptchaConda 0.1.0
File Interpreter ABI Platform
captchaconda-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 173.9 kB

Release files / captchaconda-0.1.0.tar.gz

Download URL captchaconda-0.1.0.tar.gz
Size 86.5 kB
Tags Source
SHA-256 checksum
How to use checksums
89056d35273a7a79848c25ec515c8cb9ad30f6e20351e4d1184e5c6e3125612b
BLAKE2b-256 checksum
How to use checksums
3cc1aa62e33f46596f479865e6c1fee2ab7cba241efd72c71ece3d2e4a53e232
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.6

Release files / captchaconda-0.1.0-py3-none-any.whl

Download URL captchaconda-0.1.0-py3-none-any.whl
Size 87.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc2fc0d876568cea29f1cabe6b3dcbc7e292dda0e789b03f2785bc875f8c40f0
BLAKE2b-256 checksum
How to use checksums
09d23daf50ded78d52d42f8af3a104904fa87fef1e9ce3f25fd897db11ec11df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.6

Release history Release notifications | RSS feed

1.2.0

2 release files

0.3.0

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page