2 * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 #include <mv_common.h>
21 #include <mv_inference_type.h>
22 #include "mv_private.h"
24 #include "EngineConfig.h"
25 #include "inference_engine_common_impl.h"
26 #include "Inference.h"
27 #include "facenet_parser.h"
28 #include "face_recognition_type.h"
29 #include "Preprocess.h"
33 namespace machine_learning
38 std::unique_ptr<mediavision::inference::Inference> _inference;
39 std::unique_ptr<MediaVision::Common::EngineConfig> _config;
40 std::unique_ptr<MetaParser> _parser;
41 facenet_output_s _result;
42 inference_engine_tensor_buffer *_outputTensorBuffer {};
43 Preprocess _preprocess;
44 std::string _modelFilePath;
45 std::string _modelMetaFilePath;
46 std::string _facenetOutputTensorName;
48 int _targetDeviceType {};
52 virtual ~Facenet() = default;
56 void preprocess(mv_source_h &mv_src);
57 void inference(mv_source_h source);
58 facenet_output_s &result();