私的AI研究会 > NCAppZoo3
Neural Compute Application ZooというGitHubにて公開されているサイトから Neural Compute Stick 2 とRaspberryPi でディープラーニングの推論アプリケーションを実習する。(その3)
参照 → https://github.com/movidius/ncappzoo/blob/master/networks/README.md
mizutu@ubuntu2004dk:~/ncappzoo/apps$ cd gender_age mizutu@ubuntu2004dk:~/ncappzoo/apps/gender_age$ make gender_age: Downloading IRs... - Age/Gender IR files do not exist in project directory. - Making Age/Gender IRs... make[1]: ディレクトリ '/home/mizutu/ncappzoo/networks/age_gender_net' に入ります age_gender_net: Making model zoo... (cd ../../omz; make all;) : : gender_age: Building the sample... Intel OpenVINO environment is already set! (mkdir -p build; cd build; cmake ..; make;) -- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is GNU 9.3.0 -- Check for working C compiler: /bin/cc -- Check for working C compiler: /bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /bin/c++ -- Check for working CXX compiler: /bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found InferenceEngine: /opt/intel/openvino_2021/deployment_tools/inference_engine/lib/intel64/libinference_engine.so -- Configuring done -- Generating done -- Build files have been written to: /home/mizutu/ncappzoo/apps/gender_age/build make[1]: ディレクトリ '/home/mizutu/ncappzoo/apps/gender_age/build' に入ります make[2]: ディレクトリ '/home/mizutu/ncappzoo/apps/gender_age/build' に入ります make[3]: ディレクトリ '/home/mizutu/ncappzoo/apps/gender_age/build' に入ります Scanning dependencies of target gender_age make[3]: ディレクトリ '/home/mizutu/ncappzoo/apps/gender_age/build' から出ます make[3]: ディレクトリ '/home/mizutu/ncappzoo/apps/gender_age/build' に入ります [ 50%] Building CXX object CMakeFiles/gender_age.dir/cpp/run.cpp.o [100%] Linking CXX executable gender_age make[3]: ディレクトリ '/home/mizutu/ncappzoo/apps/gender_age/build' から出ます [100%] Built target gender_age make[2]: ディレクトリ '/home/mizutu/ncappzoo/apps/gender_age/build' から出ます make[1]: ディレクトリ '/home/mizutu/ncappzoo/apps/gender_age/build' から出ます mizutu@ubuntu2004dk:~/ncappzoo/apps/gender_age$ ls AUTHORS build CMakeLists.txt cpp Makefile face-detection-retail-0004.bin README.md face-detection-retail-0004.xml age-gender-recognition-retail-0013.bin gender_age_3.gif age-gender-recognition-retail-0013.xml screen_shot.jpg mizutu@ubuntu2004dk:~/ncappzoo/apps/gender_age$ mizutu@ubuntu2004dk:~/ncappzoo/networks$ ls age_gender_net Makefile age-gender-recognition-retail-0013.bin age_gender_net.py README.md age-gender-recognition-retail-0013.xml
# from openvino.inference_engine import IENetwork, IECore from openvino.inference_engine import IECore : : # age_gender_net = IENetwork(model = ir, weights = ir[:-3] + 'bin') age_gender_net = ie.read_network(model = ir, weights = ir[:-3] + 'bin')
pi@raspberrypi-mas:~/ncappzoo/networks/age_gender_net $ python3 age_gender_net.py Traceback (most recent call last): File "age_gender_net.py", line 118, in <module> infer() File "age_gender_net.py", line 66, in infer age_gender_net = ie.read_network(model = ir, weights = ir[:-3] + 'bin') File "ie_api.pyx", line 261, in openvino.inference_engine.ie_api.IECore.read_network File "ie_api.pyx", line 285, in openvino.inference_engine.ie_api.IECore.read_network RuntimeError: The support of IR v6 has been removed from the product. Please, convert the original model using the Model Optimizer which comes with this version of the OpenVINO to generate supported IR version. (機械翻訳)RuntimeError:IRv6のサポートは製品から削除されました。このバージョンのOpenVINOに付属のモデルオプティマイザーを使用して元のモデルを変換し、サポートされているIRバージョンを生成してください。〇 新しいIRファイルをコピーして実行する。
pi@raspberryps:~/ncappzoo/networks/age_gender_net $ python3 age_gender_net.py age_gender_net.py:69: DeprecationWarning: 'inputs' property of IENetwork class is deprecated. To access DataPtrs user need to use 'input_data' property of InputInfoPtr objects which can be accessed by 'input_info' property. age_gender_input_blob = next(iter(age_gender_net.inputs)) age_gender_net: Starting application... - Plugin: Myriad - IR File: ./age-gender-recognition-retail-0013.xml - Input Shape: [1, 3, 62, 62] - Age Output Shape: [1, 1, 1, 1] - Gender Output Shape: [1, 2, 1, 1] Unable to read the image file.〇 イメージファイル(image.jpg)を用意して再度実行する。
pi@raspberrypi:~/ncappzoo/networks/age_gender_net $ python3 age_gender_net.py age_gender_net.py:70: DeprecationWarning: 'inputs' property of IENetwork class is deprecated. To access DataPtrs user need to use 'input_data' property of InputInfoPtr objects which can be accessed by 'input_info' property. age_gender_input_blob = next(iter(age_gender_net.inputs)) age_gender_net: Starting application... - Plugin: Myriad - IR File: ./age-gender-recognition-retail-0013.xml - Input Shape: [1, 3, 62, 62] - Age Output Shape: [1, 1, 1, 1] - Gender Output Shape: [1, 2, 1, 1] age_gender_net.py:109: DeprecationWarning: 'outputs' property of InferRequest is deprecated. Please instead use 'output_blobs' property. age_res = age_gender_exec_net.requests[cur_request_id].outputs[age_output_blob] Gender prediction is 94.2% Male Age prediction is 22 years old.
mizutu@ubuntu2004dk:~/ncappzoo/networks/emotions_recognition_retail_0003$ make emotions_recognition_retail_0003: Cloning model zoo... (cd ../../omz; make all;) make[1]: ディレクトリ '/home/mizutu/ncappzoo/omz' に入ります : : make[1]: ディレクトリ '/home/mizutu/ncappzoo/networks/face_detection_retail_0004' から出ます cp ../face_detection_retail_0004/face-detection-retail-0004.xml .; \ cp ../face_detection_retail_0004/face-detection-retail-0004.bin .; \ emotions_recognition_retail_0003: Downloading IRs... - Model files do not exist in open model directory. - Using Model downloader to download the model... ###############|| Downloading topologies ||############### ========= Downloading /home/mizutu/ncappzoo/omz/open_model_zoo/tools/downloader/Retail/object_attributes/emotions_recognition/0003/dldt/FP32/emotions-recognition-retail-0003.xml ... 100%, 19 KB, 100106 KB/s, 0 seconds passed ========= Downloading /home/mizutu/ncappzoo/omz/open_model_zoo/tools/downloader/Retail/object_attributes/emotions_recognition/0003/dldt/FP32/emotions-recognition-retail-0003.bin ... 100%, 9697 KB, 7375 KB/s, 1 seconds passed ========= Downloading /home/mizutu/ncappzoo/omz/open_model_zoo/tools/downloader/Retail/object_attributes/emotions_recognition/0003/dldt/FP16/emotions-recognition-retail-0003.xml ... 100%, 19 KB, 116628 KB/s, 0 seconds passed ========= Downloading /home/mizutu/ncappzoo/omz/open_model_zoo/tools/downloader/Retail/object_attributes/emotions_recognition/0003/dldt/FP16/emotions-recognition-retail-0003.bin ... 100%, 4848 KB, 4028 KB/s, 1 seconds passed ========= Downloading /home/mizutu/ncappzoo/omz/open_model_zoo/tools/downloader/Retail/object_attributes/emotions_recognition/0003/dldt/INT8/emotions-recognition-retail-0003.xml ... 100%, 124 KB, 40355 KB/s, 0 seconds passed ========= Downloading /home/mizutu/ncappzoo/omz/open_model_zoo/tools/downloader/Retail/object_attributes/emotions_recognition/0003/dldt/INT8/emotions-recognition-retail-0003.bin ... 100%, 9697 KB, 7492 KB/s, 1 seconds passed ###############|| Post processing ||############### - IR files do not exist in project directory. - Copying IR files to current folder... emotions_recognition_retail_0003: Making dependencies... emotions_recognition_retail_0003: Downloading required data...
#from openvino.inference_engine import IENetwork, IEPlugin, IECore from openvino.inference_engine import IECore : : # emotion_net = IENetwork(model=emotions_model_xml, weights=emotions_model_bin) emotion_net = ie.read_network(model=emotions_model_xml, weights=emotions_model_bin) : # plugin = IEPlugin(device=device) : # face_exec_net = plugin.load(network=face_net) face_exec_net = ie.load_network(network=face_net, device_name = "MYRIAD") : # emotion_exec_net = plugin.load(network=emotion_net) emotion_exec_net = ie.load_network(network=emotion_net, device_name = "MYRIAD")
pi@raspberrypi:~/ncappzoo/networks/emotions_recognition_retail_0003 $ python3 emotions_recognition_retail_0003.py [ INFO ] Loading Camera id 0 Traceback (most recent call last): File "emotions_recognition_retail_0003.py", line 150, in <module> sys.exit(main() or 0) File "emotions_recognition_retail_0003.py", line 66, in main face_net = ie.read_network(model=face_model_xml, weights=face_model_bin) File "ie_api.pyx", line 261, in openvino.inference_engine.ie_api.IECore.read_network File "ie_api.pyx", line 285, in openvino.inference_engine.ie_api.IECore.read_network RuntimeError: The support of IR v6 has been removed from the product. Please, convert the original model using the Model Optimizer which comes with this version of the OpenVINO to generate supported IR version.〇 新しいIRファイルをコピーして実行する。
pi@raspberrypi:~/ncappzoo/networks/emotions_recognition_retail_0003 $ python3 emotions_recognition_retail_0003.py [ INFO ] Loading Camera id 0 [ INFO ] Face-Detection network has been loaded: /home/pi/ncappzoo/networks/emotions_recognition_retail_0003/face-detection-retail-0004.xml /home/pi/ncappzoo/networks/emotions_recognition_retail_0003/face-detection-retail-0004.bin [ INFO ] Emotions-Recognition network has been loaded: /home/pi/ncappzoo/networks/emotions_recognition_retail_0003/emotions-recognition-retail-0003.xml /home/pi/ncappzoo/networks/emotions_recognition_retail_0003/emotions-recognition-retail-0003.bin [ INFO ] Setting device: MYRIAD [ INFO ] Loading Face-Detection model to the plugin emotions_recognition_retail_0003.py:81: DeprecationWarning: 'inputs' property of IENetwork class is deprecated. To access DataPtrs user need to use 'input_data' property of InputInfoPtr objects which can be accessed by 'input_info' property. face_input_blob = next(iter(face_net.inputs)) [ INFO ] Loading Emotions-Recognition model to the plugin [ INFO ] emotions-recognition-retail sample is starting... emotions_recognition_retail_0003.py:109: DeprecationWarning: 'outputs' property of InferRequest is deprecated. Please instead use 'output_blobs' property. res = face_exec_net.requests[0].outputs[face_out_blob]
mizutu@ubuntu2004dk:~/ncappzoo/networks$ ls face_detection_retail_0004 Makefile face-detection-retail-0004.bin face_detection_retail_0004.py README.md face-detection-retail-0004.xml image.jpg
# from openvino.inference_engine import IENetwork, IECore from openvino.inference_engine import IECore : : # type=str, default = './face-detection-adas-0001-fp16.xml', type=str, default = './face-detection-retail-0004.xml', : : # face_net = IENetwork(model = face_ir, weights = face_ir[:-3] + 'bin') face_net = ie.read_network(model = face_ir, weights = face_ir[:-3] + 'bin')
pi@raspberrypi:~/ncappzoo/networks/face_detection_retail_0004 $ python3 face_detection_retail_0004.py face_detection_retail_0004.py:81: DeprecationWarning: 'inputs' property of IENetwork class is deprecated. To access DataPtrs user need to use 'input_data' property of InputInfoPtr objects which can be accessed by 'input_info' property. face_input_blob = next(iter(face_net.inputs)) face-detection-retail-0004: Starting application... - Plugin: Myriad - IR File: ./face-detection-retail-0004.xml - Input Shape: [1, 3, 300, 300] - Output Shape: [1, 1, 200, 7] - Labels File: None - Image File: image.jpg - Crop path: None - Show window: no face_detection_retail_0004.py:118: DeprecationWarning: 'outputs' property of InferRequest is deprecated. Please instead use 'output_blobs' property. inference_results = face_exec_net.requests[cur_request_id].outputs[face_output_blob] Finished.
mizutu@ubuntu2004dk:~/ncappzoo/networks$ cd facenet mizutu@ubuntu2004dk:~/ncappzoo/networks/facenet$ make facenet: Making model zoo... (cd ../../omz; make all;) make[1]: ディレクトリ '/home/mizutu/ncappzoo/omz' に入ります : : facenet: Downloading required data for model... facenet: Compiling model to IR... Checking OpenVINO environment... Intel OpenVINO environment is already set! /opt/intel/openvino_2021.2.185/deployment_tools/model_optimizer/mo/main.py:85: SyntaxWarning: "is" with a literal. Did you mean "=="? if op is 'k': Model Optimizer arguments: Common parameters: - Path to the Input Model: /home/mizutu/ncappzoo/networks/facenet/../../omz/open_model_zoo/tools/downloader/face_recognition/facenet/CASIA-WebFace/tf/20180408-102900/20180408-102900.pb - Path for generated IR: /home/mizutu/ncappzoo/networks/facenet/. - IR output name: 20180408-102900 - Log level: ERROR - Batch: Not specified, inherited from the model - Input layers: image_batch,phase_train - Output layers: embeddings - Input shapes: [1,160,160,3],[1] - Mean values: [127.5,127.5,127.5] - Scale values: Not specified - Scale factor: 128.0 - Precision of IR: FP16 - Enable fusing: True - Enable grouped convolutions fusing: True - Move mean values to preprocess section: None - Reverse input channels: True TensorFlow specific parameters: - Input model in text protobuf format: False - Path to model dump for TensorBoard: None - List of shared libraries with TensorFlow custom layers implementation: None - Update the configuration file with input/output node names: None - Use configuration file used to generate the model with Object Detection API: None - Use the config file: None Model Optimizer version: 2021.2.0-1877-176bdf51370-releases/2021/2 2021-02-19 11:12:27.527346: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/intel/openvino_2021/data_processing/dl_streamer/lib:/opt/intel/openvino_2021/data_processing/gstreamer/lib:/opt/intel/openvino_2021/opencv/lib:/opt/intel/openvino_2021/deployment_tools/ngraph/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/hddl/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/gna/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/mkltiny_lnx/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/tbb/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/lib/intel64 2021-02-19 11:12:27.527399: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. [ SUCCESS ] Generated IR version 10 model. [ SUCCESS ] XML file: /home/mizutu/ncappzoo/networks/facenet/./20180408-102900.xml [ SUCCESS ] BIN file: /home/mizutu/ncappzoo/networks/facenet/./20180408-102900.bin [ SUCCESS ] Total execution time: 56.41 seconds. [ SUCCESS ] Memory consumed: 903 MB.
pi@raspberrypi:~/ncappzoo/networks/facenet $ python3 facenet.py facenet.py:217: DeprecationWarning: 'inputs' property of IENetwork class is deprecated. To access DataPtrs user need to use 'input_data' property of InputInfoPtr objects which can be accessed by 'input_info' property. input_blob = next(iter(net.inputs)) images: ['elvis.png', 'nealvis.png', 'reagan.png', 'trump.png'] ------------------ Facenet ------------------ - Face Match Threshold: 0.91 - Valid image: ./validated_face/valid_face.png - Test images: ./test_faces/['elvis.png', 'nealvis.png', 'reagan.png', 'trump.png'] --------------------------------------------- Total Difference is: 0.9133576111269535 FAIL! File elvis.png does not match ./validated_face/valid_face.png Total Difference is: 0.8568070407952841 PASS! File nealvis.png matches ./validated_face/valid_face.png Total Difference is: 1.0711990035897552 FAIL! File reagan.png does not match ./validated_face/valid_face.png Total Difference is: 0.9909147401660073 FAIL! File trump.png does not match ./validated_face/valid_face.png Finished.
mizutu@ubuntu2004dk:~/ncappzoo/networks$ cd mnist mizutu@ubuntu2004dk:~/ncappzoo/networks/mnist$ make mnist: Downloading model files... model file mnist_inference.data-00000-of-00001 already exists, skipping download model file mnist_inference.meta already exists, skipping download model file mnist_inference.index already exists, skipping download mnist: Making dependencies... mnist: Downloading required data - No data needed. mnist: Compiling model to IR... Checking OpenVINO environment... Intel OpenVINO environment is already set! compiled model file already exists, skipping compile.
# from openvino.inference_engine import IENetwork, IEPlugin from openvino.inference_engine import IECore : : # plugin = IEPlugin(device='MYRIAD') # net = IENetwork(model = ARGS.ir, weights = ARGS.ir[:-3] + 'bin') ie = IECore() net = ie.read_network(model = ARGS.ir, weights = ARGS.ir[:-3] + 'bin')
pi@raspberrypi:~/ncappzoo/networks/mnist $ python3 mnist.py mnist.py:74: DeprecationWarning: 'inputs' property of IENetwork class is deprecated. To access DataPtrs user need to use 'input_data' property of InputInfoPtr objects which can be accessed by 'input_info' property. input_blob = next(iter(net.inputs)) Starting application... - Plugin: Myriad - IR File: mnist_inference.xml - Input Shape: (1, 784) - Output Shape: [1, 10] - Labels File: categories.txt - Mean File: None - Image file: ../../data/images/nps_electric_guitar.png ********** Results *********** Prediction is 8 with a confidence of 59.1%.
mizutu@ubuntu2004dk:~/ncappzoo/networks$ cd ssd_mobilenet_v1_caffe mizutu@ubuntu2004dk:~/ncappzoo/networks/ssd_mobilenet_v1_caffe$ make ssd_mobilenet_v1_caffe: Cloning model zoo... (cd ../../omz; make all;) make[1]: ディレクトリ '/home/mizutu/ncappzoo/omz' に入ります : : ssd_mobilenet_v1_caffe: Compiling model to IR... Checking OpenVINO environment... Intel OpenVINO environment is already set! /opt/intel/openvino_2021.2.185/deployment_tools/model_optimizer/mo/main.py:85: SyntaxWarning: "is" with a literal. Did you mean "=="? if op is 'k': Model Optimizer arguments: Common parameters: - Path to the Input Model: /home/mizutu/ncappzoo/networks/ssd_mobilenet_v1_caffe/../../omz/open_model_zoo/tools/downloader/object_detection/common/mobilenet-ssd/caffe/mobilenet-ssd.caffemodel - Path for generated IR: /home/mizutu/ncappzoo/networks/ssd_mobilenet_v1_caffe/. - IR output name: mobilenet-ssd - Log level: ERROR - Batch: Not specified, inherited from the model - Input layers: Not specified, inherited from the model - Output layers: Not specified, inherited from the model - Input shapes: Not specified, inherited from the model - Mean values: [127.5,127.5,127.5] - Scale values: [127.50223128904757] - Scale factor: Not specified - Precision of IR: FP16 - Enable fusing: True - Enable grouped convolutions fusing: True - Move mean values to preprocess section: None - Reverse input channels: False Caffe specific parameters: - Path to Python Caffe* parser generated from caffe.proto: /opt/intel/openvino_2021/deployment_tools/model_optimizer/mo/front/caffe/proto - Enable resnet optimization: True - Path to the Input prototxt: /home/mizutu/ncappzoo/networks/ssd_mobilenet_v1_caffe/../../omz/open_model_zoo/tools/downloader/object_detection/common/mobilenet-ssd/caffe/mobilenet-ssd.prototxt - Path to CustomLayersMapping.xml: Default - Path to a mean file: Not specified - Offsets for a mean file: Not specified Model Optimizer version: 2021.2.0-1877-176bdf51370-releases/2021/2 2021-02-19 11:32:20.729115: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'libcudart.so.10.1'; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /opt/intel/openvino_2021/data_processing/dl_streamer/lib:/opt/intel/openvino_2021/data_processing/gstreamer/lib:/opt/intel/openvino_2021/opencv/lib:/opt/intel/openvino_2021/deployment_tools/ngraph/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/hddl/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/gna/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/mkltiny_lnx/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/external/tbb/lib:/opt/intel/openvino_2021/deployment_tools/inference_engine/lib/intel64 2021-02-19 11:32:20.729171: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. [ SUCCESS ] Generated IR version 10 model. [ SUCCESS ] XML file: /home/mizutu/ncappzoo/networks/ssd_mobilenet_v1_caffe/./mobilenet-ssd.xml [ SUCCESS ] BIN file: /home/mizutu/ncappzoo/networks/ssd_mobilenet_v1_caffe/./mobilenet-ssd.bin [ SUCCESS ] Total execution time: 9.00 seconds. [ SUCCESS ] Memory consumed: 367 MB. ssd_mobilenet_v1_caffe: Making dependencies... ssd_mobilenet_v1_caffe: Downloading required data...
# from openvino.inference_engine import IENetwork, IECore from openvino.inference_engine import IECore : : # net = IENetwork(model = ir, weights = ir[:-3] + 'bin') net = ie.read_network(model = ir, weights = ir[:-3] + 'bin')
pi@raspberrypi:~/ncappzoo/networks/ssd_mobilenet_v1_caffe $ python3 ssd_mobilenet_v1_caffe.py [ WARN:0] global ../opencv/modules/videoio/src/cap_gstreamer.cpp (919) open OpenCV | GStreamer warning: unable to query duration of stream [ WARN:0] global ../opencv/modules/videoio/src/cap_gstreamer.cpp (956) open OpenCV | GStreamer warning: Cannot query video position: status=1, value=0, duration=-1 ssd_mobilenet_v1_caffe.py:120: DeprecationWarning: 'inputs' property of IENetwork class is deprecated. To access DataPtrs user need to use 'input_data' property of InputInfoPtr objects which can be accessed by 'input_info' property. input_blob = next(iter(net.inputs)) SSD Mobilenet v1 Caffe VOC: Starting application... - Plugin: Myriad - IR File: ./mobilenet-ssd.xml - Input Shape: [1, 3, 300, 300] - Output Shape: [1, 1, 100, 7] - Labels File: labels.txt - Image File: ../../data/images/nps_chair.png - Show window: yes Press any key to quit. ssd_mobilenet_v1_caffe.py:163: DeprecationWarning: 'outputs' property of InferRequest is deprecated. Please instead use 'output_blobs' property. inference_results = exec_net.requests[cur_request_id].outputs[output_blob] Finished.
mizutu@ubuntu2004dk:~/ncappzoo/networks$ cd tiny_yolo_v1 mizutu@ubuntu2004dk:~/ncappzoo/networks/tiny_yolo_v1$ make tiny_yolo_v1: Downloading required data... No data needed. tiny_yolo_v1: Downloading caffemodel file... - Caffemodel file already exists tiny_yolo_v1: Making dependencies... tiny_yolo_v1: Compiling model to IR... Intel OpenVINO environment is already set! - IR files exist. No need to compile.
# from openvino.inference_engine import IENetwork, IECore from openvino.inference_engine import IECore : : # net = IENetwork(model = ir, weights = ir[:-3] + 'bin') net = ie.read_network(model = ir, weights = ir[:-3] + 'bin')
pi@raspberrypi:~/ncappzoo/networks/tiny_yolo_v1 $ python3 tiny_yolo_v1.py Running NCS Caffe TinyYolo example... tiny_yolo_v1.py:366: DeprecationWarning: 'inputs' property of IENetwork class is deprecated. To access DataPtrs user need to use 'input_data' property of InputInfoPtr objects which can be accessed by 'input_info' property. input_blob = next(iter(net.inputs)) Tiny Yolo v1: Starting application... - Plugin: Myriad - IR File: tiny-yolo-v1_53000.xml - Input Shape: [1, 3, 448, 448] - Output Shape: [1, 1470] - Labels File: labels.txt - Image File: ../../data/images/nps_chair.png Displaying image with objects detected in GUI... Click in the GUI window and hit any key to exit. Found this many objects in the image: 1 - object: chair is at left: 221, top: 176, right: 601, bottom: 688 Finished.○ 画像「dog.jpg」を指定
pi@raspberrypi:~/ncappzoo/networks/tiny_yolo_v1 $ python3 tiny_yolo_v1.py -i dog.jpg Running NCS Caffe TinyYolo example... tiny_yolo_v1.py:366: DeprecationWarning: 'inputs' property of IENetwork class is deprecated. To access DataPtrs user need to use 'input_data' property of InputInfoPtr objects which can be accessed by 'input_info' property. input_blob = next(iter(net.inputs)) Tiny Yolo v1: Starting application... - Plugin: Myriad - IR File: tiny-yolo-v1_53000.xml - Input Shape: [1, 3, 448, 448] - Output Shape: [1, 1470] - Labels File: labels.txt - Image File: dog.jpg Displaying image with objects detected in GUI... Click in the GUI window and hit any key to exit. Found this many objects in the image: 3 - object: car is at left: 444, top: 95, right: 614, bottom: 153 - object: bicycle is at left: 105, top: 93, right: 641, bottom: 475 - object: dog is at left: 100, top: 219, right: 314, bottom: 529 Finished.○ 画像「person.jpg」を指定
pi@raspberrypi:~/ncappzoo/networks/tiny_yolo_v1 $ python3 tiny_yolo_v1.py -i person.jpg Running NCS Caffe TinyYolo example... tiny_yolo_v1.py:366: DeprecationWarning: 'inputs' property of IENetwork class is deprecated. To access DataPtrs user need to use 'input_data' property of InputInfoPtr objects which can be accessed by 'input_info' property. input_blob = next(iter(net.inputs)) Tiny Yolo v1: Starting application... - Plugin: Myriad - IR File: tiny-yolo-v1_53000.xml - Input Shape: [1, 3, 448, 448] - Output Shape: [1, 1470] - Labels File: labels.txt - Image File: person.jpg Displaying image with objects detected in GUI... Click in the GUI window and hit any key to exit. Found this many objects in the image: 3 - object: dog is at left: 85, top: 271, right: 213, bottom: 349 - object: person is at left: 168, top: 112, right: 288, bottom: 336 - object: sheep is at left: 398, top: 129, right: 586, bottom: 335 Finished.