Compare commits

..

No commits in common. "82abe8b6d5f1109d803dbf5ada03aabb0075e36b" and "e7b63126d24f1558fbf77d2758ec4d9474e587c6" have entirely different histories.

4 changed files with 4 additions and 13 deletions

10
.vscode/launch.json vendored
View File

@ -14,16 +14,6 @@
], ],
"justMyCode": true "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": "Python: Module",
"name": "Full Debug", "name": "Full Debug",

View File

@ -1,5 +1,6 @@
# import face_recognition # import face_recognition
from pathlib import Path from pathlib import Path
import os
import cv2 import cv2
# import hjson as json # import hjson as json
@ -15,7 +16,7 @@ args = None
def main(): def main():
global objects_and_peoples global objects_and_peoples
global args global args
# RUN_BY_COMPOSE = os.getenv("RUN_BY_COMPOSE") # Replace this with code to check for gpu # RUN_BY_COMPOSE = os.getenv("RUN_BY_COMPOSE") # Replace this with code to check for gpu
args = argparser.parse_args() args = argparser.parse_args()

View File

@ -154,7 +154,7 @@ def set_argparse():
object_detection = argparser.add_argument_group("Object Detection options") object_detection = argparser.add_argument_group("Object Detection options")
object_detection.add_argument( object_detection.add_argument(
"--detect-object", "--detect-object",
action="append", nargs="*",
default=[], default=[],
type=str, type=str,
help="The object(s) to detect. Must be something the model is trained to detect", 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 # Also, make sure that the objects to detect are in the list of objects_and_peoples
# If it isn't, print a warning # If it isn't, print a warning
for obj in detect_object: for obj in detect_object:
if obj not in objects_and_peoples["objects"].keys(): if obj not in objects_and_peoples:
print( print(
f"Warning: {obj} is not in the list of objects the model can detect!" f"Warning: {obj} is not in the list of objects the model can detect!"
) )