duongttr / vehicles-counting-yolov4-deepsort

A project for counting vehicles using YOLOv4 + DeepSORT + Flask + Ngrok + TF2
MIT License
43 stars 16 forks source link

ValueError: Duplicate node name in graph: 'packed' #4

Open irfanahme opened 2 years ago

irfanahme commented 2 years ago

Traceback (most recent call last): File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\ops\gen_array_ops.py", line 11288, in tile name, _ctx._post_execution_callbacks, input, multiples) tensorflow.python.eager.core._FallbackException: This function does not handle the case of the path where all inputs are not already EagerTensors.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1610, in _create_c_op c_op = c_api.TF_FinishOperation(op_desc) tensorflow.python.framework.errors_impl.InvalidArgumentError: Duplicate node name in graph: 'packed'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "save_model.py", line 58, in app.run(main) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\absl\app.py", line 312, in run _run_main(main, args) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\absl\app.py", line 258, in _run_main sys.exit(main(argv)) File "save_model.py", line 54, in main save_tf() File "save_model.py", line 36, in save_tf output_tensors = decode(fm, FLAGS.input_size // 16, NUM_CLASS, STRIDES, ANCHORS, i, XYSCALE, FLAGS.framework) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\core\yolov4.py", line 169, in decode return decode_tf(conv_output, output_size, NUM_CLASS, STRIDES, ANCHORS, i=i, XYSCALE=XYSCALE) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\core\yolov4.py", line 204, in decode_tf xy_grid = tf.tile(tf.expand_dims(xy_grid, axis=0), [batch_size, 1, 1, 3, 1]) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\ops\gen_array_ops.py", line 11293, in tile input, multiples, name=name, ctx=_ctx) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\ops\gen_array_ops.py", line 11340, in tile_eager_fallback _attr_Tmultiples, (multiples,) = _execute.args_to_matching_eager([multiples], _ctx, _dtypes.int32) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\eager\execute.py", line 257, in args_to_matching_eager t, dtype, preferred_dtype=default_dtype, ctx=ctx)) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1296, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\ops\array_ops.py", line 1278, in _autopacking_conversion_function return _autopacking_helper(v, dtype, name or "packed") File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\ops\array_ops.py", line 1214, in _autopacking_helper return gen_array_ops.pack(elems_as_tensors, name=scope) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\ops\gen_array_ops.py", line 6304, in pack "Pack", values=values, axis=axis, name=name) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\framework\op_def_library.py", line 793, in _apply_op_helper op_def=op_def) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\framework\func_graph.py", line 548, in create_op compute_device) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\framework\ops.py", line 3429, in _create_op_internal op_def=op_def) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1773, in init control_input_ops) File "D:\Vehicle-Counting-master\vehicles-counting-yolov4-deepsort\testw\lib\site-packages\tensorflow_core\python\framework\ops.py", line 1613, in _create_c_op raise ValueError(str(e)) ValueError: Duplicate node name in graph: 'packed'

duongttr commented 2 years ago

Hi @irfanahme,

Maybe this error is occured by your TF version, please try tensorflow version 2.3.0