yolo export model=yolov8n.pt format=tflite int8=True imgsz=320# (Repeated identically for yolov11n.pt and yolov5nu.pt)
./neutron-converter --input yolov8n_full_integer_quant.tflite --target imx95 --output yolov8n_full_integer_quant_neutron.tfliteこんにちは@vijayranaACL。
NXPサポートまでご連絡いただきありがとうございます。
このガイドを参照してください。
お客様が使用されているのはi.MX91 A1シリコンリビジョンであるため、A1は主に評価および開発目的を意図した初期のシリコンリビジョンであり、一部の機能が正しく動作しない可能性があります。
そのため、テストおよび検証作業には、i.MX91 B0シリコンリビジョンを使用することをお勧めします。このガイドはB0シリコン版を用いて作成・検証されたため、文書化された挙動と結果はその改訂版に基づいています。
可能であれば、どのシリコンリビジョンを使っているか、そして比較のためにB0デバイスにアクセスできるかを確認してください。
よろしくお願いします、
アレハンドロ・ガルシア
こんにちは、 @vijayranaACL さん。
すみません、私の入力ミスでした。
私が言及していたのはi.MX95のことです。i.MX91にはNPUが搭載されていないからです。
モデル変換には以下のコマンドを試してみることをおすすめします:
.\neutron-converter.exe `
--input ".tflite" `
--target imx95 `
--output ".tflite" `
--optimization-level OOpt
Neutron SDKのドキュメントによると、コンバータはi.MX95のようなNeutron-Sターゲットに対してデターミニスティックではないことに注意が必要です。変換プロセスはマルチスレッド制約付きプログラミングソルバーに依存しているため、同じモデル上でコンバータを実行する場合、特にTCMメモリ割り当てや生成されたマイクロコードに関してわずかに異なる結果が生じることがあります。
複数の最適解が存在する可能性があるため、異なるソルバースレッドが各変換時に異なる有効な解に収束することがあります。これらの解は内部的に異なる場合がありますが、すべてコンバーターによって正しく最適化されています。ほとんどの場合、これらの違いは機能性や性能に大きな影響を与えることはありません。
挙動、性能、精度にばらつきが見られた場合は、モデルを複数回変換して結果を比較することをお勧めします。デターミニスティックな振る舞いを強制する方法は存在しますが、通常は変換時間が大幅に長くなり、厳密に必要でない限り推奨されません。
検査結果をお知らせください。
よろしくお願いします、
アレハンドロ・ガルシア
こんにちは、アレハンドロさん。
i.MX 95(i.MX 91ではない)に関する説明と、使用に関する推奨事項をありがとうございます。 --最適化レベル OOpt。
現在のセットアップであなたの提案されたコマンドに従おうとしましたが、Neutron-コンバーターとボードBSPを組み合わせたところ --optimization-level は利用できません 利用できません 。
ボード | IMX95LPD5EVK-19 |
BSP | LF6.12.34_2.1.0 (Linux 6.12.34-lts-next) |
Neutron 代表乗船中 | v1.0.0-be8bf399 |
ホストコンバータ | eIQツールキット 1.17 → Neutron-converter 2.1.3+0Xaf140cf5 |
コンバーターBSPタグ | MCU_SDK_25.09.00+Linux_6.12.34_2.1.0 |
このコンバーターでは、 中性子コンバーター――help does not list ―最適化レベル。
デバッグには、以下のツールも使用します。
主なオプション - ヘルプ:
--最適化レベル 存在しません このビルドでは。
YOLOv8n Neutron (我々の変換) | 呼び出しOKですが 検出数:0 |
YOLOv8n ヘッドレスバックボーン | NPU出力 定数(約1.13) |
ヘッドレスCPUバックボーン+CPUヘッド | 検出は正常です — パイプラインのロジックは正しい |
こんにちは、 @vijayranaACL さん。
B0シリコンを搭載したi.MX95 EVKであなたのコードをテストしましたが、こちら側では問題なく正常に動作しているようです。
person_detect.pyアプリケーションを使うと、モデルは正常に読み込まれ、Neutronデリゲートは正しく初期化され、アプリケーションは予想通りの推論を実行します。テスト中、安定した物体検出と、約13~14 FPSの持続的なパフォーマンスを確認しました。ログはまた、Neutron delegateがアクティブであり、モデルがNPU加速で正しく動作していることも確認しています。
これらの結果に基づき、B0シリコンリビジョンへの移行を推奨します。A0およびA1シリコン版は主に評価およびベータテスト目的でリリースされており、B0ほどのソフトウェアサポートや検証レベルが整っていません。初期の改訂版以降、いくつかの機能追加や修正が行われており、それがお客様が経験されている動作の原因となっている可能性があります。
私のテストログの関連部分を以下に示します。
root@imx95evk:~# python3 person_detect.py
Opening camera /dev/video52 ...
Trying camera backend: V4L2 /dev/video52
Camera opened via V4L2 /dev/video52
Loading model and NPU delegate ...
Loaded Neutron delegate: /usr/lib/libneutron_delegate.so
/usr/lib/python3.13/site-packages/tflite_runtime/interpreter.py:457: UserWarning: Warning: tf.lite.Interpreter is deprecated and is scheduled for deletion in
TF 2.20. Please use the LiteRT interpreter from the ai_edge_litert package.
See the [migration guide](https://ai.google.dev/edge/litert/migration)
for details.
warnings.warn(_INTERPRETER_DELETION_WARNING)
INFO: NeutronDelegate delegate: 1 nodes delegated out of 33 nodes with 1 partitions.
INFO: Neutron delegate version: v1.0.0-d98743a7, zerocp enabled.
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
Model input: shape=[ 1 640 640 3] dtype= quant=(0.003921568859368563, -128)
Model output[0]: shape=[ 1 84 8400] dtype= quant=(0.003906319383531809, -128)
Using model input size: 640x640
Re-opening camera after model load ...
Trying camera backend: V4L2 /dev/video52
Camera opened via V4L2 /dev/video52
Person detection running. Press Ctrl+C to stop.
First frame: 640x480
Output tensor shape: (1, 84, 8400)
frame=22 person conf=0.61 box=[143,8,496,476] fps=10.7
--- fps=11.5 detections=0 ---
frame=39 person conf=0.58 box=[138,16,496,473] fps=12.1
frame=50 person conf=0.50 box=[138,12,496,472] fps=12.5
frame=60 person conf=0.58 box=[138,13,496,476] fps=12.8
--- fps=12.8 detections=1 ---
frame=84 person conf=0.61 box=[143,10,496,475] fps=13.3
frame=85 person conf=0.54 box=[138,10,496,475] fps=13.3
frame=86 person conf=0.61 box=[138,13,496,476] fps=13.3
frame=88 person conf=0.54 box=[138,12,496,472] fps=13.3
--- fps=13.3 detections=0 ---
--- fps=13.6 detections=0 ---
frame=136 person conf=0.65 box=[138,13,496,476] fps=13.7
frame=139 person conf=0.58 box=[138,12,496,472] fps=13.7
frame=140 person conf=0.61 box=[136,10,498,475] fps=13.8
frame=141 person conf=0.61 box=[138,13,496,476] fps=13.8
frame=145 person conf=0.50 box=[138,13,496,476] fps=13.8
frame=146 person conf=0.65 box=[138,13,496,476] fps=13.8
frame=148 person conf=0.54 box=[138,16,496,473] fps=13.8
frame=150 person conf=0.50 box=[131,12,498,472] fps=13.8
--- fps=13.8 detections=1 ---
frame=155 person conf=0.50 box=[152,32,497,472] fps=13.8
frame=156 person conf=0.71 box=[180,37,495,422] fps=13.8
frame=157 person conf=0.54 box=[182,38,497,411] fps=13.8
frame=158 person conf=0.65 box=[156,37,493,472] fps=13.8
frame=159 person conf=0.68 box=[158,42,496,472] fps=13.8
frame=160 person conf=0.61 box=[155,46,495,468] fps=13.8
frame=162 person conf=0.54 box=[156,46,493,463] fps=13.8
frame=163 person conf=0.71 box=[171,43,493,466] fps=13.8
frame=164 person conf=0.54 box=[186,41,363,353] fps=13.8
frame=165 person conf=0.61 box=[187,42,492,452] fps=13.8
frame=166 person conf=0.58 box=[190,41,495,393] fps=13.8
frame=167 person conf=0.61 box=[190,42,495,432] fps=13.8
frame=168 person conf=0.61 box=[195,38,495,426] fps=13.8
frame=169 person conf=0.50 box=[190,36,495,423] fps=13.8
frame=170 person conf=0.58 box=[198,37,496,397] fps=13.8
--- fps=13.9 detections=0 ---
frame=202 person conf=0.50 box=[145,28,495,456] fps=13.9
--- fps=14.0 detections=0 ---
^CStopped.
root@imx95evk:~#
同じアプリケーションとモデルがB0シリコン上で正常に動作するため、問題はアプリケーション自体ではなくシリコンリビジョンに関連している可能性があるため、さらなるデバッグを続ける前にB0デバイスでテストを繰り返し行うことをお勧めします。
よろしくお願いします、
チャビラ