Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verfiy that the "thing" setting off the framework is not an animal before sending the photo #38

Open
amboxer21 opened this issue Aug 10, 2020 · 3 comments

Comments

@amboxer21
Copy link
Owner

I need to check if an animal set off the framework before sending an email. If it was an animal who set motiondetection off, then I should not send an email. This can be done by looking in the dir where the ohotos reside and running a check against the photo with image recognition.

@amboxer21
Copy link
Owner Author

amboxer21 commented Aug 10, 2020

Display the image with the common images that were detected:

import cv2
import matplotlib.pyplot as plt
import cvlib as cv
from cvlib.object_detection import draw_bbox

im = cv2.imread('/home/anthony/Documents/Python/MotionDetection/capture30.png')
bbox, label, conf = cv.detect_common_objects(im)

output_image = draw_bbox(im, bbox, label, conf)
plt.imshow(output_image)
plt.show()

@amboxer21
Copy link
Owner Author

** Example: **

>>> import cv2
>>> import matplotlib.pyplot as plt
>>> import cvlib as cv
2020-08-10 22:03:12.113585: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory
2020-08-10 22:03:12.113613: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
>>> from cvlib.object_detection import draw_bbox
>>> 
>>> im = cv2.imread('/home/anthony/Documents/Python/MotionDetection/capture30.png')
>>> bbox, labels, conf = cv.detect_common_objects(im)
>>> for label in labels:
...     if 'person' in label:
...         print('Sending E-mail')
... 
Sending E-mail
>>>

@amboxer21
Copy link
Owner Author

2020-08-11-07:05:44_scrot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant