FastDeploy icon indicating copy to clipboard operation
FastDeploy copied to clipboard

使用C++进行端到端多线程推理时:如果把ppocr3模型对象 Clone() 2次,每个线程使用一个unique_ptr<fastdeploy::pipeline::PPOCRv3>预测, 程序必出现Mats shapes are not consisten

Open huangtao2999 opened this issue 2 years ago • 4 comments


温馨提示:根据社区不完全统计,按照模板提问,可以加快回复和解决问题的速度


环境

  • 【FastDeploy版本】: 说明具体的版本,如fastdeploy-linux-gpu-1.0.7
  • 【编译命令】如果您是自行编译的FastDeploy,请说明您的编译方式(参数命令)
  • 【系统平台】: Linux x64(Ubuntu 18.04)
  • 【硬件】: Nvidia GPU 3080TI
  • 【编译语言】: C++

问题日志及出现问题的操作流程

[ERROR] fastdeploy/vision/common/processors/mat_batch.cc(33)::Tensor Mats shapes are not consistent.

  • 【模型跑不通】 auto ppocr_v3 = fastdeploy::pipeline::PPOCRv3(&det_model, &cls_model, &rec_model); auto ppocr1 =ppocr_v3.Clone(); auto ppocr2 =ppocr_v3.Clone();

cv::Mat im = imageModel.GetIm(); fastdeploy::vision::OCRResult result; ppocr_v3.Predict(&im, &result);

cv::Mat im1 = imageModel.GetIm(); fastdeploy::vision::OCRResult result1; ppocr1->Predict(&im1, &result1);

cv::Mat im2 = imageModel.GetIm(); fastdeploy::vision::OCRResult result2; ppocr2->Predict(&im2, &result2);

image

huangtao2999 avatar Dec 14 '23 03:12 huangtao2999

已收到反馈,我们分析一下原因

rainyfly avatar Feb 06 '24 06:02 rainyfly

已收到反馈,我们分析一下原因

您好,我们再生产环境中遇到了同样的问题,请问这个问题有修复吗?或者这个问题有计划处理吗?谢谢

tim7-m avatar May 15 '24 00:05 tim7-m

真是头疼,这个框架到底能不能在生产环境中用嘛?

KyleWang-Hunter avatar May 15 '24 03:05 KyleWang-Hunter

已收到反馈,我们分析一下原因

遇到了相同的问题,请问有没有解决方案

tsing-luo avatar Jan 01 '25 15:01 tsing-luo