This commit is contained in:
laurenspriem
2025-06-19 09:36:14 +05:30
parent 686ab262b2
commit e48caecfe0
2 changed files with 5 additions and 6 deletions

View File

@@ -8,6 +8,7 @@ import 'package:onnxruntime/onnxruntime.dart';
import "package:photos/models/ml/face/dimension.dart";
import 'package:photos/services/machine_learning/face_ml/face_detection/detection.dart';
import "package:photos/services/machine_learning/face_ml/face_detection/face_detection_postprocessing.dart";
import "package:photos/services/machine_learning/face_ml/face_filtering/face_filtering_constants.dart";
import "package:photos/services/machine_learning/ml_model.dart";
import "package:photos/utils/image_ml_util.dart";
@@ -31,7 +32,7 @@ class FaceDetectionService extends MlModel {
static const int kInputWidth = 640;
static const int kInputHeight = 640;
static const double kIouThreshold = 0.4;
static const double kMinScoreSigmoidThreshold = 0.5;
static const double kMinScoreSigmoidThreshold = kMinFaceDetectionScore;
static const int kNumKeypoints = 5;
// Singleton pattern

View File

@@ -1,5 +1,3 @@
import 'package:photos/services/machine_learning/face_ml/face_detection/face_detection_service.dart';
/// Blur detection threshold
const kLaplacianHardThreshold = 10;
const kLaplacianSoftThreshold = 50;
@@ -8,6 +6,9 @@ const kLaplacianVerySoftThreshold = 200;
/// Default blur value
const kLapacianDefault = 10000.0;
/// The minimum score for a face to be detected, regardless of quality. Use [kMinimumQualityFaceScore] for high quality faces.
const kMinFaceDetectionScore = 0.5;
/// The minimum score for a face to be shown as detected in the UI
const kMinimumFaceShowScore = 0.75;
@@ -16,9 +17,6 @@ const kMinimumQualityFaceScore = 0.80;
const kMediumQualityFaceScore = 0.85;
const kHighQualityFaceScore = 0.90;
/// The minimum score for a face to be detected, regardless of quality. Use [kMinimumQualityFaceScore] for high quality faces.
const kMinFaceDetectionScore = FaceDetectionService.kMinScoreSigmoidThreshold;
/// The minimum cluster size for displaying a cluster in the UI by default
const kMinimumClusterSizeSearchResult = 10;