Compare commits
2 Commits
e7b63126d2
...
82abe8b6d5
Author | SHA1 | Date |
---|---|---|
slashtechno | 82abe8b6d5 | |
slashtechno | 06bd1ccbd7 |
|
@ -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",
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# import face_recognition
|
||||
from pathlib import Path
|
||||
import os
|
||||
import cv2
|
||||
|
||||
# import hjson as json
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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!"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue