OpenPose  1.0.0rc2
OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library
 All Classes Namespaces Files Functions Variables Enumerations Enumerator 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 enableGoogleLogging = true);
18 
19  virtual ~PoseExtractorCaffe();
20 
21  void netInitializationOnThread();
22 
23  void forwardPass(const std::vector<Array<float>>& inputNetData, const Point<int>& inputDataSize,
24  const std::vector<double>& scaleInputToNetInputs = {1.f});
25 
26  const float* getCandidatesCpuConstPtr() const;
27 
28  const float* getCandidatesGpuConstPtr() const;
29 
30  const float* getHeatMapCpuConstPtr() const;
31 
32  const float* getHeatMapGpuConstPtr() const;
33 
34  std::vector<int> getHeatMapSize() const;
35 
36  const float* getPoseGpuConstPtr() const;
37 
38  private:
39  // PIMPL idiom
40  // http://www.cppsamples.com/common-tasks/pimpl.html
41  struct ImplPoseExtractorCaffe;
42  std::unique_ptr<ImplPoseExtractorCaffe> upImpl;
43 
44  // PIMP requires DELETE_COPY & destructor, or extra code
45  // http://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero.html
47  };
48 }
49 
50 #endif // OPENPOSE_POSE_POSE_EXTRACTOR_CAFFE_HPP
#define DELETE_COPY(className)
Definition: macros.hpp:24
Definition: poseExtractor.hpp:12
PoseModel
Definition: enumClasses.hpp:9
Definition: poseExtractorCaffe.hpp:10
ScaleMode
Definition: enumClasses.hpp:6
#define OP_API
Definition: macros.hpp:9