Files
CaptchBreaker/solvers/base.py
Hua 9b5f29083e Add slide and rotate interactive captcha solvers
New solver subsystem with independent models:
- GapDetectorCNN (1x128x256 grayscale → sigmoid) for slide gap detection
- RotationRegressor (3x128x128 RGB → sin/cos via tanh) for rotation angle prediction
- SlideSolver with 3-tier strategy: template match → edge detect → CNN fallback
- RotateSolver with ONNX sin/cos → atan2 inference
- Generators, training scripts, CLI commands, and slide track utility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 18:07:06 +08:00

22 lines
355 B
Python

"""
求解器基类
"""
from PIL import Image
class BaseSolver:
"""验证码求解器基类。"""
def solve(self, image: Image.Image, **kwargs) -> dict:
"""
求解验证码。
Args:
image: 输入图片
Returns:
包含求解结果的字典
"""
raise NotImplementedError