# DetectSingleFaceTask | @vladmandic/face-api - v1.7.8
Documentation for @vladmandic/face-api - v1.7.8

# Class DetectSingleFaceTask

#### Hierarchy

- DetectFacesTaskBase < FaceDetection | undefined>
  - DetectSingleFaceTask

- Defined in globalApi/DetectFacesTasks.ts:64

#####
Index

### Constructors

constructor

### Methods

run
then
withAgeAndGender
withFaceExpressions
withFaceLandmarks

## Constructors

### constructor

- new DetectSingleFaceTask(input: any, options?: FaceDetectionOptions ): DetectSingleFaceTask

- #### Parameters

  - ##### input: any

  - ##### options: FaceDetectionOptions = ...

  #### Returns DetectSingleFaceTask

  Inherited from DetectFacesTaskBase.constructor

  - Defined in globalApi/DetectFacesTasks.ts:17

## Methods

### run

- run(): Promise<undefined | FaceDetection >

- #### Returns Promise<undefined | FaceDetection >

  Overrides DetectFacesTaskBase.run

  - Defined in globalApi/DetectFacesTasks.ts:65

### then

- then(onfulfilled: ((value: undefined | FaceDetection ) => undefined | FaceDetection | PromiseLike<undefined | FaceDetection >)): Promise<undefined | FaceDetection >

- #### Parameters

  - ##### onfulfilled: ((value: undefined | FaceDetection ) => undefined | FaceDetection | PromiseLike<undefined | FaceDetection >)

    - - (value: undefined | FaceDetection ): undefined | FaceDetection | PromiseLike<undefined | FaceDetection >

      - #### Parameters

        - ##### value: undefined | FaceDetection

        #### Returns undefined | FaceDetection | PromiseLike<undefined | FaceDetection >

  #### Returns Promise<undefined | FaceDetection >

  Inherited from DetectFacesTaskBase.then

  - Defined in globalApi/ComposableTask.ts:3

### withAgeAndGender

- withAgeAndGender(): PredictSingleAgeAndGenderTask<{
  detection: FaceDetection ;
  }>

- #### Returns PredictSingleAgeAndGenderTask<{
  detection: FaceDetection ;
  }>

  - Defined in globalApi/DetectFacesTasks.ts:97

### withFaceExpressions

- withFaceExpressions(): PredictSingleFaceExpressionsTask<{
  detection: FaceDetection ;
  }>

- #### Returns PredictSingleFaceExpressionsTask<{
  detection: FaceDetection ;
  }>

  - Defined in globalApi/DetectFacesTasks.ts:90

### withFaceLandmarks

- withFaceLandmarks(useTinyLandmarkNet?: boolean): DetectSingleFaceLandmarksTask <{
  detection: FaceDetection ;
  }>

- #### Parameters

  - ##### useTinyLandmarkNet: boolean = false

  #### Returns DetectSingleFaceLandmarksTask <{
  detection: FaceDetection ;
  }>

  - Defined in globalApi/DetectFacesTasks.ts:82