Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yolov5的onnx模型转rknn时报错,rknn_toolkit 1.7.3 #460

Open
lmf168 opened this issue Jul 4, 2024 · 2 comments
Open

yolov5的onnx模型转rknn时报错,rknn_toolkit 1.7.3 #460

lmf168 opened this issue Jul 4, 2024 · 2 comments

Comments

@lmf168
Copy link

lmf168 commented Jul 4, 2024

W:tensorflow:From D:\Anaconda3\envs\rk36\lib\site-packages\rknn\api\rknn.py:278: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead.

W:tensorflow:From D:\Anaconda3\envs\rk36\lib\site-packages\rknn\api\rknn.py:278: The name tf.image.resize_nearest_neighbor is deprecated. Please use tf.compat.v1.image.resize_nearest_neighbor instead.

2024-07-04 14:26:53.726182: E tensorflow/core/lib/jpeg/jpeg_mem.cc:323] Premature end of JPEG data. Stopped at line 462/499
W Invalid format detected in the input file "D:\project\rv1126\yolov5_rv1126\dataset.txt", exiting.
E Catch exception when building RKNN model!
E Traceback (most recent call last):
E File "D:\Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\client\session.py", line 1356, in _do_call
E return fn(*args)
E File "D:\Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\client\session.py", line 1341, in _run_fn
E options, feed_dict, fetch_list, target_list, run_metadata)
E File "D:\Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\client\session.py", line 1429, in _call_tf_sessionrun
E run_metadata)
E tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue '_0_fifo_queue' is closed and has insufficient elements (requested 1, current size 0)
E [[{{node fifo_queue_Dequeue}}]]
E During handling of the above exception, another exception occurred:
E Traceback (most recent call last):
E File "rknn\base\RKNNlib\RKNN_session.py", line 37, in rknn.base.RKNNlib.RKNN_session.RKNNSession.run
E File "D:\Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\client\session.py", line 950, in run
E run_metadata_ptr)
E File "D:\Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\client\session.py", line 1173, in _run
E feed_dict_tensor, options, run_metadata)
E File "D:\Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\client\session.py", line 1350, in _do_run
E run_metadata)
E File "D:\Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\client\session.py", line 1370, in _do_call
E raise type(e)(node_def, op, message)
E tensorflow.python.framework.errors_impl.OutOfRangeError: FIFOQueue '_0_fifo_queue' is closed and has insufficient elements (requested 1, current size 0)
E [[node fifo_queue_Dequeue (defined at Anaconda3\envs\rk36\lib\site-packages\rknn\api\rknn.py:278) ]]
E Original stack trace for 'fifo_queue_Dequeue':
E File "project\rv1126\yolov5_rv1126\export_rknn.py", line 69, in
E main()
E File "project\rv1126\yolov5_rv1126\export_rknn.py", line 53, in main
E ret = rknn.build(do_quantization=QUANTIZE_ON, dataset=DATASET)
E File "Anaconda3\envs\rk36\lib\site-packages\rknn\api\rknn.py", line 278, in build
E batch_size=rknn_batch_size)
E File "Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\ops\data_flow_ops.py", line 445, in dequeue
E self._queue_ref, self._dtypes, name=name)
E File "Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\ops\gen_data_flow_ops.py", line 4502, in queue_dequeue_v2
E timeout_ms=timeout_ms, name=name)
E File "Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper
E op_def=op_def)
E File "Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func
E return func(*args, **kwargs)
E File "Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\framework\ops.py", line 3616, in create_op
E op_def=op_def)
E File "Anaconda3\envs\rk36\lib\site-packages\tensorflow\python\framework\ops.py", line 2005, in init
E self._traceback = tf_stack.extract_stack()
E Please feedback the detailed log file <log_feedback_to_the_rknn_toolkit_dev_team.log> to the RKNN Toolkit development team.
E You can also check github issues: https://github.com/rockchip-linux/rknn-toolkit/issues
Build yolov5 failed!
log_feedback_to_the_rknn_toolkit_dev_team.log

@tunmx
Copy link

tunmx commented Jul 4, 2024

我今天遇到了跟你一样的报错,但是有差异的地方是从你的日志上看好像是用来量化的图像有问题;我是刚换了一台设备就能运行成功了

@xuantong
Copy link

量化图片有些问题,换一个小点的集合,差不多100张应该就够了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants