Transcribes text in each Image with Microsoft Florence-2, emitting either a plain String transcript or per-region records with a Polygon<Double> quad or Rectangle<Double> box and the recognised text.
Typical backends
Transcribe text from document images and deliver the transcript over HTTP.
Pull frames over HTTP, locate text regions, and overlay the boxes for inspection.
Caveats
- I/O contractThe output arm is fixed when the backend deploys: a text consumer pins the plain
String transcript and runs the page-level OCR task; any region consumer runs the region OCR task and pins records with Polygon<Double> or Rectangle<Double> bounds. - AccuracyFlorence OCR exposes no calibrated per-region score, so the confidence-bearing arms report a constant value; do not treat that field as a real confidence.
- Hard constraintThe selected checkpoint must be a Florence-2 model; a gated or private repo additionally requires an access token configured before launch.
- FallbackOn a CUDA accelerator with bfloat16 support the model runs in bfloat16, which avoids the NaN logits that float16 produces in this vision encoder-decoder's autoregressive decode while keeping the half-precision footprint; without bfloat16 or a compatible accelerator it falls back to float32 (CPU resolves there too and continues at CPU latency).
- LimitationThe polygon carries Florence's native quad and the rectangle its axis-aligned bound; both are in pixel space, and decoding is deterministic with no sampling.
- State lifetimeThe model and device are read once at startup; changing them requires a redeploy.