Appery Image Labeling

Image Labeling

ImageLabelRecognizer.recognizeImageLabel

Parameters
  • {string} filePath - path to image
  • {function} success - callback function which takes a parameter data which will be invoked on success
  • {function} error - callback function which takes a parameter err which will be invoked on failure
Supported Options
propertyvaluedescription
customModelCustom model file name
useBase64false (default) / trueWhether or not filePath is a base64 encoded string.

Example:

window.ApperyioMLCordovaPlugin.ImageLabelRecognizer.recognizeImageLabel('filePath', successCallback, errorCallback)

Sample JSON callback: image_label_recognition.json

ImageLabelRecognizer.startRealTimeDetection

Parameters
  • {function} success - callback function which takes a parameter data which will be invoked on success
  • {function} error - callback function which takes a parameter err which will be invoked on failure
Supported Options
propertyvaluedescription
frameImageDatatrue (default) / falseWhether include base64 of captured photo or not
frameImageResultTypeCameraResultType.BASE64_STRING (default) / CameraResultType.DATA_URLinclude captured photo as only base64 string or as full data url
encodingTypeEncodingType.JPEG (default) / EncodingType.PNGformat of output photo base64
cameraDirectionCameraDirection.BACK (default) / CameraDirection.FRONTUse back or front camera of device during object detection
delay500 (default)Time interval in msec, for performing detection each interval value
showDetectedLabelsfalse/ true (default)Whether or not show detected labels text on video overlay

Example:

window.ApperyioMLCordovaPlugin.ImageLabelRecognizer.recognizeImageLabel(successCallback, errorCallback,
{
    frameImageData: true, 
    frameImageResultType: this.window.ApperyioMLCordovaPlugin.ImageLabelRecognizerOptions.CameraResultType.BASE64_STRING,
    delay: 100,
    encodingType: this.window.ApperyioMLCordovaPlugin.ImageLabelRecognizerOptions.EncodingType.JPEG,
    cameraDirection: this.window.ApperyioMLCordovaPlugin.ImageLabelRecognizerOptions.CameraDirection.BACK,
    showDetectedLabels: true
})

Sample JSON callback: image_label_recognition_realtime.json

ImageLabelRecognizer.stopRealTimeDetection

Parameters
  • {function} success - callback function which takes a parameter data which will be invoked on success
  • {function} error - callback function which takes a parameter err which will be invoked on failure

Example:

window.ApperyioMLCordovaPlugin.ImageLabelRecognizer.stopRealTimeDetection(successCallback, errorCallback)