OpenPose 1.0.0rc2 OpenPose: A Real-Time Multi-Person Key-Point Detection And Multi-Threading C++ Library

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
netCaffe.hpp
Go to the documentation of this file.
1 #ifndef OPENPOSE_NET_NET_CAFFE_HPP
2 #define OPENPOSE_NET_NET_CAFFE_HPP
3
4 #include <openpose/core/common.hpp>
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
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
31 DELETE_COPY(NetCaffe);
32 };
33 }
34
35 #endif // OPENPOSE_NET_NET_CAFFE_HPP
DELETE_COPY
#define DELETE_COPY(className)
Definition: macros.hpp:34
op::NetCaffe
Definition: netCaffe.hpp:9
net.hpp
boost::shared_ptr
Definition: macros.hpp:85
common.hpp
op::Net
Definition: net.hpp:8
op::Array< float >
OP_API
#define OP_API
Definition: macros.hpp:19
cl::string
std::string string
Definition: cl2.hpp:574