AccuracyConfig.fromMap constructor
Creates accuracy settings from a map payload.
Implementation
factory AccuracyConfig.fromMap(Map<String, dynamic> map) {
return AccuracyConfig(
detectionThreshold: map['detectionThreshold']?.toDouble() ?? 0.6,
intersectionRatioThreshold:
map['intersectionRatioThreshold']?.toDouble() ?? 0.9,
extraHeightFactor: map['extraHeightFactor']?.toDouble() ?? 0.3,
inputSize: map['inputSize']?.toInt() ?? 224,
landmarkRatio: map['landmarkRatio']?.toDouble() ?? 0.95,
frameMargin: map['frameMargin']?.toDouble() ?? 0.05,
tiltAngleThreshold: map['tiltAngleThreshold']?.toDouble() ?? 6,
horizontalCenterTolerance:
map['horizontalCenterTolerance']?.toDouble() ?? 0.08,
earThreshold: map['earThreshold']?.toDouble() ?? 0.25,
minFaceWidthRatio: map['minFaceWidthRatio']?.toDouble() ?? 0.18,
maxFaceWidthRatio: map['maxFaceWidthRatio']?.toDouble() ?? 0.82,
qualityPassThreshold: map['qualityPassThreshold']?.toDouble() ?? 0.8,
yawLowerThreshold: map['yawLowerThreshold']?.toDouble() ?? 0.85,
yawUpperThreshold: map['yawUpperThreshold']?.toDouble() ?? 1.15,
);
}