Skip to main content

Object Detector Options

Default Model

An RNMLKitObjectDetectorOptions object is used to configure the behavior of the object detection process. This interface provides several optional properties that allow you to enable or disable certain features and set the mode of the detector.

PropertyTypeOptionalDescription
shouldEnableClassificationbooleanYesEnables or disables object classification.
shouldEnableMultipleObjectsbooleanYesEnables or disables the detection of multiple objects.
detectorMode'singleImage' | 'stream'YesSets the mode of the detector.

For more information on these options see the MLKit Docs

Example Usage

const options: RNMLKitObjectDetectorOptions = {
shouldEnableClassification: true,
shouldEnableMultipleObjects: false,
detectorMode: "stream",
};