FirebaseMLVision Framework Reference

FIRVision

@interfaceFIRVision:NSObject

A Firebase service that supports vision APIs.

  • Enables stats collection in ML Kit vision. The stats include API call counts, errors, API call durations, options, etc. No personally identifiable information is logged.

    The setting is perFirebaseApp, and therefore perVision, and it is persistent across launches of the app. It means if the user uninstalls the app or clears all app data, the setting will be erased. The best practice is to set the flag in each initialization.

    By default the logging is enabled. You have to specifically set it to false to disable logging.

    Declaration

    Objective-C

    @property(nonatomic,assign,unsafe_unretained,readwrite,getter=isStatsCollectionEnabled)BOOLstatsCollectionEnabled;
  • Gets an instance of Firebase Vision service for the default Firebase app. The default Firebase app instance must be configured before calling this method; otherwise, raises FIRAppNotConfigured exception.

    Declaration

    Objective-C

    +(nonnullinstancetype)vision;

    Return Value

    A Firebase Vision service instance, initialized with the default Firebase app.

  • Gets an instance of Firebase Vision service for the custom Firebase app.

    Declaration

    Objective-C

    +(nonnullinstancetype)visionForApp:(nonnullFIRApp*)app;

    Parameters

    app

    The custom Firebase app used for initialization. Raises FIRAppInvalid exception ifapp is nil.

    Return Value

    A Firebase Vision service instance, initialized with the custom Firebase app.

  • Unavailable.

    Declaration

    Objective-C

    -(nonnullinstancetype)init;
  • Gets a barcode detector with the given options.

    Declaration

    Objective-C

    -(nonnullFIRVisionBarcodeDetector*)barcodeDetectorWithOptions:(nonnullFIRVisionBarcodeDetectorOptions*)options;

    Parameters

    options

    Options containing barcode detector configuration.

    Return Value

    A barcode detector configured with the given options.

  • Gets a barcode detector with the default options.

    Declaration

    Objective-C

    -(nonnullFIRVisionBarcodeDetector*)barcodeDetector;

    Return Value

    A barcode detector configured with the default options.

  • Gets a face detector with the given options.

    Declaration

    Objective-C

    -(nonnullFIRVisionFaceDetector*)faceDetectorWithOptions:(nonnullFIRVisionFaceDetectorOptions*)options;

    Parameters

    options

    Options for configuring the face detector.

    Return Value

    A face detector configured with the given options.

  • Gets a face detector with the default options.

    Declaration

    Objective-C

    -(nonnullFIRVisionFaceDetector*)faceDetector;

    Return Value

    A face detector configured with the default options.

  • Gets an on-device image labeler with the given options.

    Declaration

    Objective-C

    -(nonnullFIRVisionImageLabeler*)onDeviceImageLabelerWithOptions:(nonnullFIRVisionOnDeviceImageLabelerOptions*)options;

    Parameters

    options

    Options for configuring the image labeler.

    Return Value

    An on-device image labeler configured with the given options.

  • Gets an on-device image labeler with the default options.

    Declaration

    Objective-C

    -(nonnullFIRVisionImageLabeler*)onDeviceImageLabeler;

    Return Value

    An on-device image labeler configured with the default options.

  • Gets an on-device text recognizer.

    Declaration

    Objective-C

    -(nonnullFIRVisionTextRecognizer*)onDeviceTextRecognizer;

    Return Value

    A text recognizer.

  • Gets a cloud text recognizer configured with the given options.

    Declaration

    Objective-C

    -(nonnullFIRVisionTextRecognizer*)cloudTextRecognizerWithOptions:(nonnullFIRVisionCloudTextRecognizerOptions*)options;

    Parameters

    options

    Options for configuring the cloud text recognizer.

    Return Value

    A text recognizer configured with the given options.

  • Gets a cloud text recognizer.

    Declaration

    Objective-C

    -(nonnullFIRVisionTextRecognizer*)cloudTextRecognizer;

    Return Value

    A text recognizer.

  • Gets a cloud document text recognizer configured with the given options.

    Declaration

    Objective-C

    -(nonnullFIRVisionDocumentTextRecognizer*)cloudDocumentTextRecognizerWithOptions:(nonnullFIRVisionCloudDocumentTextRecognizerOptions*)options;

    Parameters

    options

    Options for configuring the cloud document text recognizer.

    Return Value

    A document text recognizer configured with the given options.

  • Gets a cloud document text recognizer.

    Declaration

    Objective-C

    -(nonnullFIRVisionDocumentTextRecognizer*)cloudDocumentTextRecognizer;

    Return Value

    A document text recognizer.

  • Gets an instance of cloud landmark detector with the given options.

    Declaration

    Objective-C

    -(nonnullFIRVisionCloudLandmarkDetector*)cloudLandmarkDetectorWithOptions:(nonnullFIRVisionCloudDetectorOptions*)options;

    Parameters

    options

    Options for configuring the cloud landmark detector.

    Return Value

    A cloud landmark detector configured with the given options.

  • Gets an instance of cloud landmark detector with default options.

    Declaration

    Objective-C

    -(nonnullFIRVisionCloudLandmarkDetector*)cloudLandmarkDetector;

    Return Value

    A cloud landmark detector configured with default options.

  • Gets an instance of cloud image labeler with the given options.

    Declaration

    Objective-C

    -(nonnullFIRVisionImageLabeler*)cloudImageLabelerWithOptions:(nonnullFIRVisionCloudImageLabelerOptions*)options;

    Parameters

    options

    Options for configuring the cloud image labeler.

    Return Value

    A cloud image labeler configured with the given options.

  • Gets an instance of cloud image labeler with default options.

    Declaration

    Objective-C

    -(nonnullFIRVisionImageLabeler*)cloudImageLabeler;

    Return Value

    A cloud image labeler configured with default options.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2021-02-11 UTC.