FaceConfig constructor
FaceConfig({
- int minFaceSize = 200,
- double notFace = 0.6,
- double brightness = 40,
- double brightnessMax = 220,
- double blurness = 0.6,
- double occlusionLeftEye = 0.8,
- double occlusionRightEye = 0.8,
- double occlusionNose = 0.8,
- double occlusionMouth = 0.8,
- double occlusionLeftContour = 0.8,
- double occlusionRightContour = 0.8,
- double occlusionChin = 0.8,
- int headPitch = 20,
- int headYaw = 18,
- int headRoll = 20,
- double eyeClosed = 0.7,
- double scale = 1,
- int cropHeight = 640,
- int cropWidth = 480,
- double enlargeRatio = 1.5,
- double faceFarRatio = 0.4,
- double faceClosedRatio = 1,
- int secType = 0,
- bool sound = true,
- bool livenessRandom = true,
- Set<
LivenessType> ? livenessTypes,
Implementation
FaceConfig(
{this.minFaceSize = 200,
this.notFace = 0.6,
this.brightness = 40,
this.brightnessMax = 220,
this.blurness = 0.6,
this.occlusionLeftEye = 0.8,
this.occlusionRightEye = 0.8,
this.occlusionNose = 0.8,
this.occlusionMouth = 0.8,
this.occlusionLeftContour = 0.8,
this.occlusionRightContour = 0.8,
this.occlusionChin = 0.8,
this.headPitch = 20,
this.headYaw = 18,
this.headRoll = 20,
this.eyeClosed = 0.7,
// this.cacheImageNum = 3,
this.scale = 1,
this.cropHeight = 640,
this.cropWidth = 480,
this.enlargeRatio = 1.5,
this.faceFarRatio = 0.4,
this.faceClosedRatio = 1,
this.secType = 0,
this.sound = true,
this.livenessRandom = true,
Set<LivenessType>? livenessTypes})
: assert(0.1 <= notFace && notFace <= 1.0),
assert(0 <= brightness && brightness <= 255),
assert(0 <= brightnessMax && brightnessMax <= 255),
assert(0 <= blurness && blurness <= 1.0),
assert(0 <= occlusionLeftEye && occlusionLeftEye <= 1.0),
assert(0 <= occlusionRightEye && occlusionRightEye <= 1.0),
assert(0 <= occlusionNose && occlusionNose <= 1.0),
assert(0 <= occlusionMouth && occlusionMouth <= 1.0),
assert(0 <= occlusionLeftContour && occlusionLeftContour <= 1.0),
assert(0 <= occlusionRightContour && occlusionRightContour <= 1.0),
assert(0 <= occlusionChin && occlusionChin <= 1.0),
assert(0 <= headPitch && headPitch <= 45),
assert(0 <= headYaw && headYaw <= 45),
assert(0 <= headRoll && headRoll <= 45),
assert(0 <= eyeClosed && eyeClosed <= 1.0),
assert(0 <= scale && scale <= 1.0),
assert(0 < cropHeight && 0 < cropWidth),
assert(0 <= faceFarRatio && faceFarRatio <= 1.0),
assert(0 <= faceClosedRatio && faceClosedRatio <= 1.0),
assert(secType == 0 || secType == 1),
assert(livenessTypes == null || livenessTypes.length > 0) {
this.livenessTypes = livenessTypes ?? {};
}