FastDeploy  latest
Fast & Easy to Deploy!
pipeline.h
1 // Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 #include "fastdeploy/fastdeploy_model.h"
18 #include "fastdeploy/vision/common/result.h"
19 #include "fastdeploy/vision/detection/ppdet/model.h"
20 #include "fastdeploy/vision/keypointdet/pptinypose/pptinypose.h"
21 
22 namespace fastdeploy {
26 namespace pipeline {
27 
30 class FASTDEPLOY_DECL PPTinyPose {
31  public:
37  PPTinyPose(
38  fastdeploy::vision::detection::PicoDet* det_model,
40 
47  virtual bool Predict(cv::Mat* img,
49 
50  /* \brief The score threshold for detectin model to filter bbox before inputting pptinypose model
51  */
52  float detection_model_score_threshold = 0;
53 
54  protected:
55  fastdeploy::vision::detection::PicoDet* detector_ = nullptr;
57  nullptr;
58 
59  virtual bool Detect(cv::Mat* img,
61  virtual bool KeypointDetect(
62  cv::Mat* img, fastdeploy::vision::KeyPointDetectionResult* result,
63  fastdeploy::vision::DetectionResult& detection_result);
64 };
65 
66 } // namespace pipeline
67 } // namespace fastdeploy
Detection result structure for all the object detection models and instance segmentation models...
Definition: result.h:106
PPTinyPose Pipeline object used when to load a detection model + pptinypose model.
Definition: pipeline.h:30
PPTinyPose model object used when to load a PPTinyPose model exported by PaddleDetection.
Definition: pptinypose.h:31
KeyPoint Detection result structure for all the keypoint detection models.
Definition: result.h:145
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16