Include deployed routing threshold in the runtime config
Browse files- README.md +4 -2
- config.json +7 -1
README.md
CHANGED
|
@@ -57,7 +57,7 @@ A low score does not prove that a page is safe to process with text extraction a
|
|
| 57 |
| `triage_fp32.onnx` | Deployed FP32 ONNX model, with inline weights |
|
| 58 |
| `threshold.json` | Exact operating threshold and validation statistics |
|
| 59 |
| `best.pt` | Original PyTorch checkpoint, retained for re-export or fine-tuning with the original model architecture |
|
| 60 |
-
| `config.json` | Model input, normalization, output-head, and
|
| 61 |
| `provenance.json` | Source repository revision, release identity, and SHA-256/size records for the original artifacts |
|
| 62 |
| `LICENSE` | CC BY-SA 4.0 license text |
|
| 63 |
|
|
@@ -81,7 +81,7 @@ from PIL import Image
|
|
| 81 |
|
| 82 |
repo = "chowderai/Glancelot"
|
| 83 |
config = json.load(open(hf_hub_download(repo, "config.json")))
|
| 84 |
-
threshold =
|
| 85 |
model_path = hf_hub_download(repo, config["onnx_file"])
|
| 86 |
session = ort.InferenceSession(model_path, providers=["CPUExecutionProvider"])
|
| 87 |
|
|
@@ -141,6 +141,8 @@ At the selected operating threshold:
|
|
| 141 |
|
| 142 |
These are results against **Heron-generated labels on the validation split used for checkpoint and threshold selection**. They are not an independent held-out test of generalization or a guarantee of extraction quality. Teacher labels can contain errors. The conservative operating point favors recall because skipping layout on a structurally important page can damage extraction, while an unnecessary layout call mainly adds computation.
|
| 143 |
|
|
|
|
|
|
|
| 144 |
The routing score is a sigmoid output, not a guarantee of calibrated probability. Check routing and downstream extraction quality on representative documents before choosing a threshold for another pipeline. Auxiliary predictions do not locate elements on the page; Glancelot is not an object detector or OCR model.
|
| 145 |
|
| 146 |
### CPU latency
|
|
|
|
| 57 |
| `triage_fp32.onnx` | Deployed FP32 ONNX model, with inline weights |
|
| 58 |
| `threshold.json` | Exact operating threshold and validation statistics |
|
| 59 |
| `best.pt` | Original PyTorch checkpoint, retained for re-export or fine-tuning with the original model architecture |
|
| 60 |
+
| `config.json` | Model input, normalization, output-head, exact operating threshold, and validation statistics; consumed by Chowder and the example below |
|
| 61 |
| `provenance.json` | Source repository revision, release identity, and SHA-256/size records for the original artifacts |
|
| 62 |
| `LICENSE` | CC BY-SA 4.0 license text |
|
| 63 |
|
|
|
|
| 81 |
|
| 82 |
repo = "chowderai/Glancelot"
|
| 83 |
config = json.load(open(hf_hub_download(repo, "config.json")))
|
| 84 |
+
threshold = config # config.json contains the exact tau and metrics from threshold.json
|
| 85 |
model_path = hf_hub_download(repo, config["onnx_file"])
|
| 86 |
session = ort.InferenceSession(model_path, providers=["CPUExecutionProvider"])
|
| 87 |
|
|
|
|
| 141 |
|
| 142 |
These are results against **Heron-generated labels on the validation split used for checkpoint and threshold selection**. They are not an independent held-out test of generalization or a guarantee of extraction quality. Teacher labels can contain errors. The conservative operating point favors recall because skipping layout on a structurally important page can damage extraction, while an unnecessary layout call mainly adds computation.
|
| 143 |
|
| 144 |
+
`config.json` includes the same `tau` and validation fields as the original `threshold.json`; the original threshold export remains available for provenance and compatibility. Chowder consumes `config.json` as its routing configuration.
|
| 145 |
+
|
| 146 |
The routing score is a sigmoid output, not a guarantee of calibrated probability. Check routing and downstream extraction quality on representative documents before choosing a threshold for another pipeline. Auxiliary predictions do not locate elements on the page; Glancelot is not an object detector or OCR model.
|
| 147 |
|
| 148 |
### CPU latency
|
config.json
CHANGED
|
@@ -47,5 +47,11 @@
|
|
| 47 |
"jpeg_quality": 85,
|
| 48 |
"jpeg_optimize": true
|
| 49 |
},
|
| 50 |
-
"license": "cc-by-sa-4.0"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
}
|
|
|
|
| 47 |
"jpeg_quality": 85,
|
| 48 |
"jpeg_optimize": true
|
| 49 |
},
|
| 50 |
+
"license": "cc-by-sa-4.0",
|
| 51 |
+
"target_recall": 0.99,
|
| 52 |
+
"achieved_recall": 0.9900219854557754,
|
| 53 |
+
"fpr_at_op": 0.32073863636363636,
|
| 54 |
+
"tau": 0.20900137722492218,
|
| 55 |
+
"n_val": 36605,
|
| 56 |
+
"n_pos": 29565
|
| 57 |
}
|