FaceDetectorOptions
Stay organized with collections
Save and categorize content based on your preferences.
Public Method Summary
boolean |
equals( Object o)
Indicates whether some other object is "equal to" this one.
|
int |
hashCode()
Returns a hash code value for the object.
|
String
|
|
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Constants
public static final int
CLASSIFICATION_MODE_ALL
Performs "eyes open" and "smiling" classification.
Constant Value: 2
public static final int
CLASSIFICATION_MODE_NONE
Does not perform classification.
Constant Value: 1
public static final int
CONTOUR_MODE_ALL
Detects FaceContour
for a given face. Note that it would return contours for up to 5 faces
Constant Value: 2
public static final int
CONTOUR_MODE_NONE
Does not perform contour detection.
Constant Value: 1
public static final int
LANDMARK_MODE_ALL
public static final int
LANDMARK_MODE_NONE
Does not perform landmark detection.
Constant Value: 1
Indicates a preference for accuracy in the options that may make an accuracy vs.
speed trade-off. This will tend to detect more faces and may be more precise in
determining values such as position, at the cost of speed.
Constant Value: 2
Indicates a preference for speed in the options that may make an accuracy vs. speed
trade-off. This will tend to detect fewer faces and may be less precise in determining
values such as position, but will run faster.
Constant Value: 1
Public Methods
public boolean equals (Object o)
Indicates whether some other object is "equal to" this one.
public int hashCode ()
Returns a hash code value for the object.
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-10-31 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-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eFaceDetectorOptions\u003c/code\u003e allows customization of face detection features in Google ML Kit.\u003c/p\u003e\n"],["\u003cp\u003eIt offers control over classification (smiling, eyes open), contour detection, landmark detection, and performance (accuracy vs.speed).\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can choose to enable or disable these features based on their specific needs using various mode options.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eFaceDetectorOptions\u003c/code\u003e provides constants for each feature and mode, allowing developers to easily configure the desired settings.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFaceDetectorOptions.Builder\u003c/code\u003e class is used to create and configure instances of \u003ccode\u003eFaceDetectorOptions\u003c/code\u003e.\u003c/p\u003e\n"]]],["`FaceDetectorOptions` configures face detection with options like `ClassificationMode` (smiling, eyes open), `ContourMode` (face outlines), `LandmarkMode` (facial features), and `PerformanceMode` (accuracy vs. speed). Constants define these modes: `*_MODE_ALL` enables detection, `*_MODE_NONE` disables it. `PERFORMANCE_MODE_ACCURATE` prioritizes accuracy, while `PERFORMANCE_MODE_FAST` favors speed. Key actions include setting detection preferences and utilizing the `Builder` class. Other public methods include `equals`, `hashCode`, and `toString`.\n"],null,["# FaceDetectorOptions\n\npublic class **FaceDetectorOptions** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nOptions for [FaceDetector](/android/reference/com/google/mlkit/vision/face/FaceDetector). \n\n### Nested Class Summary\n\n|------------|---|---|--------------------------------------------------------------------------------------------------------------|\n| class | [FaceDetectorOptions.Builder](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions.Builder) || Builder class of [FaceDetectorOptions](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions). |\n| @interface | [FaceDetectorOptions.ClassificationMode](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions.ClassificationMode) || Defines options for characterizing attributes such as \"smiling\" \\* and \"eyes open\". |\n| @interface | [FaceDetectorOptions.ContourMode](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions.ContourMode) || Defines options to enable face contours or not. |\n| @interface | [FaceDetectorOptions.LandmarkMode](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions.LandmarkMode) || Defines options to enable face landmarks or not. |\n| @interface | [FaceDetectorOptions.PerformanceMode](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions.PerformanceMode) || Defines options to control accuracy / speed trade-offs in performing face detection. |\n\n### Constant Summary\n\n|-----|----------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------|\n| int | [CLASSIFICATION_MODE_ALL](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions#CLASSIFICATION_MODE_ALL) | Performs \"eyes open\" and \"smiling\" classification. |\n| int | [CLASSIFICATION_MODE_NONE](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions#CLASSIFICATION_MODE_NONE) | Does not perform classification. |\n| int | [CONTOUR_MODE_ALL](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions#CONTOUR_MODE_ALL) | Detects [FaceContour](/android/reference/com/google/mlkit/vision/face/FaceContour) for a given face. |\n| int | [CONTOUR_MODE_NONE](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions#CONTOUR_MODE_NONE) | Does not perform contour detection. |\n| int | [LANDMARK_MODE_ALL](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions#LANDMARK_MODE_ALL) | Detects [FaceLandmark](/android/reference/com/google/mlkit/vision/face/FaceLandmark) for a given face. |\n| int | [LANDMARK_MODE_NONE](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions#LANDMARK_MODE_NONE) | Does not perform landmark detection. |\n| int | [PERFORMANCE_MODE_ACCURATE](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions#PERFORMANCE_MODE_ACCURATE) | Indicates a preference for accuracy in the options that may make an accuracy vs. |\n| int | [PERFORMANCE_MODE_FAST](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions#PERFORMANCE_MODE_FAST) | Indicates a preference for speed in the options that may make an accuracy vs. |\n\n### Public Method Summary\n\n|-------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions#equals(java.lang.Object))([Object](//developer.android.com/reference/java/lang/Object.html) o) Indicates whether some other object is \"equal to\" this one. |\n| int | [hashCode](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions#hashCode())() Returns a hash code value for the object. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [toString](/android/reference/com/google/mlkit/vision/face/FaceDetectorOptions#toString())() |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nConstants\n---------\n\n#### public static final int\n**CLASSIFICATION_MODE_ALL**\n\nPerforms \"eyes open\" and \"smiling\" classification. \nConstant Value: 2 \n\n#### public static final int\n**CLASSIFICATION_MODE_NONE**\n\nDoes not perform classification. \nConstant Value: 1 \n\n#### public static final int\n**CONTOUR_MODE_ALL**\n\nDetects [FaceContour](/android/reference/com/google/mlkit/vision/face/FaceContour)\nfor a given face. Note that it would return contours for up to 5 faces \nConstant Value: 2 \n\n#### public static final int\n**CONTOUR_MODE_NONE**\n\nDoes not perform contour detection. \nConstant Value: 1 \n\n#### public static final int\n**LANDMARK_MODE_ALL**\n\nDetects [FaceLandmark](/android/reference/com/google/mlkit/vision/face/FaceLandmark)\nfor a given face. \nConstant Value: 2 \n\n#### public static final int\n**LANDMARK_MODE_NONE**\n\nDoes not perform landmark detection. \nConstant Value: 1 \n\n#### public static final int\n**PERFORMANCE_MODE_ACCURATE**\n\nIndicates a preference for accuracy in the options that may make an accuracy vs.\nspeed trade-off. This will tend to detect more faces and may be more precise in\ndetermining values such as position, at the cost of speed. \nConstant Value: 2 \n\n#### public static final int\n**PERFORMANCE_MODE_FAST**\n\nIndicates a preference for speed in the options that may make an accuracy vs. speed\ntrade-off. This will tend to detect fewer faces and may be less precise in determining\nvalues such as position, but will run faster. \nConstant Value: 1\n\nPublic Methods\n--------------\n\n#### public boolean **equals** ([Object](//developer.android.com/reference/java/lang/Object.html) o)\n\nIndicates whether some other object is \"equal to\" this one. \n\n#### public int **hashCode** ()\n\nReturns a hash code value for the object. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **toString** ()"]]