File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
demos/interactive_face_detection_demo/cpp Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ FaceDetection::FaceDetection(const std::string &pathToModel,
30
30
void FaceDetection::submitRequest (const cv::Mat& frame) {
31
31
width = static_cast <float >(frame.cols );
32
32
height = static_cast <float >(frame.rows );
33
- request.set_input_tensor ( wrapMat2Tensor (frame ));
33
+ resize2tensor (frame, request.get_input_tensor ( ));
34
34
request.start_async ();
35
35
}
36
36
@@ -78,11 +78,8 @@ std::shared_ptr<ov::Model> FaceDetection::read(const ov::Core& core) {
78
78
ov::preprocess::PrePostProcessor ppp (model);
79
79
ppp.input ().tensor ().
80
80
set_element_type (ov::element::u8 ).
81
- set_layout (" NHWC" ).
82
- set_spatial_dynamic_shape ();
83
- ppp.input ().preprocess ().
84
- resize (ov::preprocess::ResizeAlgorithm::RESIZE_LINEAR).
85
- convert_layout (" NCHW" );
81
+ set_layout (" NHWC" );
82
+ ppp.input ().preprocess ().convert_layout (" NCHW" );
86
83
ppp.output (output).tensor ().set_element_type (ov::element::f32 );
87
84
model = ppp.build ();
88
85
ov::set_batch (model, 1 );
You can’t perform that action at this time.
0 commit comments