Datasets:
FlanChanXwO commited on
Commit ·
e72950a
1
Parent(s): 9a3a886
restructure: isolate dataset by captcha version scope
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- README.md +82 -75
- README_zh.md +83 -0
- data/b1_0000.png +0 -3
- data/b1_0001.png +0 -3
- data/b1_0002.png +0 -3
- data/b1_0003.png +0 -3
- data/b1_0004.png +0 -3
- data/b1_0005.png +0 -3
- data/b1_0006.png +0 -3
- data/b1_0007.png +0 -3
- data/b1_0008.png +0 -3
- data/b1_0009.png +0 -3
- data/b1_0010.png +0 -3
- data/b1_0011.png +0 -3
- data/b1_0012.png +0 -3
- data/b1_0013.png +0 -3
- data/b1_0014.png +0 -3
- data/b1_0015.png +0 -3
- data/b1_0016.png +0 -3
- data/b1_0017.png +0 -3
- data/b1_0018.png +0 -3
- data/b1_0019.png +0 -3
- data/b1_0020.png +0 -3
- data/b1_0021.png +0 -3
- data/b1_0022.png +0 -3
- data/b1_0023.png +0 -3
- data/b1_0024.png +0 -3
- data/b1_0025.png +0 -3
- data/b1_0026.png +0 -3
- data/b1_0027.png +0 -3
- data/b1_0028.png +0 -3
- data/b1_0029.png +0 -3
- data/b1_0030.png +0 -3
- data/b1_0031.png +0 -3
- data/b1_0032.png +0 -3
- data/b1_0033.png +0 -3
- data/b1_0034.png +0 -3
- data/b1_0035.png +0 -3
- data/b1_0036.png +0 -3
- data/b1_0037.png +0 -3
- data/b1_0038.png +0 -3
- data/b1_0039.png +0 -3
- data/b1_0040.png +0 -3
- data/b1_0041.png +0 -3
- data/b1_0042.png +0 -3
- data/b1_0043.png +0 -3
- data/b1_0044.png +0 -3
- data/b1_0045.png +0 -3
- data/b1_0046.png +0 -3
- data/b1_0047.png +0 -3
README.md
CHANGED
|
@@ -1,101 +1,108 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
-
-
|
| 4 |
license: agpl-3.0
|
|
|
|
|
|
|
| 5 |
tags:
|
| 6 |
- captcha
|
| 7 |
- ocr
|
| 8 |
-
- cnn
|
| 9 |
-
- onnx
|
| 10 |
- phpwind
|
| 11 |
-
|
| 12 |
-
model_type: phpwind-captcha-ocr
|
| 13 |
-
metrics:
|
| 14 |
-
- name: "validation accuracy"
|
| 15 |
-
type: accuracy
|
| 16 |
-
value: 0.886
|
| 17 |
-
- name: "per-attempt login success"
|
| 18 |
-
type: accuracy
|
| 19 |
-
value: 0.876
|
| 20 |
-
- name: "login success with retries"
|
| 21 |
-
type: accuracy
|
| 22 |
-
value: 0.999997
|
| 23 |
---
|
| 24 |
|
| 25 |
-
# PHPWind Captcha
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
**中文
|
| 30 |
|
| 31 |
-
|
| 32 |
|
| 33 |
-
|
| 34 |
-
Example input → Model output: 9125
|
| 35 |
-
```
|
| 36 |
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
##
|
| 42 |
|
| 43 |
-
```
|
| 44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
```
|
| 46 |
|
| 47 |
-
|
| 48 |
-
import numpy as np
|
| 49 |
-
import onnxruntime as ort
|
| 50 |
-
from PIL import Image
|
| 51 |
-
|
| 52 |
-
sess = ort.InferenceSession("model.onnx", providers=["CPUExecutionProvider"])
|
| 53 |
-
|
| 54 |
-
def solve(path):
|
| 55 |
-
im = Image.open(path).convert("RGB").resize((160, 64), Image.BILINEAR)
|
| 56 |
-
x = np.asarray(im, dtype=np.float32).transpose(2, 0, 1)[None] / 255.0
|
| 57 |
-
logits = sess.run(None, {"input": x})[0]
|
| 58 |
-
return "".join(str(int(logits[0, p].argmax())) for p in range(4))
|
| 59 |
|
| 60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
```
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
## I/O Specification
|
| 68 |
-
|
| 69 |
-
| Item | Spec |
|
| 70 |
-
|---|---|
|
| 71 |
-
| Input `input` | `[batch, 3, 64, 160]` float32, RGB, values in `[0, 1]` |
|
| 72 |
-
| Output `logits` | `[batch, 4, 10]`, argmax per position → digit |
|
| 73 |
-
| ONNX opset | 18 |
|
| 74 |
-
| Preprocessing | RGB → resize 160x64 (BILINEAR) → divide by 255 |
|
| 75 |
-
|
| 76 |
-
## Evaluation
|
| 77 |
|
| 78 |
-
|
| 79 |
|
| 80 |
-
|
|
| 81 |
|---|---|
|
| 82 |
-
|
|
| 83 |
-
|
|
| 84 |
-
|
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
+
- zh
|
| 4 |
license: agpl-3.0
|
| 5 |
+
task_categories:
|
| 6 |
+
- image-to-text
|
| 7 |
tags:
|
| 8 |
- captcha
|
| 9 |
- ocr
|
|
|
|
|
|
|
| 10 |
- phpwind
|
| 11 |
+
pretty_name: PHPWind Captcha Dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# PHPWind Captcha Dataset
|
| 15 |
|
| 16 |
+
Labelled four-digit numeric captcha images for training and evaluating OCR on
|
| 17 |
+
authorized PHPWind deployments. This repository stores each visual captcha
|
| 18 |
+
family in an independent dataset directory so that samples from different
|
| 19 |
+
versions, forks, themes, or generators are never silently mixed.
|
| 20 |
|
| 21 |
+
**中文说明**: [README_zh.md](README_zh.md)
|
| 22 |
|
| 23 |
+
**Related model**: [FlanChanXwO/phpwind-captcha-ocr](https://huggingface.co/FlanChanXwO/phpwind-captcha-ocr)
|
| 24 |
|
| 25 |
+
## Dataset catalogue
|
|
|
|
|
|
|
| 26 |
|
| 27 |
+
| Dataset ID | Deployment or version identifier | Status | Images | Notes |
|
| 28 |
+
|---|---|---|---:|---|
|
| 29 |
+
| `legacy-footer-v0.7-beta` | Target deployment footer label `v0.7β` | Available | 997 | The only dataset currently published in this repository. The footer text is an observed deployment label, not a claim about an official PHPWind release version. |
|
| 30 |
+
| `phpwind-v7` | PHPWind v7 | Reserved | — | Create only after collecting and labelling an independent, authorized v7 sample set. |
|
| 31 |
+
| `phpwind-v8` | PHPWind v8 | Reserved | — | Create only after collecting and labelling an independent, authorized v8 sample set. |
|
| 32 |
|
| 33 |
+
`legacy-footer-v0.7-beta` is the training-data scope for the related model's
|
| 34 |
+
published reference metric. It does **not** establish compatibility with other
|
| 35 |
+
PHPWind releases, forks, themes, or captcha generators.
|
| 36 |
|
| 37 |
+
## Repository layout
|
| 38 |
|
| 39 |
+
```text
|
| 40 |
+
datasets/
|
| 41 |
+
├── index.json # Catalogue of published dataset directories
|
| 42 |
+
└── legacy-footer-v0.7-beta/
|
| 43 |
+
├── metadata.json # Source/version boundary and dataset properties
|
| 44 |
+
├── labels.json # Filename-to-label mapping
|
| 45 |
+
└── images/ # Captcha PNG files
|
| 46 |
```
|
| 47 |
|
| 48 |
+
Every future version-specific dataset must use the same isolated layout:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
+
```text
|
| 51 |
+
datasets/phpwind-v7/
|
| 52 |
+
├── metadata.json
|
| 53 |
+
├── labels.json
|
| 54 |
+
└── images/
|
| 55 |
```
|
| 56 |
|
| 57 |
+
Do not place v7, v8, custom-theme, or fork samples in
|
| 58 |
+
`legacy-footer-v0.7-beta/images/`. Give each visually distinct generator its
|
| 59 |
+
own directory and catalogue entry.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
+
## Current dataset details
|
| 62 |
|
| 63 |
+
| Property | Value |
|
| 64 |
|---|---|
|
| 65 |
+
| Dataset ID | `legacy-footer-v0.7-beta` |
|
| 66 |
+
| Captcha format | Four numeric digits (`0`–`9`) |
|
| 67 |
+
| Image count | 997 PNG files |
|
| 68 |
+
| Labels | One label per image in `labels.json` |
|
| 69 |
+
| Image path | `datasets/legacy-footer-v0.7-beta/images/` |
|
| 70 |
+
| Label path | `datasets/legacy-footer-v0.7-beta/labels.json` |
|
| 71 |
+
| Source boundary | Target deployment whose footer displayed `v0.7β` |
|
| 72 |
+
|
| 73 |
+
`labels.json` is an object keyed by filename. Each entry contains the final
|
| 74 |
+
four-digit `label`, the recorded `votes`, the number of votes (`count`), and
|
| 75 |
+
the agreement flag (`agreed`). Image paths are relative to the dataset
|
| 76 |
+
directory: `images/<filename>`.
|
| 77 |
+
|
| 78 |
+
```json
|
| 79 |
+
{
|
| 80 |
+
"b1_0000.png": {
|
| 81 |
+
"label": "9125",
|
| 82 |
+
"votes": ["9125"],
|
| 83 |
+
"count": 1,
|
| 84 |
+
"agreed": true
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
```
|
| 88 |
|
| 89 |
+
## Adding a new version-specific dataset
|
| 90 |
+
|
| 91 |
+
1. Create `datasets/<dataset-id>/images/`; use a distinct ID such as
|
| 92 |
+
`phpwind-v7` or `phpwind-v8` only when that version has been established
|
| 93 |
+
from authorized evidence.
|
| 94 |
+
2. Add only that generator's images and a separate `labels.json`. Keep the
|
| 95 |
+
image filenames unique inside its own directory.
|
| 96 |
+
3. Add `metadata.json` with the observed version or deployment identifier,
|
| 97 |
+
captcha format, image count, collection provenance, and any known visual
|
| 98 |
+
customization. Do not infer an official version from a theme footer alone.
|
| 99 |
+
4. Add the dataset to `datasets/index.json` and update the catalogue table
|
| 100 |
+
above. Record whether its labels have been independently reviewed.
|
| 101 |
+
5. Train and evaluate each version separately first. Combine datasets only in
|
| 102 |
+
an explicitly documented multi-version experiment with per-version results.
|
| 103 |
+
|
| 104 |
+
## Responsible use and license
|
| 105 |
+
|
| 106 |
+
Use only captcha images from deployments you own or are explicitly authorized
|
| 107 |
+
to test. Do not use this dataset to automate account logins or bypass access
|
| 108 |
+
controls. The dataset is released under [GNU AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html).
|
README_zh.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PHPWind 验证码数据集
|
| 2 |
+
|
| 3 |
+
用于在已获授权的 PHPWind 部署上训练、评估 OCR 的四位数字验证码标注图片。仓库按验证码的
|
| 4 |
+
视觉来源分别保存数据集,避免把不同版本、分支、主题或生成器的样本静默混在一起。
|
| 5 |
+
|
| 6 |
+
**English version**: [README.md](README.md)
|
| 7 |
+
|
| 8 |
+
**关联模型**:[FlanChanXwO/phpwind-captcha-ocr](https://huggingface.co/FlanChanXwO/phpwind-captcha-ocr)
|
| 9 |
+
|
| 10 |
+
## 数据集目录
|
| 11 |
+
|
| 12 |
+
| 数据集 ID | 部署或版本标识 | 状态 | 图片数 | 说明 |
|
| 13 |
+
|---|---|---|---:|---|
|
| 14 |
+
| `legacy-footer-v0.7-beta` | 目标部署页脚标识 `v0.7β` | 已发布 | 997 | 当前仓库中唯一已发布的数据集。页脚文字只是观测到的部署标识,不能视为 PHPWind 官方发布版本号。 |
|
| 15 |
+
| `phpwind-v7` | PHPWind v7 | 预留 | — | 仅在收集并标注一组独立、已获授权的 v7 样本后创建。 |
|
| 16 |
+
| `phpwind-v8` | PHPWind v8 | 预留 | — | 仅在收集并标注一组独立、已获授权的 v8 样本后创建。 |
|
| 17 |
+
|
| 18 |
+
`legacy-footer-v0.7-beta` 是关联模型当前参考指标对应的训练数据范围;它**不**表示模型已对
|
| 19 |
+
其他 PHPWind 发行版、分支、主题或验证码生成器完成兼容性验证。
|
| 20 |
+
|
| 21 |
+
## 仓库结构
|
| 22 |
+
|
| 23 |
+
```text
|
| 24 |
+
datasets/
|
| 25 |
+
├── index.json # 已发布数据集目录
|
| 26 |
+
└── legacy-footer-v0.7-beta/
|
| 27 |
+
├── metadata.json # 来源、版本边界与数据集属性
|
| 28 |
+
├── labels.json # 文件名到标签的映射
|
| 29 |
+
└── images/ # 验证码 PNG 图片
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
未来每一个版本数据集都应使用相同的隔离结构,例如:
|
| 33 |
+
|
| 34 |
+
```text
|
| 35 |
+
datasets/phpwind-v7/
|
| 36 |
+
├── metadata.json
|
| 37 |
+
├── labels.json
|
| 38 |
+
└── images/
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
不要将 v7、v8、自定义主题或分支的样本放进
|
| 42 |
+
`legacy-footer-v0.7-beta/images/`。每一种视觉上不同的生成器都应使用单独目录并登记到索引。
|
| 43 |
+
|
| 44 |
+
## 当前数据集详情
|
| 45 |
+
|
| 46 |
+
| 属性 | 值 |
|
| 47 |
+
|---|---|
|
| 48 |
+
| 数据集 ID | `legacy-footer-v0.7-beta` |
|
| 49 |
+
| 验证码格式 | 四位数字(`0`–`9`) |
|
| 50 |
+
| 图片数 | 997 张 PNG |
|
| 51 |
+
| 标签 | 每张图片在 `labels.json` 中有一条记录 |
|
| 52 |
+
| 图片路径 | `datasets/legacy-footer-v0.7-beta/images/` |
|
| 53 |
+
| 标签路径 | `datasets/legacy-footer-v0.7-beta/labels.json` |
|
| 54 |
+
| 来源边界 | 页脚显示为 `v0.7β` 的目标部署 |
|
| 55 |
+
|
| 56 |
+
`labels.json` 以文件名为 key;每条记录包含最终 `label`、标注投票 `votes`、投票数 `count`
|
| 57 |
+
与一致性标识 `agreed`。图片相对路径为 `images/<filename>`。
|
| 58 |
+
|
| 59 |
+
```json
|
| 60 |
+
{
|
| 61 |
+
"b1_0000.png": {
|
| 62 |
+
"label": "9125",
|
| 63 |
+
"votes": ["9125"],
|
| 64 |
+
"count": 1,
|
| 65 |
+
"agreed": true
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
## 增加新版数据集
|
| 71 |
+
|
| 72 |
+
1. 创建 `datasets/<dataset-id>/images/`。只有在有授权证据确认版本后,才使用
|
| 73 |
+
`phpwind-v7`、`phpwind-v8` 这类版本 ID。
|
| 74 |
+
2. 只放入该生成器的图片,并建立独立的 `labels.json`;文件名只需在本数据集目录内唯一。
|
| 75 |
+
3. 写入 `metadata.json`:观测到的版本或部署标识、验证码格式、图片数、采集来源与已知的
|
| 76 |
+
视觉定制信息。不要仅根据主题页脚推断官方版本。
|
| 77 |
+
4. 更新 `datasets/index.json` 与上方目录表,并记录标签是否经过独立复核。
|
| 78 |
+
5. 先按版本分别训练和评估。只有在明确记录多版本实验及各版本结果时,才合并数据集。
|
| 79 |
+
|
| 80 |
+
## 负责任使用与许可证
|
| 81 |
+
|
| 82 |
+
只应使用自有或已明确获授权测试的部署所产生的验证码图片。不得将该数据集用于自动化账户
|
| 83 |
+
登录或绕过访问控制。数据集采用 [GNU AGPL-3.0](https://www.gnu.org/licenses/agpl-3.0.html) 许可。
|
data/b1_0000.png
DELETED
Git LFS Details
|
data/b1_0001.png
DELETED
Git LFS Details
|
data/b1_0002.png
DELETED
Git LFS Details
|
data/b1_0003.png
DELETED
Git LFS Details
|
data/b1_0004.png
DELETED
Git LFS Details
|
data/b1_0005.png
DELETED
Git LFS Details
|
data/b1_0006.png
DELETED
Git LFS Details
|
data/b1_0007.png
DELETED
Git LFS Details
|
data/b1_0008.png
DELETED
Git LFS Details
|
data/b1_0009.png
DELETED
Git LFS Details
|
data/b1_0010.png
DELETED
Git LFS Details
|
data/b1_0011.png
DELETED
Git LFS Details
|
data/b1_0012.png
DELETED
Git LFS Details
|
data/b1_0013.png
DELETED
Git LFS Details
|
data/b1_0014.png
DELETED
Git LFS Details
|
data/b1_0015.png
DELETED
Git LFS Details
|
data/b1_0016.png
DELETED
Git LFS Details
|
data/b1_0017.png
DELETED
Git LFS Details
|
data/b1_0018.png
DELETED
Git LFS Details
|
data/b1_0019.png
DELETED
Git LFS Details
|
data/b1_0020.png
DELETED
Git LFS Details
|
data/b1_0021.png
DELETED
Git LFS Details
|
data/b1_0022.png
DELETED
Git LFS Details
|
data/b1_0023.png
DELETED
Git LFS Details
|
data/b1_0024.png
DELETED
Git LFS Details
|
data/b1_0025.png
DELETED
Git LFS Details
|
data/b1_0026.png
DELETED
Git LFS Details
|
data/b1_0027.png
DELETED
Git LFS Details
|
data/b1_0028.png
DELETED
Git LFS Details
|
data/b1_0029.png
DELETED
Git LFS Details
|
data/b1_0030.png
DELETED
Git LFS Details
|
data/b1_0031.png
DELETED
Git LFS Details
|
data/b1_0032.png
DELETED
Git LFS Details
|
data/b1_0033.png
DELETED
Git LFS Details
|
data/b1_0034.png
DELETED
Git LFS Details
|
data/b1_0035.png
DELETED
Git LFS Details
|
data/b1_0036.png
DELETED
Git LFS Details
|
data/b1_0037.png
DELETED
Git LFS Details
|
data/b1_0038.png
DELETED
Git LFS Details
|
data/b1_0039.png
DELETED
Git LFS Details
|
data/b1_0040.png
DELETED
Git LFS Details
|
data/b1_0041.png
DELETED
Git LFS Details
|
data/b1_0042.png
DELETED
Git LFS Details
|
data/b1_0043.png
DELETED
Git LFS Details
|
data/b1_0044.png
DELETED
Git LFS Details
|
data/b1_0045.png
DELETED
Git LFS Details
|
data/b1_0046.png
DELETED
Git LFS Details
|
data/b1_0047.png
DELETED
Git LFS Details
|