theAIGuysCode/Object-Detection-API

ValueError: When using data tensors as input to a model, you should specify the `steps` argument.

Jiho-korea opened this issue · 0 comments

I entered this code in git bash and i saw these error
I didn't touch anything. Just i followed your step on youtube
https://www.youtube.com/watch?v=p44G9_xCM4I

$ python detect_video.py --video 'data/video/video.mp4' --output 'data/video/output.avi'
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING:tensorflow:From C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\ops\init_ops.py:1251: calling VarianceScaling.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0403 02:33:27.644036 21832 deprecation.py:506] From C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\ops\init_ops.py:1251: calling VarianceScaling.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
2020-04-03 02:33:39.667521: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
I0403 02:33:47.461905 21832 detect_video.py:36] weights loaded
I0403 02:33:47.462905 21832 detect_video.py:39] classes loaded
Traceback (most recent call last):
File "detect_video.py", line 94, in
app.run(main)
File "C:\Users\USER.conda\envs\yolov3-cpu\lib\site-packages\absl\app.py", line 299, in run
_run_main(main, args)
File "C:\Users\USER.conda\envs\yolov3-cpu\lib\site-packages\absl\app.py", line 250, in _run_main
sys.exit(main(argv))
File "detect_video.py", line 76, in main
boxes, scores, classes, nums = yolo.predict(img_in)
File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\keras\engine\training.py", line 1060, in predict
x, check_steps=True, steps_name='steps', steps=steps)
File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\keras\engine\training.py", line 2509, in _standardize_user_data
training_utils.check_steps_argument(x, steps, steps_name)
File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\keras\engine\training_utils.py", line 990, in check_steps_argument
input_type=input_type_str, steps_name=steps_name))
ValueError: When using data tensors as input to a model, you should specify the steps argument.
(yolov3-cpu)

================================================================

USER@DESKTOP-GT9682B MINGW64 ~/Desktop/학교/프로젝트/yolo/AIGuys_yolo/Object-Detection-API (master)
$ python detect_video.py --video 0 --output 'data/video/output.avi'
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING:tensorflow:From C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\ops\init_ops.py:1251: calling VarianceScaling.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
W0403 02:40:38.728249 15728 deprecation.py:506] From C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\ops\init_ops.py:1251: calling VarianceScaling.init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the constructor
2020-04-03 02:40:47.488561: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
I0403 02:40:55.117871 15728 detect_video.py:36] weights loaded
I0403 02:40:55.119870 15728 detect_video.py:39] classes loaded
Traceback (most recent call last):
File "detect_video.py", line 94, in
app.run(main)
File "C:\Users\USER.conda\envs\yolov3-cpu\lib\site-packages\absl\app.py", line 299, in run
_run_main(main, args)
File "C:\Users\USER.conda\envs\yolov3-cpu\lib\site-packages\absl\app.py", line 250, in _run_main
sys.exit(main(argv))
File "detect_video.py", line 76, in main
boxes, scores, classes, nums = yolo.predict(img_in)
File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\keras\engine\training.py", line 1060, in predict
x, check_steps=True, steps_name='steps', steps=steps)
File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\keras\engine\training.py", line 2509, in _standardize_user_data
training_utils.check_steps_argument(x, steps, steps_name)
File "C:\Users\USER\AppData\Roaming\Python\Python37\site-packages\tensorflow\python\keras\engine\training_utils.py", line 990, in check_steps_argument
input_type=input_type_str, steps_name=steps_name))
ValueError: When using data tensors as input to a model, you should specify the steps argument.
(yolov3-cpu)

what should i do??