VeriSilicon / TIM-VX

VeriSilicon Tensor Interface Module
Other
216 stars 85 forks source link

Problem getting Yolov5 models working with NXP imx8mp and NPU #604

Closed burtbick closed 1 year ago

burtbick commented 1 year ago

Hi, We have been wrestling with an issue with running Yolov5 models with the NPU on NXP imx8mp. NXP says that it works with their 5.15.71 BSP with TensorFlow Lite version 2.9.1.

Those are the versions we are using. All the Yolov5 models work properly when running on the CPU but fail in pretty much the same way when running on the NPU. This includes a model and example python script with image data provided by NXP. And also another small model provided by another user on the NXP forums who says that it is working with that BSP and TFLite combination.

All the models are object detection.

When running on the NPU all the bounding box coordinates are zeros. And I suspect the confidence scores are incorrect as well.

Has anyone run into a similar issue with Yolov5 object detection models and the NPU? If so how did you fix it?

Note that the same tflite models "compiled" for the Corel TPU run fine with the TPU.

I have TFLite logging but most everything thing appears to be OK as far as the graph is concerned. No error messages, just the bogus output. That and the "warmup" time is very long. But the inference time is reasonable, all but with bogus results.

Thanks,

sunshinemyson commented 1 year ago

Duplicate with https://github.com/VeriSilicon/tflite-vx-delegate/issues/189