AMB82 SCRFD Convert To ONNX

SCRFD

SCRFD 是一種最初在 Arxiv 中進行了描述,高效的高精度人臉檢測方法。
它提供了一個易於使用的管道來訓練具有 NAS 支持的高效人臉檢測器。
你可以拜訪 [InsignFace](https://github.com/deepinsight/insightface/tree/master/detection/scrfd) 獲取更多信息。
對於amebaPro2邊緣計算,建議makers使用 [SCRFD_500M_KPS](https://1drv.ms/u/s!AswpsDO2toNKri_NDM0GIkPpkE2f?e=JkebJo).

SCRFD 設置環境

SCRFD默認格式是pytorch,所以要轉成ONNX格式:

cd ~/insightface/detection/scrfd
python tools/scrfd2onnx.py configs/scrfd/scrfd_500m_bnkps.py scrfd_500mkps.pt --shape 640 640

你可以在 [InsignFace] 中找到 tools/scrfd2onnx.py(https://github.com/deepinsight/insightface/tree/master/detection/scrfd).

如果Makers遇到Python包依賴問題,可以嘗試用virtualenv創建隔離的Python環境,並參考我們的requirements_scrfd.txt安裝Python包。

pip install -r requirements_scrfd.txt

為了向您展示如何快速翻譯和導出 SCRFD,我們可以從網上下載預訓練的權重:
[scrfd.lite.ai.toolkit](https://github.com/DefTruth/scrfd.lite.ai.toolkit)
請下載`scrfd_500m_bnkps_shape640x640.onnx`或`scrfd_500m_bnkps_shape320x320.onnx`用於amebaPro2邊緣計算。

下載

請先確認已安裝QQ通訊軟體