OpenVINO-YoloV3 icon indicating copy to clipboard operation
OpenVINO-YoloV3 copied to clipboard

i have a question for you

Open XABxab123 opened this issue 5 years ago • 27 comments

C:\Intel\OpenVINO-YoloV3-master>python openvino_tiny-yolov3_test.py Traceback (most recent call last): File "openvino_tiny-yolov3_test.py", line 250, in sys.exit(main_IE_infer() or 0) File "openvino_tiny-yolov3_test.py", line 178, in main_IE_infer plugin.add_cpu_extension("lib/libcpu_extension.so") File "ie_api.pyx", line 423, in openvino.inference_engine.ie_api.IEPlugin.add_cpu_extension File "ie_api.pyx", line 427, in openvino.inference_engine.ie_api.IEPlugin.add_cpu_extension RuntimeError: Cannot load library 'lib/libcpu_extension.so': 193 from cwd: C:\Intel\OpenVINO-YoloV3-master

hello, when i try this code,他出现了这个错误,你能帮帮我吗

XABxab123 avatar Mar 14 '19 22:03 XABxab123

It has not been verified on Windows.

PINTO0309 avatar Mar 15 '19 11:03 PINTO0309

谢谢你,但是当我在命令行输入 python openvino_tiny-yolov3_test.py -d GPU时,他好像有效果了, 我想问 CPU GPU MYRIAD这三者代表什么,还有一个问题:我该如何拿到属于自己的xml和bin? 我想让yolov3-tiny在树莓派上工作,请问基于你的测试,他的速度和准确率如何? 我不知道你是不是也是中国好友,如果不是,原谅我用中文。

XABxab123 avatar Mar 15 '19 12:03 XABxab123

哦,因为我分不清自己为什么使用 -d GPU 只会报错我并没有相应的 xml和 bin 文件,我不知道,是他真的有效果还是我跳过了了它在windows的验证

XABxab123 avatar Mar 15 '19 12:03 XABxab123

I'm Japanese.

Please carry out all the following steps carefully. All problems should be resolved. https://software.intel.com/en-us/articles/OpenVINO-Install-Windows

"lib/libcpu_extension.so '" is a library for Linux, so it does not work on Windows.

PINTO0309 avatar Mar 15 '19 12:03 PINTO0309

@PINTO0309 Thank you so carefully reply to me this novice, I will seriously look at the site now

XABxab123 avatar Mar 15 '19 13:03 XABxab123

Probably, ".dll" should be generated. Good luck. :smile:

PINTO0309 avatar Mar 15 '19 13:03 PINTO0309

すみません、私は见て、依然としてこのような悩みがあります ご教示ください。darknetでyoloV3-tinyのxmlとbinをトレーニングしました 誤りは次の通り。

Model Optimizer version: 1.5.12.49d067a0 ImportError: No module named 'numpy.core._multiarray_umath' ImportError: numpy.core.multiarray failed to import

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "", line 968, in _find_and_load SystemError: PyEval_EvalFrameEx returned a result with an error set ImportError: numpy.core._multiarray_umath failed to import ImportError: numpy.core.umath failed to import 2019-03-15 21:47:57.367114: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr

XABxab123 avatar Mar 15 '19 13:03 XABxab123

I can't speak Japanese or English, and I don't know whether the questions have been described clearly

XABxab123 avatar Mar 15 '19 13:03 XABxab123

Do you actually use python3.5 Because the official ncs2 R5 doesn't seem to support 3.5 @PINTO0309

XABxab123 avatar Mar 15 '19 14:03 XABxab123

I can not read or write Chinese or English, but I translate with Google Translator and communicate with you. Please be assured that I understand your interactions with you. 我不会读或写中文或英文,但我会翻译Google翻译并与您沟通。 请放心,我了解您与您的互动情况。

$ pip uninstall numpy
$ pip install numpy

PINTO0309 avatar Mar 15 '19 14:03 PINTO0309

but: pip list Have the following content: nose 1.3.7 notebook 4.2.3 numba 0.28.1 numexpr 2.6.1 numpy 1.14.6

It should be late at your place, good night, may I ask you the specific command of tensorflow to convert XML and bin? I'm not quite sure I'm getting the input right, and I doubt my deep learning environment

XABxab123 avatar Mar 15 '19 14:03 XABxab123

哦 谢谢,我将试试 再来回复您

XABxab123 avatar Mar 15 '19 14:03 XABxab123

Thank you for your guidance, but I seem to be a jinx.Mistakes always come to me

Model Optimizer version: 1.5.12.49d067a0 [ WARNING ] The batch size more than 1 is supported for SSD topologies only. [ ERROR ] ------------------------------------------------- [ ERROR ] ----------------- INTERNAL ERROR ---------------- [ ERROR ] Unexpected exception happened. [ ERROR ] Please contact Model Optimizer developers and forward the following information: [ ERROR ] Exception occurred during running replacer "ObjectDetectionAPIPreprocessorReplacement (<class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIPreprocessorReplacement'>)": index 2 is out of bounds for axis 0 with size 2 [ ERROR ] Traceback (most recent call last): File "C:\Intel\computer_vision_sdk_2018.5.445\deployment_tools\model_optimizer\mo\utils\class_registration.py", line 114, in apply_replacements replacer.find_and_replace_pattern(graph) File "C:\Intel\computer_vision_sdk_2018.5.445\deployment_tools\model_optimizer\mo\front\tf\replacement.py", line 91, in find_and_replace_pattern self.replace_sub_graph(graph, match) File "C:\Intel\computer_vision_sdk_2018.5.445\deployment_tools\model_optimizer\mo\front\common\replacement.py", line 115, in replace_sub_graph new_sub_graph = self.generate_sub_graph(graph, match) # pylint: disable=assignment-from-no-return File "C:\Intel\computer_vision_sdk_2018.5.445\deployment_tools\model_optimizer\extensions\front\tf\ObjectDetectionAPI.py", line 428, in generate_sub_graph height, width = calculate_placeholder_spatial_shape(graph, match, pipeline_config) File "C:\Intel\computer_vision_sdk_2018.5.445\deployment_tools\model_optimizer\extensions\front\tf\ObjectDetectionAPI.py", line 328, in calculate_placeholder_spatial_shape user_defined_width = user_defined_shape[2] IndexError: index 2 is out of bounds for axis 0 with size 2

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Intel\computer_vision_sdk_2018.5.445\deployment_tools\model_optimizer\mo\main.py", line 325, in main return driver(argv) File "C:\Intel\computer_vision_sdk_2018.5.445\deployment_tools\model_optimizer\mo\main.py", line 267, in driver mean_scale_values=mean_scale) File "C:\Intel\computer_vision_sdk_2018.5.445\deployment_tools\model_optimizer\mo\pipeline\tf.py", line 248, in tf2nx class_registration.apply_replacements(graph, class_registration.ClassType.FRONT_REPLACER) File "C:\Intel\computer_vision_sdk_2018.5.445\deployment_tools\model_optimizer\mo\utils\class_registration.py", line 127, in apply_replacements )) from err Exception: Exception occurred during running replacer "ObjectDetectionAPIPreprocessorReplacement (<class 'extensions.front.tf.ObjectDetectionAPI.ObjectDetectionAPIPreprocessorReplacement'>)": index 2 is out of bounds for axis 0 with size 2

[ ERROR ] ---------------- END OF BUG REPORT -------------- [ ERROR ] -------------------------------------------------

XABxab123 avatar Mar 15 '19 14:03 XABxab123

@PINTO0309 hello,After I checked all the answers to my similar mistakes, I solved some difficulties, thank you very much. But I execute : python mo_tf.py --input_model yolo.pb --output_dir yolo --data_type FP16 --tensorflow_use_custom_operations_config yolo.json --input_shape [1,416,416,3]

When the following error occurs, can you help me?

[ ERROR ] Cannot infer shapes or values for node "detector/yolo-v3-tiny/Tile/YoloRegion". [ ERROR ] index 2 is out of bounds for axis 0 with size 2 [ ERROR ] [ ERROR ] It can happen due to bug in custom shape infer function <function RegionYoloOp.regionyolo_infer at 0x000002218341C8C8>. [ ERROR ] Or because the node inputs have incorrect values/shapes. [ ERROR ] Or because input shapes are incorrect (embedded to the model or passed via --input_shape). [ ERROR ] Run Model Optimizer with --log_level=DEBUG for more information. [ ERROR ] Stopped shape/value propagation at "detector/yolo-v3-tiny/Tile/YoloRegion" node. For more information please refer to Model Optimizer FAQ (<INSTALL_DIR>/deployment_tools/documentation/docs/MO_FAQ.html), question #38.

XABxab123 avatar Mar 16 '19 08:03 XABxab123

The contents of my yolo.json file are as follows:

[ { "id": "TFYOLOV3", "match_kind": "general", "custom_attributes": { "classes": 2, "coords": 4, "num": 9, "mask": [0, 1, 2], "jitter":0.3, "ignore_thresh":0.7, "truth_thresh":1, "random":1, "anchors":[10,14,23,27,37,58,81,82,135,169,344,319], "entry_points": ["detector/yolo-v3-tiny/Reshape","detector/yolo-v3-tiny/Reshape_4"] } } ]

XABxab123 avatar Mar 16 '19 08:03 XABxab123

What you really want to convert is "tiny YoloV3"? Or "Full YoloV3"? The wrong JSON configuration file is specified. https://github.com/PINTO0309/OpenVINO-YoloV3/blob/master/script.txt

