|
20 | 20 | #include "kernel_packages.hpp"
|
21 | 21 | #include "recognizer.hpp"
|
22 | 22 |
|
23 |
| -#include <inference_engine.hpp> |
24 |
| - |
25 | 23 | namespace nets {
|
26 | 24 | G_API_NET(FaceDetector, <cv::GMat(cv::GMat)>, "face-detector");
|
27 | 25 | G_API_NET(LandmarksDetector, <cv::GMat(cv::GMat)>, "landmarks-detector");
|
@@ -217,10 +215,10 @@ void configNets(const NetsFlagsPack& flags, cv::gapi::GNetPackage& networks, cv:
|
217 | 215 | // clang-format on
|
218 | 216 |
|
219 | 217 | networks += cv::gapi::networks(action_net);
|
220 |
| - InferenceEngine::Core core; |
221 |
| - const auto layerData = core.ReadNetwork(flags.m_act).getInputsInfo().begin()->second; |
222 |
| - auto layerDims = layerData->getTensorDesc().getDims(); |
223 |
| - act_net_in_size = {int(layerDims[3]), int(layerDims[2])}; |
| 218 | + ov::Core core; |
| 219 | + const ov::Output<ov::Node>& input = core.read_model(flags.m_act)->input(); |
| 220 | + const ov::Shape& in_shape = input.get_shape(); |
| 221 | + act_net_in_size = {int(in_shape[2]), int(in_shape[1])}; |
224 | 222 | slog::info << "The Person/Action Detection model " << flags.m_act << " is loaded to " << flags.d_act
|
225 | 223 | << " device." << slog::endl;
|
226 | 224 | } else {
|
@@ -271,13 +269,13 @@ void configNets(const NetsFlagsPack& flags, cv::gapi::GNetPackage& networks, cv:
|
271 | 269 | } else {
|
272 | 270 | slog::info << "Face Re-Identification DISABLED." << slog::endl;
|
273 | 271 | }
|
274 |
| - InferenceEngine::Core core; |
275 |
| - const auto layerData = core.ReadNetwork(flags.m_reid).getInputsInfo().begin()->second; |
276 |
| - const auto layerDims = layerData->getTensorDesc().getDims(); |
277 |
| - reid_net_in_size = {static_cast<double>(layerDims[0]), |
278 |
| - static_cast<double>(layerDims[1]), |
279 |
| - static_cast<double>(layerDims[2]), |
280 |
| - static_cast<double>(layerDims[3])}; |
| 272 | + ov::Core core; |
| 273 | + const ov::Output<ov::Node>& input = core.read_model(flags.m_reid)->input(); |
| 274 | + const ov::Shape& in_shape = input.get_shape(); |
| 275 | + reid_net_in_size = {static_cast<double>(in_shape[0]), |
| 276 | + static_cast<double>(in_shape[1]), |
| 277 | + static_cast<double>(in_shape[2]), |
| 278 | + static_cast<double>(in_shape[3])}; |
281 | 279 | }
|
282 | 280 | }
|
283 | 281 | } // namespace config
|
|
0 commit comments