PINTO0309 / OpenVINO-YoloV3

YoloV3/tiny-YoloV3+RaspberryPi3/Ubuntu LaptopPC+NCS/NCS2+USB Camera+Python+OpenVINO
https://qiita.com/PINTO
Apache License 2.0
538 stars 167 forks source link

its about running this #56

Open Rimsha7777 opened 4 years ago

Rimsha7777 commented 4 years ago

[Required] Your device (RaspberryPi3, LaptopPC, or other device name):

[Required] Your device's CPU architecture (armv7l, x86_64, or other architecture name):

[Required] Your OS (Raspbian, Ubuntu1604, or other os name):

[Required] Overview of problems and questions:

can you help me how i can generate .bin and .xml files. I am just new to using NCS2. I wanted to run using PRI3+. If you help me what I have to do with model optimizer exactly with command-line-arguments, I am not getting that I just visited other issues find some with this but did not get how to do.

PINTO0309 commented 4 years ago

@Rimsha7777 Just execute the commands listed in the following file in order from the top. https://github.com/PINTO0309/OpenVINO-YoloV3/blob/master/script.txt

python3 convert_weights_pb.py \
--class_names coco.names \
--weights_file weights/yolov3-tiny.weights \
--data_format NHWC \
--tiny \
--output_graph pbmodels/frozen_tiny_yolo_v3.pb
sudo python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py \
--input_model pbmodels/frozen_tiny_yolo_v3.pb \
--output_dir lrmodels/tiny-YoloV3/FP16 \
--data_type FP16 \
--batch 1 \
--tensorflow_use_custom_operations_config yolo_v3_tiny_changed.json
python3 openvino_yolov3_test.py -d MYRIAD
Rimsha7777 commented 4 years ago

Thank you so much for your reply...this is indeed sounds helpful...I will update you right after implementing .

On Saturday, October 5, 2019, Katsuya Hyodo notifications@github.com wrote:

@Rimsha7777 https://github.com/Rimsha7777 Just execute the commands listed in the following file in order from the top. https://github.com/PINTO0309/OpenVINO-YoloV3/blob/master/script.txt https://github.com/PINTO0309/OpenVINO-YoloV3/blob/master/script.txt

python3 convert_weights_pb.py \ --class_names coco.names \ --weights_file weights/yolov3-tiny.weights \ --data_format NHWC \ --tiny \ --output_graph pbmodels/frozen_tiny_yolo_v3.pb

sudo python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py \ --input_model pbmodels/frozen_tiny_yolo_v3.pb \ --output_dir lrmodels/tiny-YoloV3/FP16 \ --data_type FP16 \ --batch 1 \ --tensorflow_use_custom_operations_config yolo_v3_tiny_changed.json

python3 openvino_yolov3_test.py -d MYRIAD

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PINTO0309/OpenVINO-YoloV3/issues/56?email_source=notifications&email_token=ALWLRUTVX3KVWJFZ5A5QE3LQNBP75A5CNFSM4I5XAFGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEANOZOQ#issuecomment-538635450, or mute the thread https://github.com/notifications/unsubscribe-auth/ALWLRUWGXMZFQRHVU6O2X5DQNBP75ANCNFSM4I5XAFGA .

Rimsha7777 commented 4 years ago

Hi, I can't find model_optimzer directory in development_tool in openvino(release is 2019). Do I need to download it externally?

PINTO0309 commented 4 years ago

The OpenVINO installer for RaspberryPi does not include a model optimizer. So if you want to convert the model, you need a HostPC with the full version of OpenVINO installed.

HostPC ex) Ubuntu First, download the latest OpenVINO from the following. And, install. https://github.com/PINTO0309/OpenVINO-bin.git

Next, execute the following command on HostPC.

python3 convert_weights_pb.py \
--class_names coco.names \
--weights_file weights/yolov3-tiny.weights \
--data_format NHWC \
--tiny \
--output_graph pbmodels/frozen_tiny_yolo_v3.pb
sudo python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py \
--input_model pbmodels/frozen_tiny_yolo_v3.pb \
--output_dir lrmodels/tiny-YoloV3/FP16 \
--data_type FP16 \
--batch 1 \
--tensorflow_use_custom_operations_config yolo_v3_tiny_changed.json

Next, copy the .bin and .xml generated on HostPC to RaspberryPi.

Rimsha7777 commented 4 years ago

Ok, thanks you so very much for helping.

On Sunday, October 6, 2019, Katsuya Hyodo notifications@github.com wrote:

The OpenVINO installer for RaspberryPi does not include a model optimizer. So if you want to convert the model, you need a HostPC with the full version of OpenVINO installed.

HostPC ex) Ubuntu First, download the latest OpenVINO from the following. And, install. https://github.com/PINTO0309/OpenVINO-bin.git https://github.com/PINTO0309/OpenVINO-bin.git

Next, execute the following command on HostPC.

python3 convert_weights_pb.py \ --class_names coco.names \ --weights_file weights/yolov3-tiny.weights \ --data_format NHWC \ --tiny \ --output_graph pbmodels/frozen_tiny_yolo_v3.pb

sudo python3 /opt/intel/openvino/deployment_tools/model_optimizer/mo_tf.py \ --input_model pbmodels/frozen_tiny_yolo_v3.pb \ --output_dir lrmodels/tiny-YoloV3/FP16 \ --data_type FP16 \ --batch 1 \ --tensorflow_use_custom_operations_config yolo_v3_tiny_changed.json

Next, copy the .bin and .xml generated on HostPC to RaspberryPi.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PINTO0309/OpenVINO-YoloV3/issues/56?email_source=notifications&email_token=ALWLRUXIB4IFZS4NYRGJEXDQNGRZZA5CNFSM4I5XAFGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAOEX7A#issuecomment-538725372, or mute the thread https://github.com/notifications/unsubscribe-auth/ALWLRUUXTYQJV5UGR5EKGLTQNGRZZANCNFSM4I5XAFGA .