Open cfdcfc opened 5 years ago
$ sudo -H pip3 install tensorflow==1.12.0 --upgrade
$ python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py \
--input_model /data/train/frozen_darknet_yolov3_tiny_model.pb \
--tensorflow_use_custom_operations_config /opt/intel/openvino/deployment_tools/model_optimizer/extensions/front/tf/yolo_v3_tiny.json \
--data_type FP16 \
--batch 1 \
--output_dir /data/train/ \
--input_shape [1,320,320,3]
Hi PINTO0309,
Thanks for the response, I followed your instruction but got this error:
[ ERROR ] Both --input_shape and --batch were provided. Please provide only one of them. For more information please refer to Model Optimizer FAQ (
/deployment_tools/documentation/docs/MO_FAQ.html), question #56.
I removed the --batch 1 and successfully convert the tensorflow to IR, but eventually I end up with the same error like before
Traceback (most recent call last): File "yolov3_tiny_test.py", line 14, in exec_net = plugin.load(network=net) File "ie_api.pyx", line 395, in openvino.inference_engine.ie_api.IEPlugin.load File "ie_api.pyx", line 406, in openvino.inference_engine.ie_api.IEPlugin.load RuntimeError: [VPU] Internal error: Output in detector/yolo-v3-tiny/pool2_5/MaxPool has incorrect width dimension. Expected: 9 or 9 Actual: 10
Did you do it at 320 when training? I think it needs to be adjusted when training on Darknet.
I did not train at 320. However, I was able to apply the same trick on normal yolo v3.
Hi,
First of all, I have successfully implement openvino_tiny-yolov3_test.py. Then, I would like to trade the accuracy for speed by reducing the input_size (416 -> 320), I have successfully achieve this in yolov3. However, I am not able to achieve this in yolov3_tiny, please see the below details:
get model
wget https://pjreddie.com/media/files/yolov3-tiny.weights
convert yolo to tensorflow
python3 /opt/OpenVINO-YoloV3/convert_weights_pb.py --class_names /opt/darknet/data/coco.names --weights_file /opt/darknet/yolov3-tiny.weights --data_format NHWC --output_graph /data/train/frozen_darknet_yolov3_tiny_model.pb --size 320 --tiny
convert tensorflow to IR
python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py --input_model /data/train/frozen_darknet_yolov3_tiny_model.pb --tensorflow_use_custom_operations_config /opt/intel/openvino/deployment_tools/model_optimizer/extensions/front/tf/yolo_v3_tiny.json --data_type FP16 --batch 1 --output_dir /data/train/
try to test with python(On Raspberry Pi Stretch with NCS2)
Then error occurs: