The 'security_cam.py' file is a generic 'live-object-detection' script and can be modified very easily to detect a total of 20 different objects.
If we look at line 119:
# "Class of interest" - Display detections only if they match this class ID
CLASS_PERSON = 15
To detect dogs, just change this to:
# "Class of interest" - Display detections only if they match this class ID
CLASS_DOG = 12
Also, line 200 needs to be changed as well:
# Filter a specific class/category
if( output_dict.get( 'detection_classes_' + str(i) ) == CLASS_PERSON ):
Although the person class worked really well and was quite impressive, the dog class was a little bit underwhelming and not nearly as good as some of the other models I've tested. Nonetheless, here's the full list of classes available with this model:
- Aeroplane
- Bycycle
- Bird
- Boat
- Bottle
- Bus
- Car
- Cat
- Chair
- Cow
- Diningtable
- Dog
- Horse
- Motorbike
- Person
- Pottedplant
- Sheep
- Sofa
- Train
- TVmonitor
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.