Skip to content

Commit

Permalink
fix: set min values for face detection to reasonable values (immich-a…
Browse files Browse the repository at this point in the history
…pp#12877)

fix: set min values for face detection to >0
  • Loading branch information
danieldietzler authored Sep 24, 2024
1 parent bcd4164 commit ec32a9e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions mobile/openapi/lib/model/facial_recognition_config.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions open-api/immich-openapi-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -9119,7 +9119,7 @@
"maxDistance": {
"format": "double",
"maximum": 2,
"minimum": 0,
"minimum": 0.1,
"type": "number"
},
"minFaces": {
Expand All @@ -9129,7 +9129,7 @@
"minScore": {
"format": "double",
"maximum": 1,
"minimum": 0,
"minimum": 0.1,
"type": "number"
},
"modelName": {
Expand Down
4 changes: 2 additions & 2 deletions server/src/dtos/model-config.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 !==
Expand All @@ -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 !==
Expand Down

0 comments on commit ec32a9e

Please sign in to comment.