Organize
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user