forked from PaddlePaddle/FastDeploy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Doc]Add English version of documents in docs/cn and api/vision_resul…
…ts (PaddlePaddle#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
- Loading branch information
Showing
80 changed files
with
1,430 additions
and
53 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
docs/api/vision_results/README.md → docs/api/vision_results/README_CN.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.