15 #include "fastdeploy/fastdeploy_model.h" 16 #include "opencv2/core/core.hpp" 24 enum FASTDEPLOY_DECL ResultType {
40 struct FASTDEPLOY_DECL BaseResult {
41 ResultType type = ResultType::UNKNOWN_RESULT;
52 ResultType type = ResultType::CLASSIFY;
74 struct FASTDEPLOY_DECL
Mask :
public BaseResult {
79 ResultType type = ResultType::MASK;
88 void*
Data() {
return data.data(); }
91 const void*
Data()
const {
return data.data(); }
94 void Reserve(
int size);
110 std::vector<std::array<float, 4>>
boxes;
120 bool contain_masks =
false;
122 ResultType type = ResultType::DETECTION;
135 void Reserve(
int size);
150 std::vector<float> scores;
154 ResultType type = ResultType::KEYPOINT_DETECTION;
161 void Reserve(
int size);
169 struct FASTDEPLOY_DECL OCRResult :
public BaseResult {
170 std::vector<std::array<int, 8>> boxes;
172 std::vector<std::string> text;
173 std::vector<float> rec_scores;
175 std::vector<float> cls_scores;
176 std::vector<int32_t> cls_labels;
178 ResultType type = ResultType::OCR;
190 std::vector<std::array<int, 4>>
boxes;
201 ResultType type = ResultType::MOT;
215 std::vector<std::array<float, 4>>
boxes;
224 ResultType type = ResultType::FACE_DETECTION;
239 void Reserve(
int size);
253 ResultType type = ResultType::FACE_ALIGNMENT;
260 void Reserve(
int size);
283 bool contain_score_map =
false;
290 ResultType type = ResultType::SEGMENTATION;
297 void Reserve(
int size);
312 ResultType type = ResultType::FACE_RECOGNITION;
322 void Reserve(
int size);
347 bool contain_foreground =
false;
349 ResultType type = ResultType::MATTING;
359 void Reserve(
int size);
373 ResultType type = ResultType::HEADPOSE;
380 void Reserve(
int size);
Face recognition result structure for all the Face recognition models.
Definition: result.h:307
std::vector< int > ids
All the tracking object ids.
Definition: result.h:193
std::vector< uint8_t > label_map
label_map stores the pixel-level category labels for input image. the number of pixels is equal to la...
Definition: result.h:275
std::vector< float > scores
The confidence for each classify result.
Definition: result.h:51
std::vector< std::array< float, 2 > > landmarks
All the coordinates of detected landmarks for an input image, and the element of landmarks is a array...
Definition: result.h:251
std::vector< float > scores
The confidence for all the tracking objects.
Definition: result.h:196
std::vector< int32_t > label_ids
The classify label for all the detected objects.
Definition: result.h:115
Segmentation result structure for all the segmentation models.
Definition: result.h:270
std::vector< std::array< float, 2 > > keypoints
All the coordinates of detected keypoints for an input image, the size of keypoints is num_detected_o...
Definition: result.h:148
std::vector< float > score_map
score_map stores the probability of the predicted label for each pixel of input image.
Definition: result.h:279
Face Alignment result structure for all the face alignment models.
Definition: result.h:248
std::vector< std::array< float, 4 > > boxes
All the detected object boxes for an input image, the size of boxes is the number of detected objects...
Definition: result.h:110
std::vector< std::array< float, 2 > > landmarks
If the model detect face with landmarks, every detected object box correspoing to a landmark...
Definition: result.h:219
Processor for Resize images.
Definition: resize.h:29
std::vector< std::array< float, 4 > > boxes
All the detected object boxes for an input image, the size of boxes is the number of detected objects...
Definition: result.h:215
const void * Data() const
Return a pointer of the mask data buffer for read only.
Definition: result.h:91
Detection result structure for all the object detection models and instance segmentation models...
Definition: result.h:106
Classify result structure for all the image classify models.
Definition: result.h:46
std::vector< int64_t > shape
Shape of mask.
Definition: result.h:78
std::vector< float > alpha
alpha is a one-dimensional vector, which is the predicted alpha transparency value. The range of values is [0., 1.], and the length is hxw. h, w are the height and width of the input image
Definition: result.h:335
Matting result structure for all the Matting models.
Definition: result.h:331
std::vector< int64_t > shape
The output shape, means [H, W].
Definition: result.h:281
std::vector< float > scores
Indicates the confidence of all targets detected from a single image, and the number of elements is c...
Definition: result.h:223
Face detection result structure for all the face detection models.
Definition: result.h:212
HeadPose result structure for all the headpose models.
Definition: result.h:368
std::vector< int > class_ids
The classify label id for all the tracking object.
Definition: result.h:199
std::vector< float > scores
The confidence for all the detected objects.
Definition: result.h:113
std::vector< float > foreground
If the model can predict foreground, foreground save the predicted foreground image, the shape is [hight,width,channel] generally.
Definition: result.h:339
std::vector< Mask > masks
For instance segmentation model, masks is the predict mask for all the deteced objects.
Definition: result.h:118
std::vector< float > euler_angles
EulerAngles for an input image, and the element of euler_angles is a vector, contains {yaw...
Definition: result.h:371
std::vector< int64_t > shape
The shape of output result, when contain_foreground == false, shape only contains (h...
Definition: result.h:343
int landmarks_per_face
landmarks_per_face indicates the number of face landmarks for each detected face if the model's outpu...
Definition: result.h:229
std::vector< std::array< int, 4 > > boxes
All the tracking object boxes for an input image, the size of boxes is the number of tracking objects...
Definition: result.h:190
std::vector< uint8_t > data
Mask data buffer.
Definition: result.h:76
KeyPoint Detection result structure for all the keypoint detection models.
Definition: result.h:145
void * Data()
Return a mutable pointer of the mask data buffer.
Definition: result.h:88
std::vector< float > embedding
The feature embedding that represents the final extraction of the face recognition model can be used ...
Definition: result.h:310
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16
MOT(Multi-Object Tracking) result structure for all the MOT models.
Definition: result.h:187
std::vector< int32_t > label_ids
Classify result for an image.
Definition: result.h:49