diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 7118460ea..8aa469b6a 100755 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -49,7 +49,7 @@ function(add_fastdeploy_executable FIELD CC_FILE) add_executable(${TEMP_TARGET_NAME} ${TEMP_TARGET_FILE}) target_link_libraries(${TEMP_TARGET_NAME} PUBLIC fastdeploy) if(TARGET gflags) - if(UNIX) + if(UNIX AND (NOT APPLE) AND (NOT ANDROID)) target_link_libraries(${TEMP_TARGET_NAME} PRIVATE gflags pthread) else() target_link_libraries(${TEMP_TARGET_NAME} PRIVATE gflags) diff --git a/examples/vision/facealign/pfld/cpp/CMakeLists.txt b/examples/vision/facealign/pfld/cpp/CMakeLists.txt index be329f69a..c417fcb38 100755 --- a/examples/vision/facealign/pfld/cpp/CMakeLists.txt +++ b/examples/vision/facealign/pfld/cpp/CMakeLists.txt @@ -11,7 +11,7 @@ include_directories(${FASTDEPLOY_INCS}) add_executable(infer_demo ${PROJECT_SOURCE_DIR}/infer.cc) # 添加FastDeploy库依赖 -if(UNIX) +if(UNIX AND (NOT APPLE) AND (NOT ANDROID)) target_link_libraries(infer_demo ${FASTDEPLOY_LIBS} gflags pthread) else() target_link_libraries(infer_demo ${FASTDEPLOY_LIBS} gflags) diff --git a/examples/vision/headpose/fsanet/cpp/CMakeLists.txt b/examples/vision/headpose/fsanet/cpp/CMakeLists.txt old mode 100644 new mode 100755 index be329f69a..c417fcb38 --- a/examples/vision/headpose/fsanet/cpp/CMakeLists.txt +++ b/examples/vision/headpose/fsanet/cpp/CMakeLists.txt @@ -11,7 +11,7 @@ include_directories(${FASTDEPLOY_INCS}) add_executable(infer_demo ${PROJECT_SOURCE_DIR}/infer.cc) # 添加FastDeploy库依赖 -if(UNIX) +if(UNIX AND (NOT APPLE) AND (NOT ANDROID)) target_link_libraries(infer_demo ${FASTDEPLOY_LIBS} gflags pthread) else() target_link_libraries(infer_demo ${FASTDEPLOY_LIBS} gflags) diff --git a/examples/vision/headpose/fsanet/cpp/infer.cc b/examples/vision/headpose/fsanet/cpp/infer.cc index 332f49260..522ec3d95 100644 --- a/examples/vision/headpose/fsanet/cpp/infer.cc +++ b/examples/vision/headpose/fsanet/cpp/infer.cc @@ -44,7 +44,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) { } else if (FLAGS_backend == "trt" || FLAGS_backend == "paddle_trt") { option->UseTrtBackend(); - option.SetTrtInputShape("images", {1, 3, 64, 64}); + option->SetTrtInputShape("images", {1, 3, 64, 64}); if (FLAGS_backend == "paddle_trt") { option->EnablePaddleToTrt(); } @@ -54,7 +54,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) { } else if (FLAGS_backend == "default") { return true; } else { - std::cout << "While inference with GPU, only support default/ort/paddle/trt/paddle_trt now, " << FLAG_backend << " is not supported." << std::endl; + std::cout << "While inference with GPU, only support default/ort/paddle/trt/paddle_trt now, " << FLAGS_backend << " is not supported." << std::endl; return false; } } else if (FLAGS_device == "cpu") { @@ -67,7 +67,7 @@ bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) { } else if (FLAGS_backend == "default") { return true; } else { - std::cout << "While inference with CPU, only support default/ort/ov/paddle now, " << FLAG_backend << " is not supported." << std::endl; + std::cout << "While inference with CPU, only support default/ort/ov/paddle now, " << FLAGS_backend << " is not supported." << std::endl; return false; } } else { diff --git a/fastdeploy/vision/matting/contrib/rvm.cc b/fastdeploy/vision/matting/contrib/rvm.cc old mode 100644 new mode 100755 index ec8ed19fc..6f48a3865 --- a/fastdeploy/vision/matting/contrib/rvm.cc +++ b/fastdeploy/vision/matting/contrib/rvm.cc @@ -138,7 +138,8 @@ bool RobustVideoMatting::Postprocess( result->Clear(); result->contain_foreground = true; - result->shape = {static_cast(in_h), static_cast(in_w)}; + // if contain_foreground == true, shape must set to (h, w, c) + result->shape = {static_cast(in_h), static_cast(in_w), 3}; int numel = in_h * in_w; int nbytes = numel * sizeof(float); result->Resize(numel);