[Doc] Add docs for ppocr ppseg examples (#1429)

* add docs for examples

* add english doc

* fix

* fix docs
This commit is contained in:
chenjian
2023-02-28 20:13:01 +08:00
committed by GitHub
parent 010f12db3d
commit c8bcada1a2
22 changed files with 2983 additions and 5 deletions

View File

@@ -41,3 +41,78 @@ fastdeploy.vision.OCRResult
- **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()`.
## C# Definition
`fastdeploy.vision.OCRResult`
```C#
public class OCRResult {
public List<int[]> boxes;
public List<string> text;
public List<float> rec_scores;
public List<float> cls_scores;
public List<int> cls_labels;
public ResultType type;
}
```
- **boxes**: Member variable which indicates the coordinates of all detected target boxes in a single image. `boxes.Count` 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.Count`.
- **rec_scores**: Member variable which indicates the confidence level of the recognized text, where the element number is the same as `boxes.Count`.
- **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.Count`.
- **cls_labels**: Member variable which indicates the directional category of the textbox, where the element number is the same as `boxes.Count`.
## C Definition
```c
struct FD_C_OCRResult {
FD_C_TwoDimArrayInt32 boxes;
FD_C_OneDimArrayCstr text;
FD_C_OneDimArrayFloat rec_scores;
FD_C_OneDimArrayFloat cls_scores;
FD_C_OneDimArrayInt32 cls_labels;
FD_C_ResultType type;
};
```
- **boxes**: Member variable which indicates the coordinates of all detected target boxes in a single image.
```c
typedef struct FD_C_TwoDimArrayInt32 {
size_t size;
FD_C_OneDimArrayInt32* data;
} FD_C_TwoDimArrayInt32;
```
```c
typedef struct FD_C_OneDimArrayInt32 {
size_t size;
int32_t* data;
} FD_C_OneDimArrayInt32;
```
- **text**: Member variable which indicates the content of the recognized text in multiple text boxes
```c
typedef struct FD_C_Cstr {
size_t size;
char* data;
} FD_C_Cstr;
typedef struct FD_C_OneDimArrayCstr {
size_t size;
FD_C_Cstr* data;
} FD_C_OneDimArrayCstr;
```
- **rec_scores**: Member variable which indicates the confidence level of the recognized text
```c
typedef struct FD_C_OneDimArrayFloat {
size_t size;
float* data;
} FD_C_OneDimArrayFloat;
```
- **cls_scores**: Member variable which indicates the confidence level of the classification result of the text box
- **cls_labels**: Member variable which indicates the directional category of the textbox

View File

@@ -41,3 +41,78 @@ fastdeploy.vision.OCRResult
- **rec_scores**: 成员变量,表示文本框内识别出来的文本的置信度,其元素个数与`boxes.size()`一致
- **cls_scores**: 成员变量,表示文本框的分类结果的置信度,其元素个数与`boxes.size()`一致
- **cls_labels**: 成员变量,表示文本框的方向分类类别,其元素个数与`boxes.size()`一致
## C# 定义
`fastdeploy.vision.OCRResult`
```C#
public class OCRResult {
public List<int[]> boxes;
public List<string> text;
public List<float> rec_scores;
public List<float> cls_scores;
public List<int> cls_labels;
public ResultType type;
}
```
- **boxes**: 成员变量,表示单张图片检测出来的所有目标框坐标,`boxes.Count`表示单张图内检测出的框的个数每个框以8个int数值依次表示框的4个坐标点顺序为左下右下右上左上
- **text**: 成员变量,表示多个文本框内被识别出来的文本内容,其元素个数与`boxes.Count`一致
- **rec_scores**: 成员变量,表示文本框内识别出来的文本的置信度,其元素个数与`boxes.Count`一致
- **cls_scores**: 成员变量,表示文本框的分类结果的置信度,其元素个数与`boxes.Count`一致
- **cls_labels**: 成员变量,表示文本框的方向分类类别,其元素个数与`boxes.Count`一致
## C定义
```c
struct FD_C_OCRResult {
FD_C_TwoDimArrayInt32 boxes;
FD_C_OneDimArrayCstr text;
FD_C_OneDimArrayFloat rec_scores;
FD_C_OneDimArrayFloat cls_scores;
FD_C_OneDimArrayInt32 cls_labels;
FD_C_ResultType type;
};
```
- **boxes**: 成员变量,表示单张图片检测出来的所有目标框坐标。
```c
typedef struct FD_C_TwoDimArrayInt32 {
size_t size;
FD_C_OneDimArrayInt32* data;
} FD_C_TwoDimArrayInt32;
```
```c
typedef struct FD_C_OneDimArrayInt32 {
size_t size;
int32_t* data;
} FD_C_OneDimArrayInt32;
```
- **text**: 成员变量,表示多个文本框内被识别出来的文本内容。
```c
typedef struct FD_C_Cstr {
size_t size;
char* data;
} FD_C_Cstr;
typedef struct FD_C_OneDimArrayCstr {
size_t size;
FD_C_Cstr* data;
} FD_C_OneDimArrayCstr;
```
- **rec_scores**: 成员变量,表示文本框内识别出来的文本的置信度。
```c
typedef struct FD_C_OneDimArrayFloat {
size_t size;
float* data;
} FD_C_OneDimArrayFloat;
```
- **cls_scores**: 成员变量,表示文本框的分类结果的置信度。
- **cls_labels**: 成员变量,表示文本框的方向分类类别。

View File

@@ -31,3 +31,63 @@ struct 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 corresponding to the label_map one-to-one, the member variable is not empty only when `--output_op none` is specified when exporting the PaddleSeg model, otherwise the member variable is empty.
- **shape**(list of int): Member variable which indicates the shape of the output image as H\*W.
## C# Definition
`fastdeploy.vision.SegmentationResult`
```C#
public class SegmentationResult{
public List<byte> label_map;
public List<float> score_map;
public List<long> shape;
public bool contain_score_map;
public ResultType type;
}
```
- **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 corresponding to the label_map one-to-one, the member variable is not empty only when `--output_op none` is specified when exporting the PaddleSeg model, otherwise the member variable is empty.
- **shape**(list of int): Member variable which indicates the shape of the output image as H\*W.
## C Definition
```c
struct FD_C_SegmentationResult {
FD_C_OneDimArrayUint8 label_map;
FD_C_OneDimArrayFloat score_map;
FD_C_OneDimArrayInt64 shape;
FD_C_Bool contain_score_map;
FD_C_ResultType type;
};
```
- **label_map**(FD_C_OneDimArrayUint8): Member variable which indicates the segmentation category of each pixel in a single image.
```c
struct FD_C_OneDimArrayUint8 {
size_t size;
uint8_t* data;
};
```
- **score_map**(FD_C_OneDimArrayFloat): Member variable which indicates the predicted segmentation category probability value corresponding to the label_map one-to-one, the member variable is not empty only when `--output_op none` is specified when exporting the PaddleSeg model, otherwise the member variable is empty.
```c
struct FD_C_OneDimArrayFloat {
size_t size;
float* data;
};
```
- **shape**(FD_C_OneDimArrayInt64): Member variable which indicates the shape of the output image as H\*W.
```c
struct FD_C_OneDimArrayInt64 {
size_t size;
int64_t* data;
};
```

View File

@@ -33,3 +33,61 @@ struct SegmentationResult {
- **label_map**(list of int): 成员变量,表示单张图片每个像素点的分割类别
- **score_map**(list of float): 成员变量与label_map一一对应的所预测的分割类别概率值只有导出PaddleSeg模型时指定`--output_op none`时,该成员变量才不为空,否则该成员变量为空
- **shape**(list of int): 成员变量表示输出图片的shape为H\*W
## C# 定义
`fastdeploy.vision.SegmentationResult`
```C#
public class SegmentationResult{
public List<byte> label_map;
public List<float> score_map;
public List<long> shape;
public bool contain_score_map;
public ResultType type;
}
```
- **label_map**(list of byte): 成员变量,表示单张图片每个像素点的分割类别
- **score_map**(list of float): 成员变量与label_map一一对应的所预测的分割类别概率值只有导出PaddleSeg模型时指定`--output_op none`时,该成员变量才不为空,否则该成员变量为空
- **shape**(list of long): 成员变量表示输出图片的shape为H\*W
## C定义
```c
struct FD_C_SegmentationResult {
FD_C_OneDimArrayUint8 label_map;
FD_C_OneDimArrayFloat score_map;
FD_C_OneDimArrayInt64 shape;
FD_C_Bool contain_score_map;
FD_C_ResultType type;
};
```
- **label_map**(FD_C_OneDimArrayUint8): 成员变量,表示单张图片每个像素点的分割类别
```c
struct FD_C_OneDimArrayUint8 {
size_t size;
uint8_t* data;
};
```
- **score_map**(FD_C_OneDimArrayFloat): 成员变量与label_map一一对应的所预测的分割类别概率值只有导出PaddleSeg模型时指定`--output_op none`时,该成员变量才不为空,否则该成员变量为空
```c
struct FD_C_OneDimArrayFloat {
size_t size;
float* data;
};
```
- **shape**(FD_C_OneDimArrayInt64): 成员变量表示输出图片的shape为H\*W
```c
struct FD_C_OneDimArrayInt64 {
size_t size;
int64_t* data;
};
```