AI-generated Key Takeaways
-
This documentation outlines the available global constants for object detection in ML Kit.
-
Two main detector modes are presented:
singleImagewhere results are returned after tracker and detector finish, andstreamwhere results are returned after tracker processing while detection might still be ongoing. -
Several object label constants are defined, including
fashionGood,homeGood,food,place, andplant, available as both labels and label indices.
Constants
The following constants are available globally.
-
In single image mode, the results are returned when both tracker and detector are finished.
Declaration
Swift
static let singleImage: ObjectDetectorMode -
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.
Declaration
Swift
static let stream: ObjectDetectorMode -
The fashion good object label.
Declaration
Swift
static let fashionGood: DetectedObjectLabel -
The home good object label.
Declaration
Swift
static let homeGood: DetectedObjectLabel -
The food object label.
Declaration
Swift
static let food: DetectedObjectLabel -
The place object label.
Declaration
Swift
static let place: DetectedObjectLabel -
The plant object label.
Declaration
Swift
static let plant: DetectedObjectLabel -
The fashion good object label.
Declaration
Swift
static let fashionGood: DetectedObjectLabelIndex -
The home good object label.
Declaration
Swift
static let homeGood: DetectedObjectLabelIndex -
The food object label.
Declaration
Swift
static let food: DetectedObjectLabelIndex -
The place object label.
Declaration
Swift
static let place: DetectedObjectLabelIndex -
The plant object label.
Declaration
Swift
static let plant: DetectedObjectLabelIndex