Commit 5be059ae authored by vincent's avatar vincent

withAgeAndGender from detect faces tasks

parent d50c2b14
......@@ -8,6 +8,7 @@ import { TinyFaceDetectorOptions } from '../tinyFaceDetector/TinyFaceDetectorOpt
import { ComposableTask } from './ComposableTask';
import { DetectAllFaceLandmarksTask, DetectSingleFaceLandmarksTask } from './DetectFaceLandmarksTasks';
import { nets } from './nets';
import { PredictAllAgeAndGenderTask, PredictSingleAgeAndGenderTask } from './PredictAgeAndGenderTask';
import { PredictAllFaceExpressionsTask, PredictSingleFaceExpressionsTask } from './PredictFaceExpressionsTask';
import { FaceDetectionOptions } from './types';
......@@ -71,6 +72,13 @@ export class DetectAllFacesTask extends DetectFacesTaskBase<FaceDetection[]> {
this.input
)
}
withAgeAndGender() {
return new PredictAllAgeAndGenderTask(
this.runAndExtendWithFaceDetections(),
this.input
)
}
}
export class DetectSingleFaceTask extends DetectFacesTaskBase<FaceDetection | undefined> {
......@@ -108,4 +116,10 @@ export class DetectSingleFaceTask extends DetectFacesTaskBase<FaceDetection | un
)
}
withAgeAndGender() {
return new PredictSingleAgeAndGenderTask(
this.runAndExtendWithFaceDetection(),
this.input
)
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment