From cfd80e95a12cd1f21e2dd76f566c8106e03b8c5d Mon Sep 17 00:00:00 2001 From: ThinkWD <48641295+ThinkWD@users.noreply.github.com> Date: Mon, 29 Jan 2024 19:16:19 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20#2359=20(#2363)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update pptinypose_utils.cc 添加 py 范围限制, 避免 utils::DarkParse 内部出现数组越界 --- fastdeploy/vision/keypointdet/pptinypose/pptinypose_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastdeploy/vision/keypointdet/pptinypose/pptinypose_utils.cc b/fastdeploy/vision/keypointdet/pptinypose/pptinypose_utils.cc index c0d80a4a6c..eb5a1f34f0 100644 --- a/fastdeploy/vision/keypointdet/pptinypose/pptinypose_utils.cc +++ b/fastdeploy/vision/keypointdet/pptinypose/pptinypose_utils.cc @@ -101,7 +101,7 @@ void GetFinalPredictions(const std::vector& heatmap, coords[j * 2 + 1] = idx / heatmap_width; int px = int(coords[j * 2] + 0.5); int py = int(coords[j * 2 + 1] + 0.5); - if (DARK && px > 1 && px < heatmap_width - 2) { + if (DARK && px > 1 && px < heatmap_width - 2 && py > 1 && py < heatmap_height - 2) { utils::DarkParse(heatmap, dim, &coords, px, py, index, j); } else { if (px > 0 && px < heatmap_width - 1) { From 1314f3267e8e35b467eb75cb815858155ea16c10 Mon Sep 17 00:00:00 2001 From: Albin Date: Tue, 27 Feb 2024 19:21:17 +0800 Subject: [PATCH 2/4] =?UTF-8?q?bug=20fix:=20=E4=BF=AE=E5=A4=8Dcontrib?= =?UTF-8?q?=E4=B8=AD=E7=9A=84det=E6=A8=A1=E5=9E=8B=E5=90=8E=E5=A4=84?= =?UTF-8?q?=E7=90=86=E5=9C=A8=E9=81=87=E5=88=B0=E6=B2=A1=E6=9C=89=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E6=A1=86=E7=9A=84=E5=9B=BE=E6=97=B6=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=90=8Cbatch=E4=B8=AD=E6=8E=A5=E4=B8=8B=E6=9D=A5=E7=9A=84?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E7=BB=93=E6=9E=9C=E5=85=A8=E9=83=A8=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E7=9A=84bug=20(#2378)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastdeploy/vision/detection/contrib/yolov5/postprocessor.cc | 2 +- fastdeploy/vision/detection/contrib/yolov5seg/postprocessor.cc | 2 +- fastdeploy/vision/detection/contrib/yolov7/postprocessor.cc | 2 +- fastdeploy/vision/detection/contrib/yolov8/postprocessor.cc | 2 +- fastdeploy/vision/facedet/contrib/centerface/postprocessor.cc | 2 +- fastdeploy/vision/facedet/contrib/yolov7face/postprocessor.cc | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fastdeploy/vision/detection/contrib/yolov5/postprocessor.cc b/fastdeploy/vision/detection/contrib/yolov5/postprocessor.cc index 4fe01dfeb8..5e1e6da9dc 100755 --- a/fastdeploy/vision/detection/contrib/yolov5/postprocessor.cc +++ b/fastdeploy/vision/detection/contrib/yolov5/postprocessor.cc @@ -88,7 +88,7 @@ bool YOLOv5Postprocessor::Run(const std::vector& tensors, std::vector< } if ((*results)[bs].boxes.size() == 0) { - return true; + continue; } utils::NMS(&((*results)[bs]), nms_threshold_); diff --git a/fastdeploy/vision/detection/contrib/yolov5seg/postprocessor.cc b/fastdeploy/vision/detection/contrib/yolov5seg/postprocessor.cc index 50bcaba5c0..535f77cd32 100755 --- a/fastdeploy/vision/detection/contrib/yolov5seg/postprocessor.cc +++ b/fastdeploy/vision/detection/contrib/yolov5seg/postprocessor.cc @@ -105,7 +105,7 @@ bool YOLOv5SegPostprocessor::Run( } if ((*results)[bs].boxes.size() == 0) { - return true; + continue; } // get box index after nms std::vector index; diff --git a/fastdeploy/vision/detection/contrib/yolov7/postprocessor.cc b/fastdeploy/vision/detection/contrib/yolov7/postprocessor.cc index 01d657adb3..f5d6b41740 100755 --- a/fastdeploy/vision/detection/contrib/yolov7/postprocessor.cc +++ b/fastdeploy/vision/detection/contrib/yolov7/postprocessor.cc @@ -61,7 +61,7 @@ bool YOLOv7Postprocessor::Run(const std::vector& tensors, std::vector< } if ((*results)[bs].boxes.size() == 0) { - return true; + continue; } utils::NMS(&((*results)[bs]), nms_threshold_); diff --git a/fastdeploy/vision/detection/contrib/yolov8/postprocessor.cc b/fastdeploy/vision/detection/contrib/yolov8/postprocessor.cc index 77974cdd68..550271c40e 100755 --- a/fastdeploy/vision/detection/contrib/yolov8/postprocessor.cc +++ b/fastdeploy/vision/detection/contrib/yolov8/postprocessor.cc @@ -93,7 +93,7 @@ bool YOLOv8Postprocessor::Run( } if ((*results)[bs].boxes.size() == 0) { - return true; + continue; } utils::NMS(&((*results)[bs]), nms_threshold_); diff --git a/fastdeploy/vision/facedet/contrib/centerface/postprocessor.cc b/fastdeploy/vision/facedet/contrib/centerface/postprocessor.cc index 98931956b6..17aad8eba5 100644 --- a/fastdeploy/vision/facedet/contrib/centerface/postprocessor.cc +++ b/fastdeploy/vision/facedet/contrib/centerface/postprocessor.cc @@ -114,7 +114,7 @@ bool CenterFacePostprocessor::Run(const std::vector& infer_result, } if ((*results)[bs].boxes.size() == 0) { - return true; + continue; } utils::NMS(&((*results)[bs]), nms_threshold_); diff --git a/fastdeploy/vision/facedet/contrib/yolov7face/postprocessor.cc b/fastdeploy/vision/facedet/contrib/yolov7face/postprocessor.cc index 624aa3403c..9f023faa09 100644 --- a/fastdeploy/vision/facedet/contrib/yolov7face/postprocessor.cc +++ b/fastdeploy/vision/facedet/contrib/yolov7face/postprocessor.cc @@ -75,7 +75,7 @@ bool Yolov7FacePostprocessor::Run(const std::vector& infer_result, } if ((*results)[bs].boxes.size() == 0) { - return true; + continue; } utils::NMS(&((*results)[bs]), nms_threshold_); From d197f7d7d4a4249088529943cc1e28b97aaddd84 Mon Sep 17 00:00:00 2001 From: heliqi <1101791222@qq.com> Date: Fri, 1 Mar 2024 11:02:28 +0800 Subject: [PATCH 3/4] update serving images (#2387) Co-authored-by: root --- serving/README.md | 4 ++-- serving/README_CN.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/serving/README.md b/serving/README.md index 329a5ba303..3e26df5f41 100644 --- a/serving/README.md +++ b/serving/README.md @@ -22,7 +22,7 @@ FastDeploy builds an end-to-end serving deployment based on [Triton Inference Se CPU images only support Paddle/ONNX models for serving deployment on CPUs, and supported inference backends include OpenVINO, Paddle Inference, and ONNX Runtime ```shell -docker pull registry.baidubce.com/paddlepaddle/fastdeploy:1.0.4-cpu-only-21.10 +docker pull registry.baidubce.com/paddlepaddle/fastdeploy:1.0.7-cpu-only-21.10 ``` #### GPU Image @@ -30,7 +30,7 @@ docker pull registry.baidubce.com/paddlepaddle/fastdeploy:1.0.4-cpu-only-21.10 GPU images support Paddle/ONNX models for serving deployment on GPU and CPU, and supported inference backends including OpenVINO, TensorRT, Paddle Inference, and ONNX Runtime ``` -docker pull registry.baidubce.com/paddlepaddle/fastdeploy:1.0.4-gpu-cuda11.4-trt8.5-21.10 +docker pull registry.baidubce.com/paddlepaddle/fastdeploy:1.0.7-gpu-cuda11.4-trt8.5-21.10 ``` Users can also compile the image by themselves according to their own needs, referring to the following documents: diff --git a/serving/README_CN.md b/serving/README_CN.md index 2a7f2c39c5..9575880d8d 100644 --- a/serving/README_CN.md +++ b/serving/README_CN.md @@ -18,13 +18,13 @@ FastDeploy基于[Triton Inference Server](https://github.com/triton-inference-se #### CPU镜像 CPU镜像仅支持Paddle/ONNX模型在CPU上进行服务化部署,支持的推理后端包括OpenVINO、Paddle Inference和ONNX Runtime ``` shell -docker pull registry.baidubce.com/paddlepaddle/fastdeploy:1.0.4-cpu-only-21.10 +docker pull registry.baidubce.com/paddlepaddle/fastdeploy:1.0.7-cpu-only-21.10 ``` #### GPU镜像 GPU镜像支持Paddle/ONNX模型在GPU/CPU上进行服务化部署,支持的推理后端包括OpenVINO、TensorRT、Paddle Inference和ONNX Runtime ``` -docker pull registry.baidubce.com/paddlepaddle/fastdeploy:1.0.4-gpu-cuda11.4-trt8.5-21.10 +docker pull registry.baidubce.com/paddlepaddle/fastdeploy:1.0.7-gpu-cuda11.4-trt8.5-21.10 ``` 用户也可根据自身需求,参考如下文档自行编译镜像 From cc8d1f3c9f31ea4919972f14ee3eaaa9a09966e2 Mon Sep 17 00:00:00 2001 From: ChaoII <849453582@qq.com> Date: Tue, 5 Mar 2024 13:37:20 +0800 Subject: [PATCH 4/4] [BUG FIX] add export declaration of GaussianRandom function (#2379) * Update fd_type.cc [bug fix]add define for destroy TwoDimArrayCstr for c_api * [BUG FIX] add export declaration of GaussianRandom function --- c_api/fastdeploy_capi/core/fd_type.cc | 2 ++ fastdeploy/function/gaussian_random.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/c_api/fastdeploy_capi/core/fd_type.cc b/c_api/fastdeploy_capi/core/fd_type.cc index c3a742778b..252fe22569 100644 --- a/c_api/fastdeploy_capi/core/fd_type.cc +++ b/c_api/fastdeploy_capi/core/fd_type.cc @@ -38,6 +38,8 @@ DECLARE_AND_IMPLEMENT_FD_TYPE_ONEDIMARRAY(OneDimArrayFloat) DECLARE_AND_IMPLEMENT_FD_TYPE_ONEDIMARRAY(Cstr) // FD_C_OneDimArrayCstr DECLARE_AND_IMPLEMENT_FD_TYPE_TWODIMARRAY(OneDimArrayCstr, Cstr) +// FD_C_TwoDimArrayCstr +DECLARE_AND_IMPLEMENT_FD_TYPE_THREEDIMARRAY(TwoDimArrayCstr,OneDimArrayCstr) // FD_C_TwoDimArraySize DECLARE_AND_IMPLEMENT_FD_TYPE_TWODIMARRAY(TwoDimArraySize, OneDimArraySize) // FD_C_TwoDimArrayInt8 diff --git a/fastdeploy/function/gaussian_random.h b/fastdeploy/function/gaussian_random.h index 85a4ff8a63..98fdc753df 100644 --- a/fastdeploy/function/gaussian_random.h +++ b/fastdeploy/function/gaussian_random.h @@ -28,7 +28,7 @@ namespace function { @param seed The seed of random generator. @param dtype The data type of the output Tensor. */ -void GaussianRandom(const std::vector& shape, FDTensor* out, +FASTDEPLOY_DECL void GaussianRandom(const std::vector& shape, FDTensor* out, FDDataType dtype = FDDataType::FP32, float mean = 0.0f, float std = 1.0f, int seed = 0);