You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
- **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.
20
+
- **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.
21
+
- **Clear()**: Member function used to clear the results stored in the structure.
22
+
- **Str()**: Member function used to output the information in the structure as string (for Debug).
23
23
24
-
## Python 定义
24
+
## Python Definition
25
25
26
26
`fastdeploy.vision.ClassifyResult`
27
27
28
-
- **label_ids**(list of int): 成员变量,表示单张图片的分类结果,其个数根据在使用分类模型时传入的topk决定,例如可以返回top 5的分类结果
29
-
- **scores**(list of float): 成员变量,表示单张图片在相应分类结果上的置信度,其个数根据在使用分类模型时传入的topk决定,例如可以返回top 5的分类置信度
28
+
- **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.
29
+
- **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.
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.
- **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.
26
+
- **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()`.
27
+
- **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()`.
28
+
- **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`.
29
+
- **contain_masks**: Member variable which indicates whether the detected result contains instance masks, which is generally true for the instance segmentation model.
30
+
- **Clear()**: Member function used to clear the results stored in the structure.
31
+
- **Str()**: Member function used to output the information in the structure as string (for Debug).
31
32
32
33
```c++
33
34
fastdeploy::vision::Mask
34
35
```
35
36
```c++
36
37
structMask {
37
38
std::vector<int32_t> data;
38
-
std::vector<int64_t> shape; // (H,W) ...
39
+
std::vector<int64_t> shape; // (H,W) ...
39
40
40
41
void Clear();
41
42
std::string Str();
42
43
};
43
44
```
44
-
- **data**: 成员变量,表示检测到的一个mask
45
-
- **shape**: 成员变量,表示mask的shape,如 (h,w)
46
-
- **Clear()**: 成员函数,用于清除结构体中存储的结果
47
-
- **Str()**: 成员函数,将结构体中的信息以字符串形式输出(用于Debug)
45
+
- **data**: Member variable which indicates a detected mask.
46
+
- **shape**: Member variable which indicates the shape of the mask, e.g. (h,w).
47
+
- **Clear()**: Member function used to clear the results stored in the structure.
48
+
- **Str()**: Member function used to output the information in the structure as string (for Debug).
48
49
49
-
## Python 定义
50
+
## Python Definition
50
51
51
52
```python
52
53
fastdeploy.vision.DetectionResult
53
54
```
54
55
55
-
-**boxes**(list of list(float)): 成员变量,表示单张图片检测出来的所有目标框坐标。boxes是一个list,其每个元素为一个长度为4的list, 表示为一个框,每个框以4个float数值依次表示xmin, ymin, xmax, ymax, 即左上角和右下角坐标
56
-
-**scores**(list of float): 成员变量,表示单张图片检测出来的所有目标置信度
57
-
-**label_ids**(list of int): 成员变量,表示单张图片检测出来的所有目标类别
-**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.
57
+
-**scores**(list of float): Member variable which indicates the confidence level of all targets detected in a single image.
58
+
-**label_ids**(list of int): Member variable which indicates all target categories detected in a single image.
59
+
-**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`.
60
+
-**contain_masks**: Member variable which indicates whether the detected result contains instance masks, which is generally true for the instance segmentation model.
60
61
61
62
```python
62
63
fastdeploy.vision.Mask
63
64
```
64
-
-**data**: 成员变量,表示检测到的一个mask
65
-
-**shape**: 成员变量,表示mask的shape,如 (h,w)
65
+
-**data**: Member variable which indicates a detected mask.
66
+
-**shape**: Member variable which indicates the shape of the mask, e.g. (h,w).
0 commit comments