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>
This commit is contained in:
Hua
2026-03-11 18:07:06 +08:00
parent 90d6423551
commit 9b5f29083e
20 changed files with 1440 additions and 10 deletions

21
solvers/base.py Normal file
View File

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