Compare commits

...

2 Commits

4 changed files with 13 additions and 4 deletions

10
.vscode/launch.json vendored
View File

@ -14,6 +14,16 @@
],
"justMyCode": true
},
// {
// "name": "Quick, Specific Debug",
// "type": "python",
// "request": "launch",
// "module": "wyzely_detect",
// "args": [
// "--run-scale", "0.25", "--view-scale", "0.5", "--no-remove-representations", "--detect-object", "person", "--detect-object", "cell phone"
// ],
// "justMyCode": true
// },
{
// "name": "Python: Module",
"name": "Full Debug",

View File

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

View File

@ -154,7 +154,7 @@ def set_argparse():
object_detection = argparser.add_argument_group("Object Detection options")
object_detection.add_argument(
"--detect-object",
nargs="*",
action="append",
default=[],
type=str,
help="The object(s) to detect. Must be something the model is trained to detect",

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!"
)