Overview of Experimental Features
This chapter explains how to use the models and APIs that the EdgeOCR SDK provides as experimental.
Experimental models may have unstable accuracy or performance. Experimental APIs may change or be removed in future versions. If you use them in production, verify them thoroughly first.
Guides
Getting experimental models
Experimental models are not included in availableModels(). Use availableModelsWithExperimental() to get a list that includes experimental models. You load the model with useModel, the same as any other model.
- iOS (Swift)
- Android (Java)
// Find a model by UID in the list that includes experimental models
guard let model = edgeOCR.availableModelsWithExperimental()
.first(where: { $0.getUID() == "barcode_next" }) else {
fatalError("Model not found")
}
let modelInfo = try await edgeOCR.useModel(model, settings: ModelSettings())
// Find a model by UID in the list that includes experimental models
Model model = null;
for (Model candidate : api.availableModelsWithExperimental()) {
if (candidate.getUID().equals("barcode_next")) {
model = candidate;
break;
}
}
api.useModel(model, new ModelSettings(),
modelInformation -> { /* Loaded */ },
edgeError -> { /* Failed to load */ });
Compiler warnings
On some platforms, using experimental APIs produces a warning. The warning does not affect behavior, so you can keep using the API once you understand what it means.
- iOS (Swift): Calling
availableModelsWithExperimental()on a variable of theEdgeVisionAPIprotocol type shows a deprecation warning. Calling it on a variable of typeEdgeOCRdoes not. - Android (Java): Experimental APIs carry the
@ExperimentalEdgeVisionAPIannotation, and Android Lint shows a warning (UnsafeOptInUsageWarning).
Experimental models
The following models are available only through availableModelsWithExperimental().
| Model UID | Description | Related page |
|---|---|---|
barcode_next | High-accuracy barcode recognition | Experimental Barcode Recognition |
barcode_dpm | DPM code recognition with AI | Reading DPM Codes with AI |
A model that contains an experimental model as one of its parts is also experimental. For example, a model you define yourself that includes barcode_dpm must also be retrieved through availableModelsWithExperimental().
Experimental APIs
| API | Description | Related page |
|---|---|---|
availableModelsWithExperimental() | Get the model list including experimental models | This page |
NextBarcodeRecognizerSettings | Settings for high-accuracy barcode recognition | Experimental Barcode Recognition |
Barcode.getRawData() / Barcode.getEncodingRanges() | Get the binary data and encodings of a barcode | Experimental Barcode Recognition |
YotsukaDDetectorSettings | Confidence threshold of the barcode detector | Detector Settings |
postProcessing in DBTextDetectorSettings | Post-processing of text detection results | Detector Settings |