Skip to content

Commit

Permalink
[Doc] Update vision_result doc (PaddlePaddle#494)
Browse files Browse the repository at this point in the history
* add paddle_trt in benchmark

* update benchmark in device

* update benchmark

* update result doc
  • Loading branch information
wjj19950828 authored Nov 4, 2022
1 parent 9fa612c commit 40d2f39
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/api_docs/python/vision_results_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ API:`fastdeploy.vision.SegmentationResult`, 该结果返回:
- **score_map**(list of float): 成员变量,与label_map一一对应的所预测的分割类别概率值(当导出模型时指定`--output_op argmax`)或者经过softmax归一化化后的概率值(当导出模型时指定`--output_op softmax`或者导出模型时指定`--output_op none`同时模型初始化的时候设置模型类成员属性`apply_softmax=true`).
- **shape**(list of int): 成员变量,表示输出图片的尺寸,为`H*W`.


## DetectionResult
DetectionResult代码定义在`fastdeploy/vision/common/result.h`中,用于表明图像检测出来的目标框、目标类别和目标置信度.

Expand All @@ -40,6 +41,7 @@ API:`fastdeploy.vision.FaceDetectionResult` , 该结果返回:
- **landmarks**(list of list(float)): 成员变量,表示单张图片检测出来的所有人脸的关键点.
- **landmarks_per_face**(int): 成员变量,表示每个人脸框中的关键点的数量.


## KeyPointDetectionResult
KeyPointDetectionResult 代码定义在`fastdeploy/vision/common/result.h`中,用于表明图像中目标行为的各个关键点坐标和置信度。

Expand Down Expand Up @@ -70,6 +72,7 @@ API:`fastdeploy.vision.MattingResult`, 该结果返回:
- **contain_foreground**(bool): 表示预测的结果是否包含前景.
- **shape**(list of int): 表示输出结果的shape,当`contain_foreground``false`,shape只包含`(H,W)`,当`contain_foreground``true`,shape包含`(H,W,C)`, C一般为3.


## OCRResult
OCRResult代码定义在`fastdeploy/vision/common/result.h`中,用于表明图像检测和识别出来的文本框,文本框方向分类,以及文本框内的文本内容.

Expand All @@ -79,3 +82,17 @@ API:`fastdeploy.vision.OCRResult`, 该结果返回:
- **rec_scores**(list of float): 成员变量,表示文本框内识别出来的文本的置信度,其元素个数与`boxes.size()`一致.
- **cls_scores**(list of float): 成员变量,表示文本框的分类结果的置信度,其元素个数与`boxes.size()`一致.
- **cls_labels**(list of int): 成员变量,表示文本框的方向分类类别,其元素个数与`boxes.size()`一致.


## FaceAlignmentResult
FaceAlignmentResult 代码定义在`fastdeploy/vision/common/result.h`中,用于表明人脸landmarks。

API:`fastdeploy.vision.FaceAlignmentResult`, 该结果返回:
- **landmarks**(list of list(float)): 成员变量,表示单张人脸图片检测出来的所有关键点


## HeadPoseResult
HeadPoseResult 代码定义在`fastdeploy/vision/common/result.h`中,用于表明头部姿态结果。

API:`fastdeploy.vision.HeadPoseResult`, 该结果返回:
- **euler_angles**(list of float): 成员变量,表示单张人脸图片预测的欧拉角,存放的顺序是(yaw, pitch, roll), yaw 代表水平转角,pitch 代表垂直角,roll 代表翻滚角,值域都为 [-90, +90]
20 changes: 20 additions & 0 deletions docs/api_docs/python/vision_results_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ API: `fastdeploy.vision.ClassifyResult`, The ClassifyResult will return:

- **scores**(list of float):Member variables that indicate the confidence level of a single image on the corresponding classification result, the number of which is determined by the `topk` passed in when using the classification model, e.g. the confidence level of a Top 5 classification can be returned.


## SegmentationResult
The code of SegmentationResult is defined in `fastdeploy/vision/common/result.h` and is used to indicate the segmentation category predicted for each pixel in the image and the probability of the segmentation category.

Expand All @@ -33,6 +34,7 @@ API: `fastdeploy.vision.Mask`, The Mask will return:
- **data**:Member variable indicating a detected mask.
- **shape**:Member variable representing the shape of the mask, e.g. `(H,W)`.


## FaceDetectionResult
The FaceDetectionResult code is defined in `fastdeploy/vision/common/result.h` and is used to indicate the target frames detected by face detection, face landmarks, target confidence and the number of landmarks per face.

Expand All @@ -42,6 +44,7 @@ API: `fastdeploy.vision.FaceDetectionResult`, The FaceDetectionResult will retur
- **landmarks**(list of list(float)): Member variables that represent the key points of all faces detected by a single image.
- **landmarks_per_face**(int):Member variable indicating the number of key points in each face frame.


## KeyPointDetectionResult
The KeyPointDetectionResult code is defined in `fastdeploy/vision/common/result.h` and is used to indicate the coordinates and confidence of each keypoint of the target behavior in the image.

Expand All @@ -55,12 +58,14 @@ API:`fastdeploy.vision.KeyPointDetectionResult`, The KeyPointDetectionResult wil
- `J`: num_joints(number of keypoints for a target)
- **num_joints**(int): Member variable, representing the number of keypoints for a target


## FaceRecognitionResult
The FaceRecognitionResult code is defined in `fastdeploy/vision/common/result.h` and is used to indicate the embedding of the image features by the face recognition model.

API: `fastdeploy.vision.FaceRecognitionResult`, The FaceRecognitionResult will return:
- **landmarks_per_face**(list of float):Member variables, which indicate the final extracted features embedding of the face recognition model, can be used to calculate the feature similarity between faces.


## MattingResult
The MattingResult code is defined in `fastdeploy/vision/common/result.h` and is used to indicate the value of alpha transparency predicted by the model, the predicted outlook, etc.

Expand All @@ -70,6 +75,7 @@ API:`fastdeploy.vision.MattingResult`, The MattingResult will return:
- **contain_foreground**(bool):Indicates whether the predicted outcome includes the foreground.
- **shape**(list of int): When `contain_foreground` is false, the shape only contains `(H,W)`, when `contain_foreground` is `true,` the shape contains `(H,W,C)`, C is generally 3.


## OCRResult
The OCRResult code is defined in `fastdeploy/vision/common/result.h` and is used to indicate the text box detected in the image, the text box orientation classification, and the text content recognized inside the text box.

Expand All @@ -79,3 +85,17 @@ API:`fastdeploy.vision.OCRResult`, The OCRResult will return:
- **rec_scores**(list of float):Member variable indicating the confidence level of the text identified in the box, the number of elements is the same as `boxes.size()`.
- **cls_scores**(list of float):Member variable indicating the confidence level of the classification result of the text box, with the same number of elements as `boxes.size()`.
- **cls_labels**(list of int):Member variable indicating the orientation category of the text box, the number of elements is the same as `boxes.size()`.


## FaceAlignmentResult
The code of FaceAlignmentResult is defined in `fastdeploy/vision/common/result.h` and is used to indicate the key points of the face.

API: `fastdeploy.vision.FaceAlignmentResult`, The FaceAlignmentResult will return:
- **landmarks**(list of list(float)):Member variables that represent the all key points detected from a single face image.


## HeadPoseResult
The code of HeadPoseResult is defined in `fastdeploy/vision/common/result.h` and is used to indicate the head pose result.

API: `fastdeploy.vision.HeadPoseResult`, The HeadPoseResult will return:
- **euler_angles**(list of float):Member variables that represent the Euler angle predicted by a single face image. The storage order is (yaw, pitch, roll), yaw represents the horizontal angle, pitch represents the vertical angle, roll represents the roll angle, and the value range is [-90, +90] Spend.

0 comments on commit 40d2f39

Please sign in to comment.