hello_query_device(macOS編)

サンプルを片っ端から実行していくシリーズ。今回はhello_query_deviceのサンプルを実行してみます。実行結果が長いので記事はOS別に記載します。

サンプルは以下のフォルダになります。
openvino\inference_engine\samples\python\hello_query_device

実行の前に

サンプルを実行する前に、READMEファイルを確認しておきましょう。このサンプルはOpenVINOで使用出来るデバイスの情報を取得するものなので凄くシンプルです。

モデル

今回のサンプルはモデルは不要です。

環境

以下の環境で確認しました。

MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports)
プロセッサ 2.7 GHz クアッドコアIntel Core i7
メモリ 16 GB 2133 MHz LPDDR3
グラフィックス Intel Iris Plus Graphics 655 1536 MB

実行

環境変数の設定をしていない場合は、コマンドラインで以下を実行します。/opt/intel/openvino/bin/setupvars.sh

以下のコマンドでhello_query_deviceを実行します。

cd /opt/intel/openvino/deployment_tools/inference_engine/samples/python/hello_query_device % python3 hello_query_device.py

実行結果例(NCS2無し)

Available devices:
	Device: CPU
	Metrics:
		AVAILABLE_DEVICES: 
		SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_METRICS, FULL_DEVICE_NAME, OPTIMIZATION_CAPABILITIES, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, RANGE_FOR_STREAMS
		FULL_DEVICE_NAME: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
		OPTIMIZATION_CAPABILITIES: FP32, INT8, BIN
		SUPPORTED_CONFIG_KEYS: CPU_BIND_THREAD, CPU_THREADS_NUM, CPU_THROUGHPUT_STREAMS, DUMP_EXEC_GRAPH_AS_DOT, DYN_BATCH_ENABLED, DYN_BATCH_LIMIT, EXCLUSIVE_ASYNC_REQUESTS, PERF_COUNT
		RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 1, 1
		RANGE_FOR_STREAMS: 1, 8

	Default values for device configuration keys:
		CPU_BIND_THREAD: NUMA
		CPU_THREADS_NUM: 0
		CPU_THROUGHPUT_STREAMS: 1
		DUMP_EXEC_GRAPH_AS_DOT: 
		DYN_BATCH_ENABLED: NO
		DYN_BATCH_LIMIT: 0
		EXCLUSIVE_ASYNC_REQUESTS: NO
		PERF_COUNT: NO

実行結果例(NCS2 1本)

Available devices:
	Device: CPU
	Metrics:
		AVAILABLE_DEVICES: 
		SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_METRICS, FULL_DEVICE_NAME, OPTIMIZATION_CAPABILITIES, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, RANGE_FOR_STREAMS
		FULL_DEVICE_NAME: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
		OPTIMIZATION_CAPABILITIES: FP32, INT8, BIN
		SUPPORTED_CONFIG_KEYS: CPU_BIND_THREAD, CPU_THREADS_NUM, CPU_THROUGHPUT_STREAMS, DUMP_EXEC_GRAPH_AS_DOT, DYN_BATCH_ENABLED, DYN_BATCH_LIMIT, EXCLUSIVE_ASYNC_REQUESTS, PERF_COUNT
		RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 1, 1
		RANGE_FOR_STREAMS: 1, 8

	Default values for device configuration keys:
		CPU_BIND_THREAD: NUMA
		CPU_THREADS_NUM: 0
		CPU_THROUGHPUT_STREAMS: 1
		DUMP_EXEC_GRAPH_AS_DOT: 
		DYN_BATCH_ENABLED: NO
		DYN_BATCH_LIMIT: 0
		EXCLUSIVE_ASYNC_REQUESTS: NO
		PERF_COUNT: NO
	Device: MYRIAD
	Metrics:
		DEVICE_THERMAL: UNSUPPORTED TYPE
		SUPPORTED_CONFIG_KEYS: DEVICE_ID, PERF_COUNT, EXCLUSIVE_ASYNC_REQUESTS, VPU_MYRIAD_PLATFORM, VPU_HW_STAGES_OPTIMIZATION, VPU_CUSTOM_LAYERS, VPU_PRINT_RECEIVE_TENSOR_TIME, VPU_MYRIAD_FORCE_RESET, LOG_LEVEL, CONFIG_FILE, VPU_IGNORE_IR_STATISTIC
		RANGE_FOR_ASYNC_INFER_REQUESTS: 3, 6, 1
		OPTIMIZATION_CAPABILITIES: FP16
		SUPPORTED_METRICS: DEVICE_THERMAL, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, OPTIMIZATION_CAPABILITIES, SUPPORTED_METRICS, FULL_DEVICE_NAME, AVAILABLE_DEVICES
		FULL_DEVICE_NAME: Intel Movidius Myriad X VPU
		AVAILABLE_DEVICES: 20.1-ma2480

	Default values for device configuration keys:
		DEVICE_ID: 
		PERF_COUNT: OFF
		EXCLUSIVE_ASYNC_REQUESTS: OFF
		VPU_MYRIAD_PLATFORM: 
		VPU_HW_STAGES_OPTIMIZATION: ON
		VPU_CUSTOM_LAYERS: 
		VPU_PRINT_RECEIVE_TENSOR_TIME: OFF
		VPU_MYRIAD_FORCE_RESET: OFF
		LOG_LEVEL: LOG_NONE
		CONFIG_FILE: 
		VPU_IGNORE_IR_STATISTIC: OFF

実行結果例(NCS2 2本)

