File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { TinyFaceDetectorOptions } from '../tinyFaceDetector/TinyFaceDetectorOpt
8
8
import { ComposableTask } from './ComposableTask' ;
9
9
import { DetectAllFaceLandmarksTask , DetectSingleFaceLandmarksTask } from './DetectFaceLandmarksTasks' ;
10
10
import { nets } from './nets' ;
11
+ import { PredictAllAgeAndGenderTask , PredictSingleAgeAndGenderTask } from './PredictAgeAndGenderTask' ;
11
12
import { PredictAllFaceExpressionsTask , PredictSingleFaceExpressionsTask } from './PredictFaceExpressionsTask' ;
12
13
import { FaceDetectionOptions } from './types' ;
13
14
@@ -71,6 +72,13 @@ export class DetectAllFacesTask extends DetectFacesTaskBase<FaceDetection[]> {
71
72
this . input
72
73
)
73
74
}
75
+
76
+ withAgeAndGender ( ) {
77
+ return new PredictAllAgeAndGenderTask (
78
+ this . runAndExtendWithFaceDetections ( ) ,
79
+ this . input
80
+ )
81
+ }
74
82
}
75
83
76
84
export class DetectSingleFaceTask extends DetectFacesTaskBase < FaceDetection | undefined > {
@@ -108,4 +116,10 @@ export class DetectSingleFaceTask extends DetectFacesTaskBase<FaceDetection | un
108
116
)
109
117
}
110
118
119
+ withAgeAndGender ( ) {
120
+ return new PredictSingleAgeAndGenderTask (
121
+ this . runAndExtendWithFaceDetection ( ) ,
122
+ this . input
123
+ )
124
+ }
111
125
}
You can’t perform that action at this time.
0 commit comments