Fixed incorrect warning when using `--detect-object`

This commit is contained in:
slashtechno 2023-12-24 15:28:47 -06:00
parent e7b63126d2
commit 06bd1ccbd7
Signed by: slashtechno
GPG Key ID: 8EC1D9D9286C2B17
2 changed files with 2 additions and 3 deletions

View File

@ -1,6 +1,5 @@
# import face_recognition
from pathlib import Path
import os
import cv2
# import hjson as json

View File

@ -100,7 +100,7 @@ def process_footage(
# Also, make sure that the objects to detect are in the list of objects_and_peoples
# If it isn't, print a warning
for obj in detect_object:
if obj not in objects_and_peoples:
if obj not in objects_and_peoples["objects"].keys():
print(
f"Warning: {obj} is not in the list of objects the model can detect!"
)