# MLKitFaceDetection Framework Reference

# Type Definitions

The following type definitions are available globally.
- `


  ### [FaceContourType](https://developers.google.com/ml-kit/reference/swift/mlkitfacedetection/api/reference/Type-Definitions#/c:MLKFaceContour.h@T@MLKFaceContourType)


  ` The facial contours.

  #### Declaration

  Swift

      struct FaceContourType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable

- `


  ### [FaceDetectionCallback](https://developers.google.com/ml-kit/reference/swift/mlkitfacedetection/api/reference/Type-Definitions#/c:MLKFaceDetector.h@T@MLKFaceDetectionCallback)


  ` A block containing an array of faces or `nil` if there's an error.

  #### Declaration

  Swift

      typealias FaceDetectionCallback = ([MLKFace]?, Error?) -> Void

  #### Parameters

  |---|---|
  | ` faces ` | Array of faces detected in the image or `nil` if there was an error. |
  | ` error ` | The error or `nil`. |

- `


  ### [FaceDetectorClassificationMode](https://developers.google.com/ml-kit/reference/swift/mlkitfacedetection/api/reference/Type-Definitions#/c:MLKFaceDetectorOptions.h@T@MLKFaceDetectorClassificationMode)


  ` @enum FaceDetectorClassificationMode
  Classification mode for face detection.

  #### Declaration

  Swift

      struct FaceDetectorClassificationMode : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable

- `


  ### [FaceDetectorPerformanceMode](https://developers.google.com/ml-kit/reference/swift/mlkitfacedetection/api/reference/Type-Definitions#/c:MLKFaceDetectorOptions.h@T@MLKFaceDetectorPerformanceMode)


  ` @enum FaceDetectorPerformanceMode
  Performance preference for accuracy or speed of face detection.

  #### Declaration

  Swift

      struct FaceDetectorPerformanceMode : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable

- `


  ### [FaceDetectorLandmarkMode](https://developers.google.com/ml-kit/reference/swift/mlkitfacedetection/api/reference/Type-Definitions#/c:MLKFaceDetectorOptions.h@T@MLKFaceDetectorLandmarkMode)


  ` @enum FaceDetectorLandmarkMode
  Landmark detection mode for face detection.

  #### Declaration

  Swift

      struct FaceDetectorLandmarkMode : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable

- `


  ### [FaceDetectorContourMode](https://developers.google.com/ml-kit/reference/swift/mlkitfacedetection/api/reference/Type-Definitions#/c:MLKFaceDetectorOptions.h@T@MLKFaceDetectorContourMode)


  ` @enum FaceDetectorContourMode
  Contour detection mode for face detection.

  #### Declaration

  Swift

      struct FaceDetectorContourMode : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable

- `


  ### [FaceLandmarkType](https://developers.google.com/ml-kit/reference/swift/mlkitfacedetection/api/reference/Type-Definitions#/c:MLKFaceLandmark.h@T@MLKFaceLandmarkType)


  ` The facial landmarks.

  #### Declaration

  Swift

      struct FaceLandmarkType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable