mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
fix: machine learning only take results with > 90% confidence (#1875)
This commit is contained in:
parent
6c7679714b
commit
3d468c369c
1 changed files with 2 additions and 5 deletions
|
@ -45,11 +45,8 @@ def run_engine(engine, path):
|
||||||
|
|
||||||
for index, pred in enumerate(predictions):
|
for index, pred in enumerate(predictions):
|
||||||
tags = pred['label'].split(', ')
|
tags = pred['label'].split(', ')
|
||||||
if (index == 0):
|
if (pred['score'] > 0.9):
|
||||||
result = tags
|
result = [*result, *tags]
|
||||||
else:
|
|
||||||
if (pred['score'] > 0.5):
|
|
||||||
result = [*result, *tags]
|
|
||||||
|
|
||||||
if (len(result) > 1):
|
if (len(result) > 1):
|
||||||
result = list(set(result))
|
result = list(set(result))
|
||||||
|
|
Loading…
Reference in a new issue