We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在对生成的demo文件进行压力测试的时候,出现内存泄露问题. infer.cc修改后的代码:
int processImages() { fastdeploy::RuntimeOption option; fastdeploy::ModelFormat format; int flag = std::atoi("1"); if (flag == 0) { option.UseCpu(); format = fastdeploy::ONNX; } else if (flag == 1) { option.UseRKNPU2(); format = fastdeploy::RKNN; } std::string det_model_dir = "./yh/det4_shape_rk3588_unquantized.rknn"; std::string cls_model_dir = "./yh/cls2_shape_rk3588_unquantized.rknn"; std::string rec_model_dir = "./yh/rec4_shape_rk3588_unquantized.rknn"; std::string rec_label_file = "./yh/ppocr_keys_v1.txt"; std::string test_image = "./1.jpg"; InitAndInfer(det_model_dir, cls_model_dir, rec_model_dir, rec_label_file, test_image, option, format); return 0; }
测试test.cpp:
#include <iostream> #include <vector> #include <string> #include "infer_demo.h" // 包含静态库的头文件 int main() { while(1) { processImages(); } return 0; }
头文件:infer_demo.h
#ifndef INFER_DEMO_H #define INFER_DEMO_H int processImages(); #endif // INFER_DEMO_H
The text was updated successfully, but these errors were encountered:
juncaipeng
No branches or pull requests
在对生成的demo文件进行压力测试的时候,出现内存泄露问题.
infer.cc修改后的代码:
测试test.cpp:
头文件:infer_demo.h
The text was updated successfully, but these errors were encountered: