TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10 icon indicating copy to clipboard operation
TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10 copied to clipboard

Object_detection_webcam.py error

Open NikolayStarikov opened this issue 8 years ago • 6 comments

Dear colleagues,

I'm getting an error running Object_detection_webcam.py on both python2 and python3. Could you please advice what can be a solution?

RESTART: /home/nikolay/tensorflow1/models/research/object_detection/Object_detection_webcam.py

Traceback (most recent call last): File "/home/nikolay/tensorflow1/models/research/object_detection/Object_detection_webcam.py", line 103, in feed_dict={image_tensor: frame_expanded}) File "/home/nikolay/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 905, in run run_metadata_ptr) File "/home/nikolay/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1106, in _run np_val = np.asarray(subfeed_val, dtype=subfeed_dtype) File "/home/nikolay/.local/lib/python2.7/site-packages/numpy/core/numeric.py", line 492, in asarray return array(a, dtype, copy=False, order=order) TypeError: long() argument must be a string or a number, not 'NoneType'

NikolayStarikov avatar Mar 27 '18 15:03 NikolayStarikov

Hello, this error means the "frame_expanded" variable is empty, which usually means the webcam somehow didn't initialize properly. It's most likely an issue with the webcam. Please re-open this issue if you find the problem is caused by the code.

EdjeElectronics avatar Apr 07 '18 13:04 EdjeElectronics

@NikolayStarikov @EdjeElectronics I am experiencing the same problem. My camera will turn on when I run the program. Opening means it starts working, but I reported the same error. 125

eillenlun avatar Sep 28 '18 03:09 eillenlun

My camera's light is on, but I get an error.

eillenlun avatar Sep 28 '18 03:09 eillenlun

same error here. anyone knows how to solve this problem?

mjasonong avatar Jan 10 '19 10:01 mjasonong

tensorflow error

cookiekhai avatar Jan 16 '19 15:01 cookiekhai

i got this error when i try to run it on the webcam. does that mean i dint install the open cv?

cookiekhai avatar Jan 16 '19 15:01 cookiekhai