Available devices:
	Device: CPU
	Metrics:
		AVAILABLE_DEVICES: 
		SUPPORTED_METRICS: AVAILABLE_DEVICES, SUPPORTED_METRICS, FULL_DEVICE_NAME, OPTIMIZATION_CAPABILITIES, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, RANGE_FOR_STREAMS
		FULL_DEVICE_NAME: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
		OPTIMIZATION_CAPABILITIES: FP32, INT8, BIN
		SUPPORTED_CONFIG_KEYS: CPU_BIND_THREAD, CPU_THREADS_NUM, CPU_THROUGHPUT_STREAMS, DUMP_EXEC_GRAPH_AS_DOT, DYN_BATCH_ENABLED, DYN_BATCH_LIMIT, EXCLUSIVE_ASYNC_REQUESTS, PERF_COUNT
		RANGE_FOR_ASYNC_INFER_REQUESTS: 1, 1, 1
		RANGE_FOR_STREAMS: 1, 8

	Default values for device configuration keys:
		CPU_BIND_THREAD: NUMA
		CPU_THREADS_NUM: 0
		CPU_THROUGHPUT_STREAMS: 1
		DUMP_EXEC_GRAPH_AS_DOT: 
		DYN_BATCH_ENABLED: NO
		DYN_BATCH_LIMIT: 0
		EXCLUSIVE_ASYNC_REQUESTS: NO
		PERF_COUNT: NO
	Device: MYRIAD.20.1-ma2480
	Metrics:
		DEVICE_THERMAL: UNSUPPORTED TYPE
		SUPPORTED_CONFIG_KEYS: DEVICE_ID, PERF_COUNT, EXCLUSIVE_ASYNC_REQUESTS, VPU_MYRIAD_PLATFORM, VPU_HW_STAGES_OPTIMIZATION, VPU_CUSTOM_LAYERS, VPU_PRINT_RECEIVE_TENSOR_TIME, VPU_MYRIAD_FORCE_RESET, LOG_LEVEL, CONFIG_FILE, VPU_IGNORE_IR_STATISTIC
		RANGE_FOR_ASYNC_INFER_REQUESTS: 3, 6, 1
		OPTIMIZATION_CAPABILITIES: FP16
		SUPPORTED_METRICS: DEVICE_THERMAL, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, OPTIMIZATION_CAPABILITIES, SUPPORTED_METRICS, FULL_DEVICE_NAME, AVAILABLE_DEVICES
		FULL_DEVICE_NAME: Intel Movidius Myriad X VPU
		AVAILABLE_DEVICES: 20.1-ma2480, 20.2-ma2480

	Default values for device configuration keys:
		DEVICE_ID: 
		PERF_COUNT: OFF
		EXCLUSIVE_ASYNC_REQUESTS: OFF
		VPU_MYRIAD_PLATFORM: 
		VPU_HW_STAGES_OPTIMIZATION: ON
		VPU_CUSTOM_LAYERS: 
		VPU_PRINT_RECEIVE_TENSOR_TIME: OFF
		VPU_MYRIAD_FORCE_RESET: OFF
		LOG_LEVEL: LOG_NONE
		CONFIG_FILE: 
		VPU_IGNORE_IR_STATISTIC: OFF
	Device: MYRIAD.20.2-ma2480
	Metrics:
		DEVICE_THERMAL: UNSUPPORTED TYPE
		SUPPORTED_CONFIG_KEYS: DEVICE_ID, PERF_COUNT, EXCLUSIVE_ASYNC_REQUESTS, VPU_MYRIAD_PLATFORM, VPU_HW_STAGES_OPTIMIZATION, VPU_CUSTOM_LAYERS, VPU_PRINT_RECEIVE_TENSOR_TIME, VPU_MYRIAD_FORCE_RESET, LOG_LEVEL, CONFIG_FILE, VPU_IGNORE_IR_STATISTIC
		RANGE_FOR_ASYNC_INFER_REQUESTS: 3, 6, 1
		OPTIMIZATION_CAPABILITIES: FP16
		SUPPORTED_METRICS: DEVICE_THERMAL, SUPPORTED_CONFIG_KEYS, RANGE_FOR_ASYNC_INFER_REQUESTS, OPTIMIZATION_CAPABILITIES, SUPPORTED_METRICS, FULL_DEVICE_NAME, AVAILABLE_DEVICES
		FULL_DEVICE_NAME: Intel Movidius Myriad X VPU
		AVAILABLE_DEVICES: 20.1-ma2480, 20.2-ma2480

	Default values for device configuration keys:
		DEVICE_ID: 
		PERF_COUNT: OFF
		EXCLUSIVE_ASYNC_REQUESTS: OFF
		VPU_MYRIAD_PLATFORM: 
		VPU_HW_STAGES_OPTIMIZATION: ON
		VPU_CUSTOM_LAYERS: 
		VPU_PRINT_RECEIVE_TENSOR_TIME: OFF
		VPU_MYRIAD_FORCE_RESET: OFF
		LOG_LEVEL: LOG_NONE
		CONFIG_FILE: 
		VPU_IGNORE_IR_STATISTIC: OFF

NCS21本と2本での差分を見てみました。ちゃんと2本分出ていますね。

その他

NCS2を2本利用した時に、電力低下のメッセージが表示されました。セルフパワーのUSBハブの出番です。未だお持ちでない方はぜひ購入ください。USB3.0対応の方が良いですね。NCS2も試してみてくださいね。