mirror of https://github.com/vladmandic/human
parametrize face config
parent
81bf83c948
commit
b8d594e18d
|
@ -11,6 +11,8 @@
|
||||||
|
|
||||||
### **HEAD -> main** 2021/09/11 mandic00@live.com
|
### **HEAD -> main** 2021/09/11 mandic00@live.com
|
||||||
|
|
||||||
|
- redefine config and result interfaces
|
||||||
|
- fix usge of string enums
|
||||||
- start using partial definitions
|
- start using partial definitions
|
||||||
- implement event emitters
|
- implement event emitters
|
||||||
- fix iife loader
|
- fix iife loader
|
||||||
|
|
|
@ -8,6 +8,40 @@
|
||||||
* @typedef Config
|
* @typedef Config
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
export interface FaceDetectorConfig {
|
||||||
|
modelPath: string,
|
||||||
|
rotation: boolean,
|
||||||
|
maxDetected: number,
|
||||||
|
skipFrames: number,
|
||||||
|
minConfidence: number,
|
||||||
|
iouThreshold: number,
|
||||||
|
return: boolean,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FaceMeshConfig {
|
||||||
|
enabled: boolean,
|
||||||
|
modelPath: string,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FaceIrisConfig {
|
||||||
|
enabled: boolean,
|
||||||
|
modelPath: string,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FaceDescriptionConfig {
|
||||||
|
enabled: boolean,
|
||||||
|
modelPath: string,
|
||||||
|
skipFrames: number,
|
||||||
|
minConfidence: number,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface FaceEmotionConfig {
|
||||||
|
enabled: boolean,
|
||||||
|
minConfidence: number,
|
||||||
|
skipFrames: number,
|
||||||
|
modelPath: string,
|
||||||
|
}
|
||||||
|
|
||||||
/** Controlls and configures all face-specific options:
|
/** Controlls and configures all face-specific options:
|
||||||
* - face detection, face mesh detection, age, gender, emotion detection and face description
|
* - face detection, face mesh detection, age, gender, emotion detection and face description
|
||||||
* Parameters:
|
* Parameters:
|
||||||
|
@ -21,35 +55,11 @@
|
||||||
*/
|
*/
|
||||||
export interface FaceConfig {
|
export interface FaceConfig {
|
||||||
enabled: boolean,
|
enabled: boolean,
|
||||||
detector: {
|
detector: Partial<FaceDetectorConfig>,
|
||||||
modelPath?: string,
|
mesh: Partial<FaceMeshConfig>,
|
||||||
rotation?: boolean,
|
iris: Partial<FaceIrisConfig>,
|
||||||
maxDetected?: number,
|
description: Partial<FaceDescriptionConfig>,
|
||||||
skipFrames?: number,
|
emotion: Partial<FaceEmotionConfig>,
|
||||||
minConfidence?: number,
|
|
||||||
iouThreshold?: number,
|
|
||||||
return?: boolean,
|
|
||||||
},
|
|
||||||
mesh: {
|
|
||||||
enabled?: boolean,
|
|
||||||
modelPath?: string,
|
|
||||||
},
|
|
||||||
iris: {
|
|
||||||
enabled?: boolean,
|
|
||||||
modelPath?: string,
|
|
||||||
},
|
|
||||||
description: {
|
|
||||||
enabled?: boolean,
|
|
||||||
modelPath?: string,
|
|
||||||
skipFrames?: number,
|
|
||||||
minConfidence?: number,
|
|
||||||
},
|
|
||||||
emotion: {
|
|
||||||
enabled?: boolean,
|
|
||||||
minConfidence?: number,
|
|
||||||
skipFrames?: number,
|
|
||||||
modelPath?: string,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Controlls and configures all body detection specific options
|
/** Controlls and configures all body detection specific options
|
||||||
|
|
Loading…
Reference in New Issue