PINTO0309 avatar Mar 16 '19 08:03 PINTO0309

Thank you for replying so quickly, tiny, due to network reasons, I can't download your yolov3-tiny file.

XABxab123 avatar Mar 16 '19 08:03 XABxab123

Maybe I was wrong. I didn't execute this command when I converted from darknet to tensorflow.

python3 convert_weights.py
--class_names coco.names
--weights_file weights/yolov3.weights
--data_format NHWC

XABxab123 avatar Mar 16 '19 08:03 XABxab123

It does not matter if you do not execute the command.

PINTO0309 avatar Mar 16 '19 08:03 PINTO0309

python3 convert_weights_pb.py \
--class_names coco.names \
--weights_file weights/yolov3.weights \
--data_format NHWC \
--output_graph pbmodels/frozen_yolo_v3.pb
sudo python3 /opt/intel/computer_vision_sdk/deployment_tools/model_optimizer/mo_tf.py \
--input_model pbmodels/frozen_yolo_v3.pb \
--output_dir lrmodels/YoloV3/FP32 \
--data_type FP32 \
--batch 1 \
--tensorflow_use_custom_operations_config yolo_v3_changed.json

or

sudo python3 /opt/intel/computer_vision_sdk/deployment_tools/model_optimizer/mo_tf.py \
--input_model pbmodels/frozen_yolo_v3.pb \
--output_dir lrmodels/YoloV3/FP16 \
--data_type FP16 \
--batch 1 \
--tensorflow_use_custom_operations_config yolo_v3_changed.json

PINTO0309 avatar Mar 16 '19 08:03 PINTO0309

Thank you for your reply, I will try it now.

XABxab123 avatar Mar 16 '19 09:03 XABxab123

@PINTO0309 I want to cry, I run the convert_weights_pbp.py file in the openvino-yolov3-master folder and the following error occurs My tensorflow is 1.12 and tensorflow-gpu==1.9

C:\Intel\OpenVINO-YoloV3-master>python convert_weights_pb.py --class_names coco.names --weights_file weights/yolov3-tiny.weights --data_format NHWC --output_graph pbmodels/yolo-tiny.pb detect_1.shape = (?, 507, 85) detect_2.shape = (?, 2028, 85) detect_3.shape = (?, 8112, 85) Traceback (most recent call last): File "convert_weights_pb.py", line 60, in tf.app.run() File "E:\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "convert_weights_pb.py", line 42, in main load_ops = load_weights(tf.global_variables(scope='detector'), FLAGS.weights_file) File "C:\Intel\OpenVINO-YoloV3-master\utils.py", line 122, in load_weights (shape[3], shape[2], shape[0], shape[1])) ValueError: cannot reshape array of size 391694 into shape (512,256,3,3)

XABxab123 avatar Mar 16 '19 09:03 XABxab123

Sorry, that's my problem, I've missed --tiny

XABxab123 avatar Mar 16 '19 09:03 XABxab123

Thank you. Now I can run on the computer, but no one is good except -d MYRIAD. Could you tell me why? Error openvino_yolov3_multistick_test.py when I run this:

C:\Intel\OpenVINO-YoloV3-master>python openvino_yolov3_MultiStick_test.py -numncs 2 Traceback (most recent call last): File "E:\Anaconda3\lib\multiprocessing\context.py", line 189, in get_context ctx = _concrete_contexts[method] KeyError: 'forkserver'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "MY_yolov3_MultiStick_test.py", line 367, in mp.set_start_method('forkserver') File "E:\Anaconda3\lib\multiprocessing\context.py", line 235, in set_start_method self._actual_context = self.get_context(method) File "E:\Anaconda3\lib\multiprocessing\context.py", line 227, in get_context return super().get_context(method) File "E:\Anaconda3\lib\multiprocessing\context.py", line 191, in get_context raise ValueError('cannot find context for %r' % method) ValueError: cannot find context for 'forkserver'

Finished

I have a first generation and a second generation NCS

XABxab123 avatar Mar 16 '19 10:03 XABxab123

https://stackoverflow.com/questions/46021456/configure-multiprocessing-in-python-to-use-forkserver

PINTO0309 avatar Mar 21 '19 14:03 PINTO0309

我还有一个问题,那就是二代跑yolov3和yolov3-tiny的准确率都严重下降,而且速度还提升不了。一点都不如一代,是我哪里做错了吗

XABxab123 avatar Mar 22 '19 15:03 XABxab123

我还有一个问题,那就是二代跑yolov3和yolov3-tiny的准确率都严重下降,而且速度还提升不了。一点都不如一代,是我哪里做错了吗

你试一下训练的时候,class该为80

xiaozhishang avatar Apr 15 '19 12:04 xiaozhishang