TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi icon indicating copy to clipboard operation
TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi copied to clipboard

I have a webcam running on the Pi - Is there a way to use that stream as the source for TF

Open rcpilotp51 opened this issue 5 years ago • 3 comments
trafficstars

I was wondering if you could direct me to using your tutorial with an existing video stream. I have a webcam running on the Pi - Is there a way to use that stream as the source for TF? Meaning its running a live stream already and is unavailable...

Thanks for your time!

rcpilotp51 avatar Aug 03 '20 14:08 rcpilotp51

i get the following error providing a stream and a model to the stream.py file:

Traceback (most recent call last): File "TFLite_detection_stream.py", line 174, in frame = frame1.copy() AttributeError: 'NoneType' object has no attribute 'copy'

but if i go to the stream url - it resolves fine.

thanks

rcpilotp51 avatar Aug 03 '20 16:08 rcpilotp51

i get the following error providing a stream and a model to the stream.py file:

Traceback (most recent call last): File "TFLite_detection_stream.py", line 174, in frame = frame1.copy() AttributeError: 'NoneType' object has no attribute 'copy'

but if i go to the stream url - it resolves fine.

thanks

How did you manage to get a stream running??? I am struggling. It is saying no port found in URI. What did you do to get it working. What port and ipaddress did you use? Please help me.

Dasinator21 avatar Aug 05 '20 15:08 Dasinator21

Modifying the webcam.py script at line 32 could work: Change

self.stream = cv2.VideoCapture()

into

self.stream = cv2.VideoCapture("/dev/video0")

or

self.stream = cv2.VideoCapture("v4l2:///dev/video0")

or something like that. Hope that helps!

stackxp avatar Jun 16 '24 19:06 stackxp