AI-generated Key Takeaways
-
ObjectDetectorOptions.Builder
helps create customizedObjectDetectorOptions
for object detection in images. -
It allows enabling object classification and detection of multiple objects (up to 5) per image.
-
You can choose between
STREAM_MODE
(default) andSINGLE_IMAGE_MODE
for detection based on your use case. -
Optionally, a custom
Executor
can be set for task execution, otherwise an internal thread pool is used.
Builder of ObjectDetectorOptions
.
Public Constructor Summary
Builder()
|
Public Method Summary
ObjectDetectorOptions |
build()
|
ObjectDetectorOptions.Builder |
enableClassification()
Enables classification.
|
ObjectDetectorOptions.Builder |
enableMultipleObjects()
Enables multiple objects for detection.
|
ObjectDetectorOptions.Builder |
setDetectorMode(int detectorMode)
Sets the
DetectorMode , which contains two modes,
ObjectDetectorOptionsBase.STREAM_MODE and
ObjectDetectorOptionsBase.SINGLE_IMAGE_MODE .
|
ObjectDetectorOptions.Builder |
Inherited Method Summary
Public Constructors
public Builder ()
Public Methods
public ObjectDetectorOptions build ()
public ObjectDetectorOptions.Builder enableClassification ()
Enables classification.
By default, the classification is off.
public ObjectDetectorOptions.Builder enableMultipleObjects ()
Enables multiple objects for detection.
When enabled, the maximum number of detected objects per image is 5.
By default, the detector detects prominent object only.
public ObjectDetectorOptions.Builder setDetectorMode (int detectorMode)
Sets the
DetectorMode
, which contains two modes,
ObjectDetectorOptionsBase.STREAM_MODE
and
ObjectDetectorOptionsBase.SINGLE_IMAGE_MODE
. For more details, please see
comments for
ObjectDetectorOptionsBase.STREAM_MODE
and
ObjectDetectorOptionsBase.SINGLE_IMAGE_MODE
.
By default, it is
ObjectDetectorOptionsBase.STREAM_MODE
.