OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
netCaffe.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_NET_NET_CAFFE_HPP
2 #define OPENPOSE_NET_NET_CAFFE_HPP
3 
5 #include <openpose/net/net.hpp>
6 
7 namespace op
8 {
9  class OP_API NetCaffe : public Net
10  {
11  public:
12  NetCaffe(const std::string& caffeProto, const std::string& caffeTrainedModel, const int gpuId = 0,
13  const bool enableGoogleLogging = true, const std::string& lastBlobName = "net_output");
14 
15  virtual ~NetCaffe();
16 
18 
19  void forwardPass(const Array<float>& inputNetData) const;
20 
21  std::shared_ptr<ArrayCpuGpu<float>> getOutputBlobArray() const;
22 
23  private:
24  // PIMPL idiom
25  // http://www.cppsamples.com/common-tasks/pimpl.html
26  struct ImplNetCaffe;
27  std::unique_ptr<ImplNetCaffe> upImpl;
28 
29  // PIMP requires DELETE_COPY & destructor, or extra code
30  // http://oliora.github.io/2015/12/29/pimpl-and-rule-of-zero.html
32  };
33 }
34 
35 #endif // OPENPOSE_NET_NET_CAFFE_HPP
void initializationOnThread()
std::shared_ptr< ArrayCpuGpu< float > > getOutputBlobArray() const
void forwardPass(const Array< float > &inputNetData) const
virtual ~NetCaffe()
NetCaffe(const std::string &caffeProto, const std::string &caffeTrainedModel, const int gpuId=0, const bool enableGoogleLogging=true, const std::string &lastBlobName="net_output")
Definition: net.hpp:9
#define OP_API
Definition: macros.hpp:18
#define DELETE_COPY(className)
Definition: macros.hpp:32