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