atenpas / gpd

Detect 6-DOF grasp poses in point clouds
BSD 2-Clause "Simplified" License
606 stars 233 forks source link

Enable OpenVINO option for GPD #48

Closed sharronliu closed 5 years ago

sharronliu commented 6 years ago

GPD is providing awesome features for grasp planning. I've spent some efforts to enable this algorithm with OpenVINO technology as an option. https://software.intel.com/en-us/openvino-toolkit

Initial version of my patches shared https://github.com/atenpas/gpd/pull/47

atenpas commented 6 years ago

Awesome! Thank you for contributing! In particular, I appreciate that you wrote a tutorial. I'll try it out when I get a chance.

sharronliu commented 6 years ago

Tutorial provides important info. Later on I'll add a few lines to explain how to verify OpenVINO installation by running samples at different target devices (CPU, GPU, VPU, etc.). Feel free to let me know if any specific info could be added to the tutorial.

sharronliu commented 6 years ago

Another thing is about the classifier. Now there're two classifiers derived from the base classifier: Caffe and OpenVINO. It could be possible to derive other classifiers, like for example, the non-caffe classifier in the "forward" branch that mentioned in your tutorial.

atenpas commented 6 years ago

Thanks for the explanations. I'm trying to change the CMakeLists file such that Caffe does not need to be installed.

sharronliu commented 5 years ago

Closing the issue. Thanks!

arsalan-mousavian commented 4 years ago

I am trying to run inference on a model that I trained. I am stuck in the last step of training that uses openvino to convert the ONNX file to OpenVINO compatible file. However, I am getting build error when trying to do build gpd with openvino option. I am guessing there's a version issue. I was wondering which openvino is compatible with gpd code.

   static std::map<Classifier::Device, InferenceEngine::TargetDevice>
                                                        ^~~~~~~~~~~~
/home/arsalan/codes/gpd/build/gpd/net/openvino_classifier.h:87:56: error: ‘TargetDevice’ is not a member of ‘InferenceEngine’
/home/arsalan/codes/gpd/build/gpd/net/openvino_classifier.h:87:68: error: template argument 2 is invalid
   static std::map<Classifier::Device, InferenceEngine::TargetDevice>
                                                                    ^
/home/arsalan/codes/gpd/build/gpd/net/openvino_classifier.h:87:68: error: template argument 4 is invalid
/home/arsalan/codes/gpd/build/gpd/net/openvino_classifier.h:93:36: warning: ‘InferencePlugin’ is deprecated: Use InferenceEngine::Core instead. Will be removed in 2021.1 [-Wdeprecated-declarations]
   InferenceEngine::InferencePlugin plugin_;
                                    ^~~~~~~
In file included from /opt/intel/openvino_2020.4.287/deployment_tools/inference_engine/include/inference_engine.hpp:16:0,
                 from /home/arsalan/codes/gpd/build/gpd/net/openvino_classifier.h:40,
                 from /home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:1:
/opt/intel/openvino_2020.4.287/deployment_tools/inference_engine/include/cpp/ie_plugin_cpp.hpp:30:99: note: declared here
 class INFERENCE_ENGINE_DEPRECATED("Use InferenceEngine::Core instead. Will be removed in 2021.1") InferencePlugin {
                                                                                                   ^~~~~~~~~~~~~~~
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:8:47: error: ‘TargetDevice’ is not a member of ‘InferenceEngine’
 std::map<Classifier::Device, InferenceEngine::TargetDevice>
                                               ^~~~~~~~~~~~
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:8:47: error: ‘TargetDevice’ is not a member of ‘InferenceEngine’
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:8:59: error: template argument 2 is invalid
 std::map<Classifier::Device, InferenceEngine::TargetDevice>
                                                           ^
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:8:59: error: template argument 4 is invalid
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:10:36: error: ‘TargetDevice’ has not been declared
         {Classifier::Device::eCPU, TargetDevice::eCPU},
                                    ^~~~~~~~~~~~
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:11:36: error: ‘TargetDevice’ has not been declared
         {Classifier::Device::eGPU, TargetDevice::eGPU},
                                    ^~~~~~~~~~~~
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:12:36: error: ‘TargetDevice’ has not been declared
         {Classifier::Device::eVPU, TargetDevice::eMYRIAD},
                                    ^~~~~~~~~~~~
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:13:37: error: ‘TargetDevice’ has not been declared
         {Classifier::Device::eFPGA, TargetDevice::eFPGA}};
                                     ^~~~~~~~~~~~
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:9:5: error: scalar object ‘gpd::net::OpenVinoClassifier::device_map_’ requires one element in initializer
     OpenVinoClassifier::device_map_ = {
     ^~~~~~~~~~~~~~~~~~
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp: In constructor ‘gpd::net::OpenVinoClassifier::OpenVinoClassifier(const string&, const string&, gpd::net::Classifier::Device, int)’:
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:19:47: warning: ‘PluginDispatcher’ is deprecated: Use InferenceEngine::Core instead which dispatches plugin automatically.Will be removed in 2021.1 [-Wdeprecated-declarations]
   InferenceEngine::PluginDispatcher dispatcher({"../../../lib/intel64", ""});
                                               ^
In file included from /opt/intel/openvino_2020.4.287/deployment_tools/inference_engine/include/inference_engine.hpp:11:0,
                 from /home/arsalan/codes/gpd/build/gpd/net/openvino_classifier.h:40,
                 from /home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:1:
/opt/intel/openvino_2020.4.287/deployment_tools/inference_engine/include/ie_plugin_dispatcher.hpp:25:64: note: declared here
                                   "Will be removed in 2021.1") INFERENCE_ENGINE_API_CLASS(PluginDispatcher) {
                                                                ^
/home/arsalan/codes/gpd/src/gpd/net/openvino_classifier.cpp:20:40: error: ‘class InferenceEngine::PluginDispatcher’ has no member named ‘getSuitablePlugin’
   plugin_ = InferencePlugin(dispatcher.getSuitablePlugin(device_map_[device]));
yxk-tian commented 3 years ago

I have the same problem when trying to do build gpd with openvino option.Have you solved it?

janneyow commented 2 years ago

I'm facing the same error, has the issue been resolved? Thanks!