diff --git a/wyzely_detect/__main__.py b/wyzely_detect/__main__.py index 7d8e16c..5db34e5 100644 --- a/wyzely_detect/__main__.py +++ b/wyzely_detect/__main__.py @@ -1,6 +1,5 @@ # import face_recognition from pathlib import Path -import os import cv2 # import hjson as json @@ -16,7 +15,7 @@ args = None def main(): global objects_and_peoples - global args + global args # RUN_BY_COMPOSE = os.getenv("RUN_BY_COMPOSE") # Replace this with code to check for gpu args = argparser.parse_args() diff --git a/wyzely_detect/utils/utils.py b/wyzely_detect/utils/utils.py index b5fcd6d..0a12de2 100644 --- a/wyzely_detect/utils/utils.py +++ b/wyzely_detect/utils/utils.py @@ -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!" )