mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	fix: set min values for face detection to reasonable values (#12877)
fix: set min values for face detection to >0
This commit is contained in:
		
							parent
							
								
									bcd416477b
								
							
						
					
					
						commit
						ec32a9e610
					
				@ -22,14 +22,14 @@ class FacialRecognitionConfig {
 | 
			
		||||
 | 
			
		||||
  bool enabled;
 | 
			
		||||
 | 
			
		||||
  /// Minimum value: 0
 | 
			
		||||
  /// Minimum value: 0.1
 | 
			
		||||
  /// Maximum value: 2
 | 
			
		||||
  double maxDistance;
 | 
			
		||||
 | 
			
		||||
  /// Minimum value: 1
 | 
			
		||||
  int minFaces;
 | 
			
		||||
 | 
			
		||||
  /// Minimum value: 0
 | 
			
		||||
  /// Minimum value: 0.1
 | 
			
		||||
  /// Maximum value: 1
 | 
			
		||||
  double minScore;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -9119,7 +9119,7 @@
 | 
			
		||||
          "maxDistance": {
 | 
			
		||||
            "format": "double",
 | 
			
		||||
            "maximum": 2,
 | 
			
		||||
            "minimum": 0,
 | 
			
		||||
            "minimum": 0.1,
 | 
			
		||||
            "type": "number"
 | 
			
		||||
          },
 | 
			
		||||
          "minFaces": {
 | 
			
		||||
@ -9129,7 +9129,7 @@
 | 
			
		||||
          "minScore": {
 | 
			
		||||
            "format": "double",
 | 
			
		||||
            "maximum": 1,
 | 
			
		||||
            "minimum": 0,
 | 
			
		||||
            "minimum": 0.1,
 | 
			
		||||
            "type": "number"
 | 
			
		||||
          },
 | 
			
		||||
          "modelName": {
 | 
			
		||||
 | 
			
		||||
@ -27,14 +27,14 @@ export class DuplicateDetectionConfig extends TaskConfig {
 | 
			
		||||
 | 
			
		||||
export class FacialRecognitionConfig extends ModelConfig {
 | 
			
		||||
  @IsNumber()
 | 
			
		||||
  @Min(0)
 | 
			
		||||
  @Min(0.1)
 | 
			
		||||
  @Max(1)
 | 
			
		||||
  @Type(() => Number)
 | 
			
		||||
  @ApiProperty({ type: 'number', format: 'double' })
 | 
			
		||||
  minScore!: number;
 | 
			
		||||
 | 
			
		||||
  @IsNumber()
 | 
			
		||||
  @Min(0)
 | 
			
		||||
  @Min(0.1)
 | 
			
		||||
  @Max(2)
 | 
			
		||||
  @Type(() => Number)
 | 
			
		||||
  @ApiProperty({ type: 'number', format: 'double' })
 | 
			
		||||
 | 
			
		||||
@ -145,7 +145,7 @@
 | 
			
		||||
            desc={$t('admin.machine_learning_min_detection_score_description')}
 | 
			
		||||
            bind:value={config.machineLearning.facialRecognition.minScore}
 | 
			
		||||
            step="0.1"
 | 
			
		||||
            min={0}
 | 
			
		||||
            min={0.1}
 | 
			
		||||
            max={1}
 | 
			
		||||
            disabled={disabled || !config.machineLearning.enabled || !config.machineLearning.facialRecognition.enabled}
 | 
			
		||||
            isEdited={config.machineLearning.facialRecognition.minScore !==
 | 
			
		||||
@ -158,7 +158,7 @@
 | 
			
		||||
            desc={$t('admin.machine_learning_max_recognition_distance_description')}
 | 
			
		||||
            bind:value={config.machineLearning.facialRecognition.maxDistance}
 | 
			
		||||
            step="0.1"
 | 
			
		||||
            min={0}
 | 
			
		||||
            min={0.1}
 | 
			
		||||
            max={2}
 | 
			
		||||
            disabled={disabled || !config.machineLearning.enabled || !config.machineLearning.facialRecognition.enabled}
 | 
			
		||||
            isEdited={config.machineLearning.facialRecognition.maxDistance !==
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user