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
netCaffe.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_CORE_NET_CAFFE_HPP
2 #define OPENPOSE_CORE_NET_CAFFE_HPP
3 
5 #include <openpose/core/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 
17  void initializationOnThread();
18 
19  void forwardPass(const Array<float>& inputNetData) const;
20 
21  boost::shared_ptr<caffe::Blob<float>> getOutputBlob() 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_CORE_NET_CAFFE_HPP
#define DELETE_COPY(className)
Definition: macros.hpp:30
Definition: netCaffe.hpp:9
Definition: macros.hpp:81
Definition: net.hpp:8
#define OP_API
Definition: macros.hpp:15
std::string string
Definition: cl2.hpp:574