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.
17 #ifndef __FACE_RECOGNITION_TYPE_H__
18 #define __FACE_RECOGNITION_TYPE_H__
23 * @brief Defines #MV_FACENET_MODEL_FILE_PATH
24 * to set the backbone model file path.
25 * @details This model file is used to extract the feature vectors from a given face image data.
27 #define MV_FACENET_MODEL_FILE_PATH "FACENET_MODEL_FILE_PATH"
30 * @brief Defines #MV_FACENET_MODEL_META_FILE_PATH
31 * to set the backbone model meta file path.
32 * @details This model meta file is used to provide input and output tensor info of a given model file.
34 #define MV_FACENET_MODEL_META_FILE_PATH "FACENET_MODEL_META_FILE_PATH"
36 #define MV_FACENET_OUTPUT_TENSOR_NAME "FACENET_OUTPUT_TENSOR_NAME"
39 * @brief Defines #MV_FACE_RECOGNITION_DEFAULT_PATH
40 * to set the path where the training relevant files are created.
41 * @details This path is used as a default location where the trained model, label and feature vector files are created.
43 #define MV_FACE_RECOGNITION_DEFAULT_PATH "FACE_RECOGNITION_DEFAULT_PATH"
45 #define MV_FACENET_BACKEND_TYPE "FACENET_MODEL_BACKEND_TYPE"
47 #define MV_FACENET_TARGET_DEVICE_TYPE "FACENET_MODEL_TARGET_DEVICE_TYPE"
49 #define FACE_RECOGNITION_META_FILE_NAME "face_recognition.json"
52 * @brief Defines #MV_FACE_RECOGNITION_DECISION_THRESHOLD
53 * to set the decision threshold file+.
54 * @details This file is used to determine face recognition result with a given face image data is true or false.
56 #define MV_FACE_RECOGNITION_DECISION_THRESHOLD "FACE_RECOGNITION_DECISION_THRESHOLD"
59 * @brief Defines #MV_FACE_RECOGNITION_INPUT_TENSOR_SHAPE
60 * to set input tensor shape.
61 * @details This file is used to describe input tensor shape.
63 #define MV_FACE_RECOGNITION_INPUT_TENSOR_SHAPE "FACE_RECOGNITION_INPUT_TENSOR_SHAPE"
65 struct facenet_input_s {
66 std::vector<mv_source_h> inputs;
69 struct facenet_output_s {
70 std::vector<std::vector<float> > outputs;