422040e488a0e5e803b79cb0210804cc5e8ea7e5
[platform/core/api/mediavision.git] / mv_machine_learning / face_recognition / include / face_recognition_type.h
1 /**
2  * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef __FACE_RECOGNITION_TYPE_H__
18 #define __FACE_RECOGNITION_TYPE_H__
19
20 #include <vector>
21
22 /**
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.
26  */
27 #define MV_FACENET_MODEL_FILE_PATH "FACENET_MODEL_FILE_PATH"
28
29 /**
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.
33  */
34 #define MV_FACENET_MODEL_META_FILE_PATH "FACENET_MODEL_META_FILE_PATH"
35
36 #define MV_FACENET_OUTPUT_TENSOR_NAME "FACENET_OUTPUT_TENSOR_NAME"
37
38 /**
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.
42  */
43 #define MV_FACE_RECOGNITION_DEFAULT_PATH "FACE_RECOGNITION_DEFAULT_PATH"
44
45 #define MV_FACENET_BACKEND_TYPE "FACENET_MODEL_BACKEND_TYPE"
46
47 #define MV_FACENET_TARGET_DEVICE_TYPE "FACENET_MODEL_TARGET_DEVICE_TYPE"
48
49 #define FACE_RECOGNITION_META_FILE_NAME "face_recognition.json"
50
51 /**
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.
55  */
56 #define MV_FACE_RECOGNITION_DECISION_THRESHOLD "FACE_RECOGNITION_DECISION_THRESHOLD"
57
58 /**
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.
62  */
63 #define MV_FACE_RECOGNITION_INPUT_TENSOR_SHAPE "FACE_RECOGNITION_INPUT_TENSOR_SHAPE"
64
65 struct facenet_input_s {
66         std::vector<mv_source_h> inputs;
67 };
68
69 struct facenet_output_s {
70         std::vector<std::vector<float> > outputs;
71 };
72
73 #endif