[CANN] Add Ascend NPU support
Motivation
Hi, thanks for your great work! I've run insightface on my Ascend NPU Device and then want to make this contribution for other users using the same hardware. Would love to get feedback :)
ONNX Runtime has nativaly supported Ascend NPU since v1.12.1, more information in ONNX Runtime-CANN-ExecutionProvider
Change
This PR supports Ascend NPU as a new backend for insightface.
Test
Person Detection Test with 2k images
cpu: 19.6 FPS
npu: 69.7 FPS
Web-demo Test
-
sim: 0.6081, message: They ARE the same person -
sim: 0.0444, message: They are NOT the same person
Hi @nttstar, thank you for this great job. Because the onnxruntime is officially support Ascend with CANN EP, it does not modify too much code to adapt this project. May i know if this could be merged or what else do i need to do?
More Information
Ascend is a full-stack AI computing infrastructure for industry applications and services based on Huawei Ascend processors and software. For more information about Ascend, see Ascend Community. CANN (Compute Architecture of Neural Networks), developped by Huawei, is a heterogeneous computing architecture for AI. Pytorch has officially announced support for Ascend NPU (through key PrivateUse1)