Detector224.mlpackage is a batch-1 CoreML conversion of the detector stage
from
NVIDIA Nemotron OCR v2.
It is intended for Apple-device OCR pipelines that need a packaged text
detection model and will implement their own post-processing, recognition, and
layout stages.
This is not a complete OCR system. The package returns detector tensors only.
Downstream code still needs thresholding, rotated-box decoding,
non-maximum suppression, crop/rectify, recognition, and reading-order/layout
logic.
For lowest single-image latency in the current test environment, use GPU or
CoreML ALL. CPU+ANE is available but slower for this detector.
1import CoreML
2import OCRCoreMLDetector
3
4let detector = try OCRDetector(computeUnits: .cpuAndGPU)
5let prediction = try detector.prediction(for: cgImage)
6
7let prob = prediction.output.prob
8let rboxes = prediction.output.rboxes
9let features = prediction.output.features
The converted model weights inherit the
NVIDIA Open Model License Agreement.
The upstream source code and helper scripts are Apache 2.0. See
LICENSE and
NOTICE for redistribution terms and attribution.