classification dict | detection dict |
|---|---|
{
"run_dir": "/tmp/dhi_hf_publish/p2m_smoke/classification_run",
"report_path": "/tmp/dhi_hf_publish/p2m_smoke/classification_run/evaluation_report.md",
"onnx_path": "/tmp/dhi_hf_publish/p2m_smoke/classification_run/model.onnx",
"compressed_onnx_path": null,
"deployment": {
"target": "onnxruntime",
"r... | {
"run_dir": "/tmp/dhi_hf_publish/p2m_smoke/detection_run",
"report_path": "/tmp/dhi_hf_publish/p2m_smoke/detection_run/evaluation_report.md",
"onnx_path": "/tmp/dhi_hf_publish/p2m_smoke/detection_run/model.onnx",
"compressed_onnx_path": null,
"deployment": {
"target": "onnxruntime",
"runtime": "onnxr... |
Prompt2Model Toy Examples (B1)
Product: Prompt2Model: a language-guided vision model factory. A typed pipeline (prompt, dataset config, training, calibration/conformal abstain, ONNX export, an optional distill/quantize step with an accuracy-floor gate, and a hard-case flywheel).
What this is (and isn't)
This is not a benchmark dataset. B1 has no natural "own" benchmark corpus the way the other
five products do (those score against synthetic physical ground truth: occlusion, camera
geometry, trajectories). What's uploaded here is the repo's own toy smoke-test fixtures,
tiny synthetic shape-classification and shape-detection sets used to exercise the pipeline
end-to-end, generated by the repo's own prompt2model.cli generate-toy-data command, plus the
real output of running the pipeline on them once.
What's in this dataset
classification/{red_square,green_triangle,blue_circle}/: 12 tiny 128x128 PNGs per class (36 total), procedurally drawn shapes.detection/images/plusdetection/annotations.json: a COCO-style toy detection set (single-class bounding boxes on procedurally drawn shapes).smoke_test_results.json: real output ofPYTHONPATH=src python -m prompt2model.cli smoke-test, i.e. this exact toy data run through the real pipeline (train, calibrate, export to ONNX, verify ONNX Runtime inference).
Measured result: read this as a pipeline smoke test, NOT a model-quality benchmark
The toy sets are tiny by design (a few dozen images); numbers below reflect that, not real-world accuracy:
- Classification: ONNX export built and verified runnable; conformal calibration completed on
7 held-out validation samples (
ece_before0.065,ece_after0.272; calibration on 7 samples is noisy and disclosed as such, not smoothed over); 1.52M parameters; about 150 ms / 6.6 fps CPU latency for this exported model. - Detection: mAP@0.5 = 0.053, mAP@[0.5:0.95] = 0.014 on the toy set (expected to be low, a handful of synthetic training images, not a real detection benchmark); ONNX export built and verified runnable; 2.22M parameters; about 36 ms / 27.5 fps CPU latency.
The point of this artifact is that the typed pipeline runs end-to-end and the exported ONNX models are verified runnable, not that these are competitive vision models.
The refusal gate this repo is really about
The number worth trusting most in this artifact is not an accuracy figure on a toy set, it is
the pipeline's own honesty mechanism: at inference time, a split conformal abstention check
compares each prediction's nonconformity (1 minus the predicted probability) against a
validation-calibrated threshold, and abstains rather than guessing when that threshold is
exceeded. On this smoke test the threshold was fit at alpha=0.1 (a 90% target coverage) from
7 held-out samples, giving conformal_threshold=0.491826. Separately, the factory's
compression step refuses to ship a distilled or quantized model that falls below 98% of the
uncompressed model's accuracy (the default accuracy floor), shipping the uncompressed model
instead and logging the refusal, rather than silently degrading.
Reproduce with:
PYTHONPATH=src python -m prompt2model.cli generate-toy-data --task all --output-dir output/toy_data
PYTHONPATH=src python -m prompt2model.cli smoke-test --output-dir output/smoke
Method card, models produced, weights not published here
The pipeline does train and export real ONNX models, but the ones in
smoke_test_results.json are trained on a few dozen toy images and would be misleading to
publish as weights. So this repo ships the fixtures and pipeline output, not a model
repo: no trained checkpoint is presented as if it were a usable vision model. When the
pipeline is run on a real task, that model would be published separately and labeled with its
real training data and metrics.
Try it
- Live demo (static, the refusal-gate mechanism plus a worked abstain/predict example): prompt2model-demo
- Blog: Six products, one honesty thesis
Source & research context
- Code (public, MIT-licensed): https://github.com/DHI-Technologies-Inc/Prompt2Model-Language-Guided-Vision-Model-Factory
- Collection: Dhi Labs, honest edge vision AI
- Org: https://huggingface.co/Dhi-Technologies, GitHub org: https://github.com/DHI-Technologies-Inc
- Downloads last month
- 13