Support external FunCaptcha ONNX fallback
This commit is contained in:
14
README.md
14
README.md
@@ -143,6 +143,20 @@ uv run captcha export --model 4_3d_rollball_animals
|
||||
uv run captcha predict-funcaptcha challenge.jpg --question 4_3d_rollball_animals
|
||||
```
|
||||
|
||||
如果暂时没有训练数据,也可以直接复用外部 ONNX:
|
||||
|
||||
```bash
|
||||
FUNCAPTCHA_ROLLBALL_MODEL_PATH=/path/to/4_3d_rollball_animals.onnx \
|
||||
uv run captcha predict-funcaptcha challenge.jpg --question 4_3d_rollball_animals
|
||||
```
|
||||
|
||||
推理查找顺序为:
|
||||
- `onnx_models/funcaptcha_rollball_animals.onnx`
|
||||
- 环境变量 `FUNCAPTCHA_ROLLBALL_MODEL_PATH`
|
||||
- 默认回退 `/mnt/data/code/python/funcaptcha-server/model/4_3d_rollball_animals.onnx`
|
||||
|
||||
不要把 ONNX 文件放到 `models/`;该目录用于 Python 模型定义源码,运行时模型产物应放在 `onnx_models/`。
|
||||
|
||||
## HTTP API
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user