windows下 c++部署fastdeploy后,测试facelandmark1000,结果完全不对
温馨提示:根据社区不完全统计,按照模板提问,可以加快回复和解决问题的速度
环境
- 【FastDeploy版本】: release1.0.7
- 【编译命令】git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy
mkdir build && cd build
cmake .. -G "Visual Studio 16 2019" -A x64
-DENABLE_ORT_BACKEND=ON
-DENABLE_PADDLE_BACKEND=ON
-DENABLE_OPENVINO_BACKEND=ON
-DENABLE_VISION=ON
-DCMAKE_INSTALL_PREFIX="D:\code\LSM\DemoCOM\compiled_fastdeploy"
msbuild fastdeploy.sln /m /p:Configuration=Debug /p:Platform=x64 msbuild INSTALL.vcxproj /m /p:Configuration=Debug /p:Platform=x64
- 【系统平台】: Windows x64
- 【硬件】: CPU
- 【编译语言】: C++
问题日志及出现问题的操作流程
- 附上详细的问题日志有助于快速定位分析
- 【模型跑不通】
-
- 使用FaceLandmark1000.onnx模型,测试代码完全搬运infer.cc,但是运行结果见图片吧
-
- 代码:
-
-
void CFaceLandmark::testCam() {
cv::VideoCapture cap(0); if (!cap.isOpened()) { std::cerr << "can not open camera." << std::endl; return; }
cv::Mat frame; auto option = fastdeploy::RuntimeOption(); if (!CreateRuntimeOption(&option)) { return; }
std::string modelFile = "D:\code\xxx\testPro\x64\Release\model\FaceLandmark.onnx"; auto model = fastdeploy::vision::facealign::FaceLandmark1000(modelFile, "", option); if (!model.Initialized()) { std::cerr << "Failed to initialize." << std::endl; return; }
while (1) { cap >> frame; if (frame.empty()) { std::cerr << "can not read video." << std::endl; return; }
fastdeploy::vision::FaceAlignmentResult res; if (!model.Predict(&frame, &res)) { std::cerr << "Failed to predict." << std::endl; return; } auto vis_im = fastdeploy::vision::VisFaceAlignment(frame, res); cv::imshow("imagex", vis_im); cv::waitKey(100);} } 测试结果:
-
这是什么问题,代码编译没问题,模型官网下载的,用法也是仿照示例写的,怎么检测结果是这个呢
@juncaipeng 这个问题我解决了,windows x64是正常了,我现在想再高通的arm64平台上使用facelandmark,然后编译facedeploy的arm64版本,编译1000多个错误,我看文档好像是不支持,确定是不支持么?编译命令如下:
cmake .. -G "Visual Studio 16 2019" -A arm64
-DENABLE_ORT_BACKEND=ON
-DENABLE_PADDLE_BACKEND=ON
-DENABLE_OPENVINO_BACKEND=ON
-DENABLE_VISION=ON
-DCMAKE_INSTALL_PREFIX="D:\code\LSM\DemoCOM\compiled_fastdeploy_arm64"
msbuild fastdeploy.sln /m /p:Configuration=Debug /p:Platform=arm64
粘贴一小部分错误: “D:\code\LSM\DemoCOM\FastDeploy\build_arm64\fastdeploy.sln”(默认目标) (1) -> “D:\code\LSM\DemoCOM\FastDeploy\build_arm64\ALL_BUILD.vcxproj.metaproj”(默认目标) (2) -> “D:\code\LSM\DemoCOM\FastDeploy\build_arm64\copy_yaml_include.vcxproj.metaproj”(默认目标) (3) -> “D:\code\LSM\DemoCOM\FastDeploy\build_arm64\fastdeploy.vcxproj.metaproj”(默认目标) (4) -> “D:\code\LSM\DemoCOM\FastDeploy\build_arm64\fastdeploy.vcxproj”(默认目标) (21) -> (Link 目标) -> utils.cc.obj : error LNK2001: 无法解析的外部符号 OrtGetApiBase [D:\code\LSM\DemoCOM\FastDeploy\build_arm64\fastdeploy.v cxproj] runtime.obj : error LNK2001: 无法解析的外部符号 OrtGetApiBase [D:\code\LSM\DemoCOM\FastDeploy\build_arm64\fastdeploy.vc xproj] adaptive_pool2d.obj : error LNK2001: 无法解析的外部符号 OrtGetApiBase [D:\code\LSM\DemoCOM\FastDeploy\build_arm64\fastd eploy.vcxproj] ort_backend.obj : error LNK2001: 无法解析的外部符号 OrtGetApiBase [D:\code\LSM\DemoCOM\FastDeploy\build_arm64\fastdeplo y.vcxproj] multiclass_nms.cc.obj : error LNK2001: 无法解析的外部符号 OrtGetApiBase [D:\code\LSM\DemoCOM\FastDeploy\build_arm64\fas tdeploy.vcxproj]
arm64架构不支持PADDLE_BACKEND, 要用PaddleLite
这是什么问题,代码编译没问题,模型官网下载的,用法也是仿照示例写的,怎么检测结果是这个呢
你的脸咋这么大