@@ -203,7 +203,10 @@ void AntispoofingClassifier::enqueue(const cv::Mat& face) {
203203 if (!enabled ()) {
204204 return ;
205205 }
206- resize2tensor (face, ov::Tensor{inTensor, {enquedFaces, 0 , 0 , 0 }, {enquedFaces + 1 , inShape[1 ], inShape[2 ], inShape[3 ]}});
206+ ov::Tensor t{inTensor,
207+ {enquedFaces, 0 , 0 , 0 },
208+ {enquedFaces + 1 , inShape[1 ], inShape[2 ], inShape[3 ]}};
209+ resize2tensor (face, t);
207210 enquedFaces++;
208211}
209212
@@ -253,7 +256,8 @@ void AgeGenderDetection::enqueue(const cv::Mat &face) {
253256 if (!enabled ()) {
254257 return ;
255258 }
256- resize2tensor (face, ov::Tensor{inTensor, {enquedFaces, 0 , 0 , 0 }, {enquedFaces + 1 , inShape[1 ], inShape[2 ], inShape[3 ]}});
259+ ov::Tensor t{inTensor, {enquedFaces, 0 , 0 , 0 }, {enquedFaces + 1 , inShape[1 ], inShape[2 ], inShape[3 ]}};
260+ resize2tensor (face, t);
257261 enquedFaces++;
258262}
259263
@@ -309,7 +313,8 @@ void HeadPoseDetection::enqueue(const cv::Mat &face) {
309313 if (!enabled ()) {
310314 return ;
311315 }
312- resize2tensor (face, ov::Tensor{inTensor, {enquedFaces, 0 , 0 , 0 }, {enquedFaces + 1 , inShape[1 ], inShape[2 ], inShape[3 ]}});
316+ ov::Tensor t{inTensor, {enquedFaces, 0 , 0 , 0 }, {enquedFaces + 1 , inShape[1 ], inShape[2 ], inShape[3 ]}};
317+ resize2tensor (face, t);
313318 enquedFaces++;
314319}
315320
@@ -364,7 +369,8 @@ void EmotionsDetection::enqueue(const cv::Mat &face) {
364369 if (!enabled ()) {
365370 return ;
366371 }
367- resize2tensor (face, ov::Tensor{inTensor, {enquedFaces, 0 , 0 , 0 }, {enquedFaces + 1 , inShape[1 ], inShape[2 ], inShape[3 ]}});
372+ ov::Tensor t{inTensor, {enquedFaces, 0 , 0 , 0 }, {enquedFaces + 1 , inShape[1 ], inShape[2 ], inShape[3 ]}};
373+ resize2tensor (face, t);
368374 enquedFaces++;
369375}
370376
@@ -381,7 +387,7 @@ std::map<std::string, float> EmotionsDetection::operator[](int idx) {
381387 " to used emotions vector size (" +
382388 std::to_string (emotionsVecSize) + " )" );
383389 }
384- float * emotionsValues = tensor.data <float >();
390+ auto emotionsValues = tensor.data <float >();
385391 auto outputIdxPos = emotionsValues + idx * emotionsVecSize;
386392 std::map<std::string, float > emotions;
387393
@@ -440,7 +446,8 @@ void FacialLandmarksDetection::enqueue(const cv::Mat &face) {
440446 if (!enabled ()) {
441447 return ;
442448 }
443- resize2tensor (face, ov::Tensor{inTensor, {enquedFaces, 0 , 0 , 0 }, {enquedFaces + 1 , inShape[1 ], inShape[2 ], inShape[3 ]}});
449+ ov::Tensor t{inTensor, {enquedFaces, 0 , 0 , 0 }, {enquedFaces + 1 , inShape[1 ], inShape[2 ], inShape[3 ]}};
450+ resize2tensor (face, t);
444451 enquedFaces++;
445452}
446453
0 commit comments