I am using YOLOv3 and OpenCV for realtime object detection on my local system using a Webcam. Everything works like a charm and here is the link of what I did for my local s
I've used the take photo function from google snippets mentioned in the above answer then registered a callback between python and the js function.
For the output used cv2_imshow.
Currently it takes 4 photos from the webcam and does object detection on it.
You can find the notebook here
Google have provided a code snippet to do that by calling some JavaScript to access the webcam via the browser (mediaDevices.getUserMedia({video: true})
):
It works well, and can be easily modified to remove the confirmation button if needed.