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:
21
solvers/base.py
Normal file
21
solvers/base.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""
|
||||
求解器基类
|
||||
"""
|
||||
|
||||
from PIL import Image
|
||||
|
||||
|
||||
class BaseSolver:
|
||||
"""验证码求解器基类。"""
|
||||
|
||||
def solve(self, image: Image.Image, **kwargs) -> dict:
|
||||
"""
|
||||
求解验证码。
|
||||
|
||||
Args:
|
||||
image: 输入图片
|
||||
|
||||
Returns:
|
||||
包含求解结果的字典
|
||||
"""
|
||||
raise NotImplementedError
|
||||
Reference in New Issue
Block a user