mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-22 08:09:28 +08:00
[Model] Support PP-ShiTuV2 models for PaddleClas (#1900)
* [cmake] add faiss.cmake -> pp-shituv2 * [PP-ShiTuV2] Support PP-ShituV2-Det model * [PP-ShiTuV2] Support PP-ShiTuV2-Det model * [PP-ShiTuV2] Add PPShiTuV2Recognizer c++&python support * [PP-ShiTuV2] Add PPShiTuV2Recognizer c++&python support * [Bug Fix] fix ppshitu_pybind error * [benchmark] Add ppshituv2-det c++ benchmark * [examples] Add PP-ShiTuV2 det & rec examples * [vision] Update vision classification result * [Bug Fix] fix trt shapes setting errors
This commit is contained in:
7
benchmark/cpp/benchmark_picodet.cc
Executable file → Normal file
7
benchmark/cpp/benchmark_picodet.cc
Executable file → Normal file
@@ -49,8 +49,7 @@ int main(int argc, char* argv[]) {
|
||||
config_info["backend"] == "trt") {
|
||||
option.trt_option.SetShape("image", {1, 3, 640, 640}, {1, 3, 640, 640},
|
||||
{1, 3, 640, 640});
|
||||
option.trt_option.SetShape("scale_factor", {1, 2}, {1, 2},
|
||||
{1, 2});
|
||||
option.trt_option.SetShape("scale_factor", {1, 2}, {1, 2}, {1, 2});
|
||||
}
|
||||
auto model_picodet = vision::detection::PicoDet(
|
||||
model_file, params_file, config_file, option, model_format);
|
||||
@@ -81,9 +80,9 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
// Run profiling
|
||||
BENCHMARK_MODEL(model_picodet, model_picodet.Predict(im, &res))
|
||||
auto vis_im = vision::VisDetection(im, res);
|
||||
auto vis_im = vision::VisDetection(im, res, 0.5f);
|
||||
cv::imwrite("vis_result.jpg", vis_im);
|
||||
std::cout << "Visualized result saved in ./vis_result.jpg" << std::endl;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user