EdjeElectronics / TensorFlow-Lite-Object-Detection-on-Android-and-Raspberry-Pi

A tutorial showing how to train, convert, and run TensorFlow Lite object detection models on Android devices, the Raspberry Pi, and more!
Apache License 2.0
1.5k stars 684 forks source link

TFLite_detection_webcam.py --modeldir=Sample_TFLite_model fails to run #114

Closed Emilurenius closed 2 years ago

Emilurenius commented 3 years ago

The following error shows up when I run the test code from the tutorial. select timeout VIDEOIO ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV VIDEOIO ERROR: V4L: can't open camera by index 0 VIDIOC_REQBUFS: No such device Traceback (most recent call last): File "TFLite_detection_webcam.py", line 171, in <module> frame = frame1.copy() AttributeError: 'NoneType' object has no attribute 'copy'

I have set up everything according to the tutorial in both the youtube video, and the written tutorial here on github. I also checked around on the internet, and can't seem to find a fix.

Any tips?

gauti-22 commented 2 years ago

Even I am getting the same issue.

Can someone help?

EdjeElectronics commented 2 years ago

This error occurs because the program is not receiving frames from the webcam. It usually means something is wrong with your webcam. Try unplugging it and replugging it in, or try using a different camera.

On Oct 14, 2021, at 8:05 AM, gauti-22 @.***> wrote:

 Even I am getting the same issue.

Can someone help?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

keatenluv commented 2 years ago

Evan, I am running into this same issue. However, my webcam is working. When I run the command "raspistill -o test.jpg" the camera is able to take a picture. Could you help me solve this issue?