MLKitObjectDetection Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
Constants
The following constants are available globally.
-
In single image mode, the results are returned when both tracker and detector are finished.
-
In stream mode, tracker and detector run in parallel. The results are returned when tracker
processing is finished. Detection may still be in progress at that time.
-
The fashion good object label.
-
The home good object label.
-
-
-
-
The fashion good object label.
-
The home good object label.
-
-
-
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003eThis documentation outlines the available global constants for object detection in ML Kit.\u003c/p\u003e\n"],["\u003cp\u003eTwo main detector modes are presented: \u003ccode\u003esingleImage\u003c/code\u003e where results are returned after tracker and detector finish, and \u003ccode\u003estream\u003c/code\u003e where results are returned after tracker processing while detection might still be ongoing.\u003c/p\u003e\n"],["\u003cp\u003eSeveral object label constants are defined, including \u003ccode\u003efashionGood\u003c/code\u003e, \u003ccode\u003ehomeGood\u003c/code\u003e, \u003ccode\u003efood\u003c/code\u003e, \u003ccode\u003eplace\u003c/code\u003e, and \u003ccode\u003eplant\u003c/code\u003e, available as both labels and label indices.\u003c/p\u003e\n"]]],["This content defines constants for object detection modes and labels in a Swift environment. It outlines two detection modes: `singleImage`, where results are returned upon completion of both tracking and detection, and `stream`, where tracking results are prioritized while detection may still be in progress. It also defines object labels like `fashionGood`, `homeGood`, `food`, `place`, and `plant`, for classifying detected objects, with distinct declarations for standard labels and indexed labels.\n"],null,["# MLKitObjectDetection Framework Reference\n\nConstants\n=========\n\nThe following constants are available globally.\n- `\n ``\n ``\n `\n\n ### [singleImage](#/c:MLKCommonObjectDetectorOptions.h@MLKObjectDetectorModeSingleImage)\n\n `\n ` \n In single image mode, the results are returned when both tracker and detector are finished. \n\n #### Declaration\n\n Swift \n\n static let singleImage: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKCommonObjectDetectorOptions.h@T@MLKObjectDetectorMode\n\n- `\n ``\n ``\n `\n\n ### [stream](#/c:MLKCommonObjectDetectorOptions.h@MLKObjectDetectorModeStream)\n\n `\n ` \n In stream mode, tracker and detector run in parallel. The results are returned when tracker\n processing is finished. Detection may still be in progress at that time. \n\n #### Declaration\n\n Swift \n\n static let stream: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKCommonObjectDetectorOptions.h@T@MLKObjectDetectorMode\n\n- `\n ``\n ``\n `\n\n ### [fashionGood](#/c:@MLKDetectedObjectLabelFashionGood)\n\n `\n ` \n The fashion good object label. \n\n #### Declaration\n\n Swift \n\n static let fashionGood: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKObjectDetectorOptions.h@T@MLKDetectedObjectLabel\n\n- `\n ``\n ``\n `\n\n ### [homeGood](#/c:@MLKDetectedObjectLabelHomeGood)\n\n `\n ` \n The home good object label. \n\n #### Declaration\n\n Swift \n\n static let homeGood: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKObjectDetectorOptions.h@T@MLKDetectedObjectLabel\n\n- `\n ``\n ``\n `\n\n ### [food](#/c:@MLKDetectedObjectLabelFood)\n\n `\n ` \n The food object label. \n\n #### Declaration\n\n Swift \n\n static let food: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKObjectDetectorOptions.h@T@MLKDetectedObjectLabel\n\n- `\n ``\n ``\n `\n\n ### [place](#/c:@MLKDetectedObjectLabelPlace)\n\n `\n ` \n The place object label. \n\n #### Declaration\n\n Swift \n\n static let place: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKObjectDetectorOptions.h@T@MLKDetectedObjectLabel\n\n- `\n ``\n ``\n `\n\n ### [plant](#/c:@MLKDetectedObjectLabelPlant)\n\n `\n ` \n The plant object label. \n\n #### Declaration\n\n Swift \n\n static let plant: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKObjectDetectorOptions.h@T@MLKDetectedObjectLabel\n\n- `\n ``\n ``\n `\n\n ### [fashionGood](#/c:MLKObjectDetectorOptions.h@MLKDetectedObjectLabelIndexFashionGood)\n\n `\n ` \n The fashion good object label. \n\n #### Declaration\n\n Swift \n\n static let fashionGood: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKObjectDetectorOptions.h@T@MLKDetectedObjectLabelIndex\n\n- `\n ``\n ``\n `\n\n ### [homeGood](#/c:MLKObjectDetectorOptions.h@MLKDetectedObjectLabelIndexHomeGood)\n\n `\n ` \n The home good object label. \n\n #### Declaration\n\n Swift \n\n static let homeGood: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKObjectDetectorOptions.h@T@MLKDetectedObjectLabelIndex\n\n- `\n ``\n ``\n `\n\n ### [food](#/c:MLKObjectDetectorOptions.h@MLKDetectedObjectLabelIndexFood)\n\n `\n ` \n The food object label. \n\n #### Declaration\n\n Swift \n\n static let food: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKObjectDetectorOptions.h@T@MLKDetectedObjectLabelIndex\n\n- `\n ``\n ``\n `\n\n ### [place](#/c:MLKObjectDetectorOptions.h@MLKDetectedObjectLabelIndexPlace)\n\n `\n ` \n The place object label. \n\n #### Declaration\n\n Swift \n\n static let place: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKObjectDetectorOptions.h@T@MLKDetectedObjectLabelIndex\n\n- `\n ``\n ``\n `\n\n ### [plant](#/c:MLKObjectDetectorOptions.h@MLKDetectedObjectLabelIndexPlant)\n\n `\n ` \n The plant object label. \n\n #### Declaration\n\n Swift \n\n static let plant: /ml-kit/reference/swift/mlkitobjectdetection/api/reference/Type-Definitions#/c:MLKObjectDetectorOptions.h@T@MLKDetectedObjectLabelIndex"]]