OpenPose  1.0.0rc2
OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
poseExtractorCaffe.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_POSE_POSE_EXTRACTOR_CAFFE_HPP
2 #define OPENPOSE_POSE_POSE_EXTRACTOR_CAFFE_HPP
3 
7 
8 namespace op
9 {
11  {
12  public:
13  PoseExtractorCaffe(const PoseModel poseModel, const std::string& modelFolder, const int gpuId,
14  const std::vector<HeatMapType>& heatMapTypes = {},
15  const ScaleMode heatMapScale = ScaleMode::ZeroToOne,
16  const bool addPartCandidates = false,
17  const bool maximizePositives = false,
18  const bool enableGoogleLogging = true);
19 
20  virtual ~PoseExtractorCaffe();
21 
22  void netInitializationOnThread();
23 
24  void forwardPass(const std::vector<Array<float>>& inputNetData, const Point<int>& inputDataSize,
25  const std::vector<double>& scaleInputToNetInputs = {1.f});
26 
27  const float* getCandidatesCpuConstPtr() const;
28 
29  const float* getCandidatesGpuConstPtr() const;
30 
31  const float* getHeatMapCpuConstPtr() const;
32 
33  const float* getHeatMapGpuConstPtr() const;
34 
35  std::vector<int> getHeatMapSize() const;
36 
37  const float* getPoseGpuConstPtr() const;
38 
39  private:
40  // PIMPL idiom
41  // http://www.cppsamples.com/common-tasks/pimpl.html
42  struct ImplPoseExtractorCaffe;
43  std::unique_ptr<ImplPoseExtractorCaffe> upImpl;
44 
45  // PIMP requires DELETE_COPY & destructor, or extra code
46  // http://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero.html
48  };
49 }
50 
51 #endif // OPENPOSE_POSE_POSE_EXTRACTOR_CAFFE_HPP
#define DELETE_COPY(className)
Definition: macros.hpp:34
PoseModel
Definition: enumClasses.hpp:9
Definition: poseExtractorCaffe.hpp:10
ScaleMode
Definition: enumClasses.hpp:6
std::vector< T, Alloc > vector
Definition: cl2.hpp:567
#define OP_API
Definition: macros.hpp:19
Definition: poseExtractorNet.hpp:11
std::string string
Definition: cl2.hpp:574