Skip to content

Commit

Permalink
[Bug Fix] Fixed PFLD infer demo (PaddlePaddle#482)
Browse files Browse the repository at this point in the history
* support face alignment PFLD

* add PFLD demo

* fixed FaceAlignmentResult

* fixed bugs

* fixed img size

* fixed readme

* deal with comments

* fixed readme

* add pfld testcase

* update infer.py

* add gflags for example

* update c++ readme

* add gflags in example

* fixed for ci

* fixed gflags.cmake

* deal with comments

* update infer demo

* fixed bug in infer.cc

Co-authored-by: Jason <[email protected]>
  • Loading branch information
wjj19950828 and jiangjiajun authored Nov 2, 2022
1 parent a231c9e commit 39229bf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions examples/vision/facealign/pfld/cpp/infer.cc
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ void PrintUsage() {
}

bool CreateRuntimeOption(fastdeploy::RuntimeOption* option) {
if (FLAG_device == "gpu") {
if (FLAGS_device == "gpu") {
option->UseGpu();
if (FLAG_backend == "ort") {
if (FLAGS_backend == "ort") {
option->UseOrtBackend();
} else if (FLAGS_backend == "paddle") {
option->UsePaddleBackend();
Expand All @@ -54,24 +54,24 @@ 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 (FLAG_device == "cpu") {
} else if (FLAGS_device == "cpu") {
if (FLAGS_backend == "ort") {
option->UseOrtBackend();
} else if (FLAGS_backend == "ov") {
option->UseOpenVINOBackend();
} else if (FLAGS_backend == "paddle") {
option->UsePaddleBackend();
} else if (FLAGS_backend = "default") {
} 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 {
std::cerr << "Only support device CPU/GPU now, " << FLAG_device << " is not supported." << std::endl;
std::cerr << "Only support device CPU/GPU now, " << FLAGS_device << " is not supported." << std::endl;
return false;
}

Expand Down

0 comments on commit 39229bf

Please sign in to comment.