Views
No views yet
PwVerifyCode and PwGDCode classes targeted by this model.
Answer for the captcha shown above:9125
v0.7β. This is an observed deployment
label, not a claim about an official PHPWind release version.| Deployment or version label | Status | Evidence | Notes |
|---|---|---|---|
Target deployment — footer label v0.7β | Training scope | 997 manually labelled images; 88.61% held-out validation accuracy | The only visual configuration represented in the training and reference evaluation data. |
| Other PHPWind releases, forks, themes, or captcha generators | Unverified | No version-specific evaluation | Validate with authorized representative samples; fine-tune if the visual distribution differs. |
pip install onnxruntime pillow numpy1import numpy as np
2import onnxruntime as ort
3from PIL import Image
4
5session = ort.InferenceSession("model.onnx", providers=["CPUExecutionProvider"])
6
7def predict_captcha(path: str) -> str:
8 image = Image.open(path).convert("RGB").resize((160, 64), Image.BILINEAR)
9 inputs = np.asarray(image, dtype=np.float32).transpose(2, 0, 1)[None] / 255.0
10 logits = session.run(None, {"input": inputs})[0]
11 return "".join(str(int(logits[0, position].argmax())) for position in range(4))
12
13print(predict_captcha("captcha.png"))| Item | Value |
|---|---|
| Input | input: [batch, 3, 64, 160], float32, RGB values in [0, 1] |
| Output | logits: [batch, 4, 10]; argmax per position gives one digit |
| Preprocessing | RGB → resize to 160 × 64 (bilinear) → divide by 255 |
| Format | ONNX, opset 18 |
| Runtime | CPU supported; no GPU requirement |
v0.7β footer-label
deployment. This is a model-card reference metric, not a guarantee for another
PHPWind version, theme, or deployment. See the evaluation
protocol for the scope and reproducibility requirements.