mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
[Doc]Add English version of documents in docs/cn and api/vision_results (#931)
* 第一次提交 * 补充一处漏翻译 * deleted: docs/en/quantize.md * Update one translation * Update en version * Update one translation in code * Standardize one writing * Standardize one writing * Update some en version * Fix a grammer problem * Update en version for api/vision result * Merge branch 'develop' of https://github.com/charl-u/FastDeploy into develop * Checkout the link in README in vision_results/ to the en documents * Modify a title * Add link to serving/docs/ * Finish translation of demo.md
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
[English](README_EN.md)| 简体中文
|
||||
# 视觉模型预测结果说明
|
||||
|
||||
FastDeploy根据视觉模型的任务类型,定义了不同的结构体(`fastdeploy/vision/common/result.h`)来表达模型预测结果,具体如下表所示
|
18
docs/api/vision_results/README_EN.md
Normal file
18
docs/api/vision_results/README_EN.md
Normal file
@@ -0,0 +1,18 @@
|
||||
[简体中文](README_CN.md)| English
|
||||
# Prediction Results of the Vision Model
|
||||
|
||||
FastDeploy defines different structures (`fastdeploy/vision/common/result.h`) to express the model prediction results according to the vision model task.
|
||||
|
||||
| Structure | Document | Description | Corresponding Model |
|
||||
|:------------------------|:----------------------------------------------|:------------------|:------------------------|
|
||||
| ClassifyResult | [C++/Python document](./classification_result_EN.md) | Image classification return results | ResNet50, MobileNetV3, etc. |
|
||||
| SegmentationResult | [C++/Python document](./segmentation_result_EN.md) | Image segmentation result | PP-HumanSeg, PP-LiteSeg, etc. |
|
||||
| DetectionResult | [C++/Python document](./detection_result_EN.md) | Target detection result | PP-YOLOE, YOLOv7, etc. |
|
||||
| FaceDetectionResult | [C++/Python document](./face_detection_result_EN.md) | Result of face detection | SCRFD, RetinaFace, etc. |
|
||||
| FaceAlignmentResult | [C++/Python document](./face_alignment_result_EN.md) | Face alignment result(Face keypoint detection) | PFLD model, etc. |
|
||||
| KeyPointDetectionResult | [C++/Python document](./keypointdetection_result_EN.md) | Result of keypoint detection | PP-Tinypose model, etc. |
|
||||
| FaceRecognitionResult | [C++/Python document](./face_recognition_result_EN.md) | Result of face recognition | ArcFace, CosFace, etc. |
|
||||
| MattingResult | [C++/Python document](./matting_result_EN.md) | Image/video keying result | MODNet, RVM, etc. |
|
||||
| OCRResult | [C++/Python document](./ocr_result_EN.md) | Text box detection, classification and text recognition result | OCR, etc. |
|
||||
| MOTResult | [C++/Python document](./mot_result_EN.md) | Multi-target tracking result | pptracking, etc. |
|
||||
| HeadPoseResult | [C++/Python document](./headpose_result_EN.md) | Head pose estimation result | FSANet, etc. |
|
@@ -1,3 +1,4 @@
|
||||
中文 | [English](classification_result_EN.md)
|
||||
# ClassifyResult 图像分类结果
|
||||
|
||||
ClassifyResult代码定义在`fastdeploy/vision/common/result.h`中,用于表明图像的分类结果和置信度。
|
||||
|
29
docs/api/vision_results/classification_result_EN.md
Normal file
29
docs/api/vision_results/classification_result_EN.md
Normal file
@@ -0,0 +1,29 @@
|
||||
English | [中文](classification_result.md)
|
||||
# Image Classification Result
|
||||
|
||||
The ClassifyResult code is defined in `fastdeploy/vision/common/result.h`, and is used to indicate the classification result and confidence level of the image.
|
||||
|
||||
## C++ Definition
|
||||
|
||||
`fastdeploy::vision::ClassifyResult`
|
||||
|
||||
```c++
|
||||
struct ClassifyResult {
|
||||
std::vector<int32_t> label_ids;
|
||||
std::vector<float> scores;
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
|
||||
- **label_ids**: Member variable which indicates the classification results of a single image. Its number is determined by the topk passed in when using the classification model, e.g. it can return the top 5 classification results.
|
||||
- **scores**: Member variable which indicates the confidence level of a single image on the corresponding classification result. Its number is determined by the topk passed in when using the classification model, e.g. it can return the top 5 classification confidence level.
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
## Python Definition
|
||||
|
||||
`fastdeploy.vision.ClassifyResult`
|
||||
|
||||
- **label_ids**(list of int): Member variable which indicates the classification results of a single image. Its number is determined by the topk passed in when using the classification model, e.g. it can return the top 5 classification results.
|
||||
- **scores**(list of float): Member variable which indicates the confidence level of a single image on the corresponding classification result. Its number is determined by the topk passed in when using the classification model, e.g. it can return the top 5 classification confidence level.
|
@@ -1,3 +1,4 @@
|
||||
中文 | [English](detection_result_EN.md)
|
||||
# DetectionResult 目标检测结果
|
||||
|
||||
DetectionResult代码定义在`fastdeploy/vision/common/result.h`中,用于表明图像检测出来的目标框、目标类别和目标置信度。
|
||||
|
66
docs/api/vision_results/detection_result_EN.md
Normal file
66
docs/api/vision_results/detection_result_EN.md
Normal file
@@ -0,0 +1,66 @@
|
||||
English | [中文](detection_result.md)
|
||||
|
||||
# Target Detection Result
|
||||
|
||||
The DetectionResult code is defined in `fastdeploy/vision/common/result.h`, and is used to indicate the target frame, target class and target confidence level detected in the image.
|
||||
|
||||
## C++ Definition
|
||||
|
||||
```c++
|
||||
fastdeploy::vision::DetectionResult
|
||||
```
|
||||
|
||||
```c++
|
||||
struct DetectionResult {
|
||||
std::vector<std::array<float, 4>> boxes;
|
||||
std::vector<float> scores;
|
||||
std::vector<int32_t> label_ids;
|
||||
std::vector<Mask> masks;
|
||||
bool contain_masks = false;
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
|
||||
- **boxes**: Member variable which indicates the coordinates of all detected target boxes in a single image. `boxes.size()` indicates the number of boxes, each box is represented by 4 float values in order of xmin, ymin, xmax, ymax, i.e. the coordinates of the top left and bottom right corner.
|
||||
- **scores**: Member variable which indicates the confidence level of all targets detected in a single image, where the number of elements is the same as `boxes.size()`.
|
||||
- **label_ids**: Member variable which indicates all target categories detected in a single image, where the number of elements is the same as `boxes.size()`.
|
||||
- **masks**: Member variable which indicates all detected instance masks of a single image, where the number of elements and the shape size are the same as `boxes`.
|
||||
- **contain_masks**: Member variable which indicates whether the detected result contains instance masks, which is generally true for the instance segmentation model.
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
```c++
|
||||
fastdeploy::vision::Mask
|
||||
```
|
||||
```c++
|
||||
struct Mask {
|
||||
std::vector<int32_t> data;
|
||||
std::vector<int64_t> shape; // (H,W) ...
|
||||
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
- **data**: Member variable which indicates a detected mask.
|
||||
- **shape**: Member variable which indicates the shape of the mask, e.g. (h,w).
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
## Python Definition
|
||||
|
||||
```python
|
||||
fastdeploy.vision.DetectionResult
|
||||
```
|
||||
|
||||
- **boxes**(list of list(float)): Member variable which indicates the coordinates of all detected target boxes in a single frame. It is a list, and each element in it is also a list of length 4, representing a box with 4 float values representing xmin, ymin, xmax, ymax, i.e. the coordinates of the top left and bottom right corner.
|
||||
- **scores**(list of float): Member variable which indicates the confidence level of all targets detected in a single image.
|
||||
- **label_ids**(list of int): Member variable which indicates all target categories detected in a single image.
|
||||
- **masks**: Member variable which indicates all detected instance masks of a single image, where the number of elements and the shape size are the same as `boxes`.
|
||||
- **contain_masks**: Member variable which indicates whether the detected result contains instance masks, which is generally true for the instance segmentation model.
|
||||
|
||||
```python
|
||||
fastdeploy.vision.Mask
|
||||
```
|
||||
- **data**: Member variable which indicates a detected mask.
|
||||
- **shape**: Member variable which indicates the shape of the mask, e.g. (h,w).
|
@@ -1,3 +1,4 @@
|
||||
中文 | [English](face_alignment_result_EN.md)
|
||||
# FaceAlignmentResult 人脸对齐(人脸关键点检测)结果
|
||||
|
||||
FaceAlignmentResult 代码定义在`fastdeploy/vision/common/result.h`中,用于表明人脸landmarks。
|
||||
|
26
docs/api/vision_results/face_alignment_result_EN.md
Normal file
26
docs/api/vision_results/face_alignment_result_EN.md
Normal file
@@ -0,0 +1,26 @@
|
||||
English | [中文](face_alignment_result.md)
|
||||
# Face Alignment Result
|
||||
|
||||
The FaceAlignmentResult code is defined in `fastdeploy/vision/common/result.h`, and is used to indicate face landmarks.
|
||||
|
||||
## C++ Definition
|
||||
|
||||
`fastdeploy::vision::FaceAlignmentResult`
|
||||
|
||||
```c++
|
||||
struct FaceAlignmentResult {
|
||||
std::vector<std::array<float, 2>> landmarks;
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
|
||||
- **landmarks**: Member variable which indicates all the key points detected in a single face image.
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
## Python Definition
|
||||
|
||||
`fastdeploy.vision.FaceAlignmentResult`
|
||||
|
||||
- **landmarks**(list of list(float)): Member variable which indicates all the key points detected in a single face image.
|
@@ -1,3 +1,4 @@
|
||||
中文 | [English](face_detection_result_EN.md)
|
||||
# FaceDetectionResult 人脸检测结果
|
||||
|
||||
FaceDetectionResult 代码定义在`fastdeploy/vision/common/result.h`中,用于表明人脸检测出来的目标框、人脸landmarks,目标置信度和每张人脸的landmark数量。
|
||||
|
35
docs/api/vision_results/face_detection_result_EN.md
Normal file
35
docs/api/vision_results/face_detection_result_EN.md
Normal file
@@ -0,0 +1,35 @@
|
||||
English | [中文](face_detection_result.md)
|
||||
# Face Detection Result
|
||||
|
||||
The FaceDetectionResult code is defined in `fastdeploy/vision/common/result.h`, and is used to indicate the target frames, face landmarks, target confidence and the number of landmark per face.
|
||||
|
||||
## C++ Definition
|
||||
|
||||
``fastdeploy::vision::FaceDetectionResult``
|
||||
|
||||
```c++
|
||||
struct FaceDetectionResult {
|
||||
std::vector<std::array<float, 4>> boxes;
|
||||
std::vector<std::array<float, 2>> landmarks;
|
||||
std::vector<float> scores;
|
||||
int landmarks_per_face;
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
|
||||
- **boxes**: Member variable which indicates the coordinates of all detected target boxes in a single image. `boxes.size()` indicates the number of boxes, each box is represented by 4 float values in order of xmin, ymin, xmax, ymax, i.e. the coordinates of the top left and bottom right corner.
|
||||
- **scores**: Member variable which indicates the confidence level of all targets detected in a single image, where the number of elements is the same as `boxes.size()`.
|
||||
- **landmarks**: Member variable which indicates the keypoints of all faces detected in a single image, where the number of elements is the same as `boxes.size()`.
|
||||
- **landmarks_per_face**: Member variable which indicates the number of keypoints in each face box.
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
## Python Definition
|
||||
|
||||
`fastdeploy.vision.FaceDetectionResult`
|
||||
|
||||
- **boxes**(list of list(float)): Member variable which indicates the coordinates of all detected target boxes in a single frame. It is a list, and each element in it is also a list of length 4, representing a box with 4 float values representing xmin, ymin, xmax, ymax, i.e. the coordinates of the top left and bottom right corner.
|
||||
- **scores**(list of float): Member variable which indicates the confidence level of all targets detected in a single image.
|
||||
- **landmarks**(list of list(float)): Member variable which indicates the keypoints of all faces detected in a single image.
|
||||
- **landmarks_per_face**(int): Member variable which indicates the number of keypoints in each face box.
|
@@ -1,3 +1,4 @@
|
||||
中文 | [English](face_recognition_result_EN.md)
|
||||
# FaceRecognitionResult 人脸识别结果
|
||||
|
||||
FaceRecognitionResult 代码定义在`fastdeploy/vision/common/result.h`中,用于表明人脸识别模型对图像特征的embedding。
|
||||
|
26
docs/api/vision_results/face_recognition_result_EN.md
Normal file
26
docs/api/vision_results/face_recognition_result_EN.md
Normal file
@@ -0,0 +1,26 @@
|
||||
English | [中文](face_recognition_result.md)
|
||||
|
||||
# Face Recognition Result
|
||||
|
||||
The FaceRecognitionResult code is defined in `fastdeploy/vision/common/result.h`, and is used to indicate the image features embedding in the face recognition model.
|
||||
## C++ Definition
|
||||
|
||||
`fastdeploy::vision::FaceRecognitionResult`
|
||||
|
||||
```c++
|
||||
struct FaceRecognitionResult {
|
||||
std::vector<float> embedding;
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
|
||||
- **embedding**: Member variable which indicates the final extracted feature embedding of the face recognition model, and can be used to calculate the facial feature similarity.
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
## Python Definition
|
||||
|
||||
`fastdeploy.vision.FaceRecognitionResult`
|
||||
|
||||
- **embedding**(list of float): Member variable which indicates the final extracted feature embedding of the face recognition model, and can be used to calculate the facial feature similarity.
|
@@ -1,3 +1,4 @@
|
||||
中文 | [English](headpose_result_EN.md)
|
||||
# HeadPoseResult 头部姿态结果
|
||||
|
||||
HeadPoseResult 代码定义在`fastdeploy/vision/common/result.h`中,用于表明头部姿态结果。
|
||||
|
26
docs/api/vision_results/headpose_result_EN.md
Normal file
26
docs/api/vision_results/headpose_result_EN.md
Normal file
@@ -0,0 +1,26 @@
|
||||
English | [中文](headpose_result.md)
|
||||
# Head Pose Result
|
||||
|
||||
The HeadPoseResult code is defined in `fastdeploy/vision/common/result.h`, and is used to indicate the head pose result.
|
||||
|
||||
## C++ Definition
|
||||
|
||||
``fastdeploy::vision::HeadPoseResult`''
|
||||
|
||||
```c++
|
||||
struct HeadPoseResult {
|
||||
std::vector<float> euler_angles;
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
|
||||
- **euler_angles**: Member variable which indicates the Euler angles predicted for a single face image, stored in the order (yaw, pitch, roll), with yaw representing the horizontal turn angle, pitch representing the vertical angle, and roll representing the roll angle, all with a value range of [-90,+90].
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
## Python Definition
|
||||
|
||||
`fastdeploy.vision.HeadPoseResult`
|
||||
|
||||
- **euler_angles**(list of float): Member variable which indicates the Euler angles predicted for a single face image, stored in the order (yaw, pitch, roll), with yaw representing the horizontal turn angle, pitch representing the vertical angle, and roll representing the roll angle, all with a value range of [-90,+90].
|
@@ -1,3 +1,4 @@
|
||||
中文 | [English](keypointdetection_result_EN.md)
|
||||
# KeyPointDetectionResult 目标检测结果
|
||||
|
||||
KeyPointDetectionResult 代码定义在`fastdeploy/vision/common/result.h`中,用于表明图像中目标行为的各个关键点坐标和置信度。
|
||||
@@ -16,10 +17,12 @@ struct KeyPointDetectionResult {
|
||||
};
|
||||
```
|
||||
|
||||
- **keypoints**: 成员变量,表示识别到的目标行为的关键点坐标。`keypoints.size()= N * J`,
|
||||
- **keypoints**: 成员变量,表示识别到的目标行为的关键点坐标。
|
||||
`keypoints.size()= N * J`
|
||||
- `N`:图片中的目标数量
|
||||
- `J`:num_joints(一个目标的关键点数量)
|
||||
- **scores**: 成员变量,表示识别到的目标行为的关键点坐标的置信度。`scores.size()= N * J`
|
||||
- **scores**: 成员变量,表示识别到的目标行为的关键点坐标的置信度。
|
||||
`scores.size()= N * J`
|
||||
- `N`:图片中的目标数量
|
||||
- `J`:num_joints(一个目标的关键点数量)
|
||||
- **num_joints**: 成员变量,一个目标的关键点数量
|
||||
@@ -31,11 +34,11 @@ struct KeyPointDetectionResult {
|
||||
`fastdeploy.vision.KeyPointDetectionResult`
|
||||
|
||||
- **keypoints**(list of list(float)): 成员变量,表示识别到的目标行为的关键点坐标。
|
||||
`keypoints.size()= N * J`
|
||||
`N`:图片中的目标数量
|
||||
`J`:num_joints(关键点数量)
|
||||
`keypoints.size()= N * J`
|
||||
- `N`:图片中的目标数量
|
||||
- `J`:num_joints(关键点数量)
|
||||
- **scores**(list of float): 成员变量,表示识别到的目标行为的关键点坐标的置信度。
|
||||
`scores.size()= N * J`
|
||||
`N`:图片中的目标数量
|
||||
`J`:num_joints(一个目标的关键点数量)
|
||||
`scores.size()= N * J`
|
||||
- `N`:图片中的目标数量
|
||||
- `J`:num_joints(一个目标的关键点数量)
|
||||
- **num_joints**(int): 成员变量,一个目标的关键点数量
|
||||
|
44
docs/api/vision_results/keypointdetection_result_EN.md
Normal file
44
docs/api/vision_results/keypointdetection_result_EN.md
Normal file
@@ -0,0 +1,44 @@
|
||||
English | [中文](keypointdetection_result.md)
|
||||
# Keypoint Detection Result
|
||||
|
||||
The KeyPointDetectionResult code is defined in `fastdeploy/vision/common/result.h`, and is used to indicate the coordinates and confidence level of each keypoint of the target's behavior in the image.
|
||||
|
||||
## C++ Definition
|
||||
|
||||
``fastdeploy::vision::KeyPointDetectionResult``
|
||||
|
||||
```c++
|
||||
struct KeyPointDetectionResult {
|
||||
std::vector<std::array<float, 2>> keypoints;
|
||||
std::vector<float> scores;
|
||||
int num_joints = -1;
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
|
||||
- **keypoints**: Member variable which indicates the coordinates of the identified target behavior keypoint.
|
||||
` keypoints.size() = N * J`:
|
||||
- `N`: the number of targets in the image
|
||||
- `J`: num_joints (the number of keypoints of a target)
|
||||
- **scores**: Member variable which indicates the confidence level of the keypoint coordinates of the identified target behavior.
|
||||
`scores.size() = N * J`:
|
||||
- `N`: the number of targets in the picture
|
||||
- `J`:num_joints (the number of keypoints of a target)
|
||||
- **num_joints**: Member variable which indicates the number of keypoints of a target.
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
## Python Definition
|
||||
|
||||
`fastdeploy.vision.KeyPointDetectionResult`
|
||||
|
||||
- **keypoints**(list of list(float)): Member variable which indicates the coordinates of the identified target behavior keypoint.
|
||||
` keypoints.size() = N * J`:
|
||||
- `N`: the number of targets in the image
|
||||
- `J`: num_joints (the number of keypoints of a target)
|
||||
- **scores**(list of float): Member variable which indicates the confidence level of the keypoint coordinates of the identified target behavior.
|
||||
`scores.size() = N * J`:
|
||||
- `N`: the number of targets in the picture
|
||||
- `J`:num_joints (the number of keypoints of a target)
|
||||
- **num_joints**(int): Member variable which indicates the number of keypoints of a target.
|
@@ -1,3 +1,4 @@
|
||||
中文 | [English](matting_result_EN.md)
|
||||
# MattingResult 抠图结果
|
||||
|
||||
MattingResult 代码定义在`fastdeploy/vision/common/result.h`中,用于表明模型预测的alpha透明度的值,预测的前景等。
|
||||
|
37
docs/api/vision_results/matting_result_EN.md
Normal file
37
docs/api/vision_results/matting_result_EN.md
Normal file
@@ -0,0 +1,37 @@
|
||||
English | [中文](matting_result.md)
|
||||
|
||||
# MattingResult keying results
|
||||
|
||||
The MattingResult code is defined in `fastdeploy/vision/common/result.h`, and is used to indicate the predicted value of alpha transparency predicted and the predicted foreground, etc.
|
||||
|
||||
## C++ Definition
|
||||
|
||||
``fastdeploy::vision::MattingResult`''
|
||||
|
||||
```c++
|
||||
struct MattingResult {
|
||||
std::vector<float> alpha;
|
||||
std::vector<float> foreground;
|
||||
std::vector<int64_t> shape;
|
||||
bool contain_foreground = false;
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
|
||||
- **alpha**: It is a one-dimensional vector, indicating the predicted value of alpha transparency. The value range is [0.,1.], and the length is hxw, in which h,w represent the height and the width of the input image seperately.
|
||||
- **foreground**: It is a one-dimensional vector, indicating the predicted foreground. The value range is [0.,255.], and the length is hxwxc, in which h,w represent the height and the width of the input image, and c is generally 3. This vector is valid only when the model itself predicts the foreground.
|
||||
- **contain_foreground**: Used to indicate whether the result contains foreground.
|
||||
- **shape**: Used to indicate the shape of the output. When contain_foreground is false, the shape only contains (h,w), while when contain_foreground is true, the shape contains (h,w,c), in which c is generally 3.
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
|
||||
## Python Definition
|
||||
|
||||
`fastdeploy.vision.MattingResult`
|
||||
|
||||
- **alpha**(list of float): It is a one-dimensional vector, indicating the predicted value of alpha transparency. The value range is [0.,1.], and the length is hxw, in which h,w represent the height and the width of the input image seperately.
|
||||
- **foreground**(list of float): It is a one-dimensional vector, indicating the predicted foreground. The value range is [0.,255.], and the length is hxwxc, in which h,w represent the height and the width of the input image, and c is generally 3. This vector is valid only when the model itself predicts the foreground.
|
||||
- **contain_foreground**(bool): Used to indicate whether the result contains foreground.
|
||||
- **shape**(list of int): Used to indicate the shape of the output. When contain_foreground is false, the shape only contains (h,w), while when contain_foreground is true, the shape contains (h,w,c), in which c is generally 3.
|
@@ -1,3 +1,4 @@
|
||||
中文 | [English](mot_result_EN.md)
|
||||
# MOTResult 多目标跟踪结果
|
||||
|
||||
MOTResult代码定义在`fastdeploy/vision/common/result.h`中,用于表明多目标跟踪中的检测出来的目标框、目标跟踪id、目标类别和目标置信度。
|
||||
|
41
docs/api/vision_results/mot_result_EN.md
Normal file
41
docs/api/vision_results/mot_result_EN.md
Normal file
@@ -0,0 +1,41 @@
|
||||
English | [中文](mot_result.md)
|
||||
# Multi-target Tracking Result
|
||||
|
||||
The MOTResult code is defined in `fastdeploy/vision/common/result.h`, and is used to indicate the detected target frame, target tracking id, target class and target confidence ratio in multi-target tracking task.
|
||||
|
||||
## C++ Definition
|
||||
|
||||
```c++
|
||||
fastdeploy::vision::MOTResult
|
||||
```
|
||||
|
||||
```c++
|
||||
struct MOTResult{
|
||||
// left top right bottom
|
||||
std::vector<std::array<int, 4>> boxes;
|
||||
std::vector<int> ids;
|
||||
std::vector<float> scores;
|
||||
std::vector<int> class_ids;
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
|
||||
- **boxes**: Member variable which indicates the coordinates of all detected target boxes in a single frame. `boxes.size()` indicates the number of boxes, each box is represented by 4 float values in order of xmin, ymin, xmax, ymax, i.e. the coordinates of the top left and bottom right corner.
|
||||
- **ids**: Member variable which indicates the ids of all targets in a single frame, where the element number is the same as `boxes.size()`.
|
||||
- **scores**: Member variable which indicates the confidence level of all targets detected in a single frame, where the number of elements is the same as `boxes.size()`.
|
||||
- **class_ids**: Member variable which indicates all target classes detected in a single frame, where the element number is the same as `boxes.size()`.
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
## Python Definition
|
||||
|
||||
```python
|
||||
fastdeploy.vision.MOTResult
|
||||
```
|
||||
|
||||
- **boxes**(list of list(float)): Member variable which indicates the coordinates of all detected target boxes in a single frame. It is a list, and each element in it is also a list of length 4, representing a box with 4 float values representing xmin, ymin, xmax, ymax, i.e. the coordinates of the top left and bottom right corner.
|
||||
- **ids**(list of list(float)): Member variable which indicates the ids of all targets in a single frame, where the element number is the same as `boxes`.
|
||||
- **scores**(list of float): Member variable which indicates the confidence level of all targets detected in a single frame.
|
||||
- **class_ids**(list of float): Member variable which indicates all target classes detected in a single frame.
|
||||
|
@@ -1,3 +1,4 @@
|
||||
中文 | [English](ocr_result_EN.md)
|
||||
# OCRResult OCR预测结果
|
||||
|
||||
OCRResult代码定义在`fastdeploy/vision/common/result.h`中,用于表明图像检测和识别出来的文本框,文本框方向分类,以及文本框内的文本内容
|
||||
|
43
docs/api/vision_results/ocr_result_EN.md
Normal file
43
docs/api/vision_results/ocr_result_EN.md
Normal file
@@ -0,0 +1,43 @@
|
||||
English | [中文](ocr_result.md)
|
||||
# OCR prediction result
|
||||
|
||||
The OCRResult code is defined in `fastdeploy/vision/common/result.h`, and is used to indicate the text box detected in the image, text box orientation classification, and the text content.
|
||||
|
||||
## C++ Definition
|
||||
|
||||
```c++
|
||||
fastdeploy::vision::OCRResult
|
||||
```
|
||||
|
||||
```c++
|
||||
struct OCRResult {
|
||||
std::vector<std::array<int, 8>> boxes;
|
||||
std::vector<std::string> text;
|
||||
std::vector<float> rec_scores;
|
||||
std::vector<float> cls_scores;
|
||||
std::vector<int32_t> cls_labels;
|
||||
ResultType type = ResultType::OCR;
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
|
||||
- **boxes**: Member variable which indicates the coordinates of all detected target boxes in a single image. `boxes.size()` indicates the number of detected boxes. Each box is represented by 8 int values to indicate the 4 coordinates of the box, in the order of lower left, lower right, upper right, upper left.
|
||||
- **text**: Member variable which indicates the content of the recognized text in multiple text boxes, where the element number is the same as `boxes.size()`.
|
||||
- **rec_scores**: Member variable which indicates the confidence level of the recognized text, where the element number is the same as `boxes.size()`.
|
||||
- **cls_scores**: Member variable which indicates the confidence level of the classification result of the text box, where the element number is the same as `boxes.size()`.
|
||||
- **cls_labels**: Member variable which indicates the directional category of the textbox, where the element number is the same as `boxes.size()`.
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
## Python Definition
|
||||
|
||||
```python
|
||||
fastdeploy.vision.OCRResult
|
||||
```
|
||||
|
||||
- **boxes**: Member variable which indicates the coordinates of all detected target boxes in a single image. `boxes.size()` indicates the number of detected boxes. Each box is represented by 8 int values to indicate the 4 coordinates of the box, in the order of lower left, lower right, upper right, upper left.
|
||||
- **text**: Member variable which indicates the content of the recognized text in multiple text boxes, where the element number is the same as `boxes.size()`.
|
||||
- **rec_scores**: Member variable which indicates the confidence level of the recognized text, where the element number is the same as `boxes.size()`.
|
||||
- **cls_scores**: Member variable which indicates the confidence level of the classification result of the text box, where the element number is the same as `boxes.size()`.
|
||||
- **cls_labels**: Member variable which indicates the directional category of the textbox, where the element number is the same as `boxes.size()`.
|
@@ -1,3 +1,4 @@
|
||||
中文 | [English](segmentation_result_EN.md)
|
||||
# SegmentationResult 目标检测结果
|
||||
|
||||
SegmentationResult代码定义在`fastdeploy/vision/common/result.h`中,用于表明图像中每个像素预测出来的分割类别和分割类别的概率值。
|
||||
|
33
docs/api/vision_results/segmentation_result_EN.md
Normal file
33
docs/api/vision_results/segmentation_result_EN.md
Normal file
@@ -0,0 +1,33 @@
|
||||
English | [中文](segmentation_result.md)
|
||||
# Segmentation Result
|
||||
|
||||
The SegmentationResult code is defined in `fastdeploy/vision/common/result.h`, indicating the segmentation category and the segmentation category probability predicted in each pixel in the image.
|
||||
|
||||
## C++ Definition
|
||||
|
||||
``fastdeploy::vision::SegmentationResult``
|
||||
|
||||
```c++
|
||||
struct SegmentationResult {
|
||||
std::vector<uint8_t> label_map;
|
||||
std::vector<float> score_map;
|
||||
std::vector<int64_t> shape;
|
||||
bool contain_score_map = false;
|
||||
void Clear();
|
||||
std::string Str();
|
||||
};
|
||||
```
|
||||
|
||||
- **label_map**: Member variable which indicates the segmentation category of each pixel in a single image. `label_map.size()` indicates the number of pixel points of a image.
|
||||
- **score_map**: Member variable which indicates the predicted segmentation category probability value (specified as `--output_op argmax` when export) corresponding to label_map, or the probability value normalized by softmax (specified as `--output_op softmax` when export, or as `--output_op when exporting the model). none` when export while setting the [class member attribute](../../../examples/vision/segmentation/paddleseg/cpp/) as `apply_softmax=True` during model initialization).
|
||||
- **shape**: Member variable which indicates the shape of the output image as H\*W.
|
||||
- **Clear()**: Member function used to clear the results stored in the structure.
|
||||
- **Str()**: Member function used to output the information in the structure as string (for Debug).
|
||||
|
||||
## Python Definition
|
||||
|
||||
`fastdeploy.vision.SegmentationResult`
|
||||
|
||||
- **label_map**(list of int): Member variable which indicates the segmentation category of each pixel in a single image.
|
||||
- **score_map**(list of float): Member variable which indicates the predicted segmentation category probability value (specified as `--output_op argmax` when export) corresponding to label_map, or the probability value normalized by softmax (specified as `--output_op softmax` when export, or as `--output_op when exporting the model). none` when export while setting the [class member attribute](../../../examples/vision/segmentation/paddleseg/cpp/) as `apply_softmax=True` during model initialization).
|
||||
- **shape**(list of int): Member variable which indicates the shape of the output image as H\*W.
|
Reference in New Issue
Block a user