Model Post-processing Parameters
The following tables list the configuration parameters required by each model.
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
CLASS_NUM |
Number of classes. |
80 |
None |
BIASES_NUM |
Number of anchor widths and heights (18 indicates nine anchors, and each anchor corresponds to a pair of widths and heights). |
18 |
[0, 100] |
BIASE |
Every two numbers form the width and height of an anchor. For example, 10, 13 indicates the width and height of the first anchor. |
10, 13, 16, 30, 33, 23, 30, 61, 62, 45, 59, 119, 116, 90, 156, 198, 373, 326 |
None |
SCORE_THRESH |
Threshold for determining whether an object is of a certain class. If the value is greater than the threshold, the object is considered as the class. |
0.3 |
[0.0, 1.0] |
OBJECTNESS_THRESH |
Threshold for determining whether it is an object. If the value is greater than the threshold, it is an object. |
0.3 |
[0.0, 1.0] |
IOU_THRESH |
IOU threshold of two enclosures. If the threshold is exceeded, the two frames are considered as one frame. |
0.45 |
[0.0, 1.0] |
YOLO_TYPE |
Number of output tensors. 3 indicates that three feature maps are output. |
3 |
[0, 16] |
ANCHOR_DIM |
Number of anchor frames corresponding to each feature map. |
3 |
[0, 16] |
MODEL_TYPE |
Data layout format. 0 indicates NHWC, 1 indicates NCHW, and 2 indicates NCHWC. |
0 |
None |
FRAMEWORK |
The value is of the string type. It can be MindSpore, PyTorch, TensorFlow, or Caffe. |
TensorFlow |
None |
SEPARATE_SCORE_THRESH |
Threshold corresponding to each class. |
The number of SCORE_THRESH (threshold) is determined by CLASS_NUM (quantity). The threshold is separated by commas (,). (The number of thresholds is equal to the value of CLASS_NUM.) |
None |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
CLASS_NUM |
Number of classes. |
1001 |
[0, 2000] |
SOFTMAX |
Indicates whether to perform softmax calculation in postprocessing. It is of the Boolean type. |
false |
None |
TOP_K |
Top K classes with the highest possibility. |
1 |
[0, 16] |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
CLASS_NUM |
Number of classes. |
91 |
[0, 1000] |
SCORE_THRESH |
Threshold for determining whether an object is of a certain class. If the value is greater than the threshold, the object is considered as the class. |
0.5 |
[0.0, 1.0] |
IOU_THRESH |
IOU threshold of two enclosures. If the threshold is exceeded, the two frames are considered as one frame. |
0.45 |
[0.0, 1.0] |
SEPARATE_SCORE_THRESH |
Threshold corresponding to each class. |
The number of SCORE_THRESH (threshold) is determined by CLASS_NUM (quantity). The threshold is separated by commas (,). (The number of thresholds is equal to the value of CLASS_NUM.) |
None |
MODEL_TYPE |
The options are as follows: 0: original 1: nms_cut (No non-maximum value suppression is performed on the model.) 2: FPN |
0 |
None |
FRAMEWORK |
The value can be:
|
TensorFlow |
None |
NMS_FINISHED |
Attribute value specific to the old framework, of the Boolean type.
|
true |
None |
Note: The MODEL_TYPE and FRAMEWORK parameters are described as follows:
|
|||
Parameter |
Description |
Default Value |
|---|---|---|
CLASS_NUM |
Number of classes. |
5 |
SCORE_THRESH |
Target threshold. |
0.4 |
SEPARATE_SCORE_THRESH |
Threshold corresponding to each class. |
The number of SCORE_THRESH (threshold) is determined by CLASS_NUM (quantity). The threshold is separated by commas (,). (The number of thresholds is equal to the value of CLASS_NUM.) |
Parameter |
Description |
Default Value |
|---|---|---|
CLASS_NUM |
Number of classes. |
3 |
SCORE_THRESH |
Threshold for determining whether an object is of a certain class. If the value is greater than the threshold, the object is considered as the class. |
0.5 |
SEPARATE_SCORE_THRESH |
Threshold corresponding to each class. |
The number of SCORE_THRESH (threshold) is determined by CLASS_NUM (quantity). The threshold is separated by commas (,). (The number of thresholds is equal to the value of CLASS_NUM.) |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
CLASS_NUM |
Number of classes. |
0 |
[0, 10000] |
OBJECT_NUM |
Maximum number of characters that can be detected. |
0 |
[0, 1000] |
BLANK_INDEX |
Index value of a blank character. |
0 |
[0, 10000] |
WITH_ARGMAX |
Whether argmax has been performed on the model backbone. |
false |
None |
Parameter |
Description |
Default Value |
|---|---|---|
ACTIVATION_FUNCTION |
Activation function used to activate the model output data. |
None |
Parameter |
Description |
Default Value |
|---|---|---|
ATTRIBUTE_NUM |
Number of model output properties. |
5 |
ACTIVATION_FUNCTION |
Type of the activation function. Currently, only the sigmoid function is supported. |
None |
ATTRIBUTE_INDEX |
Index of a model output property. Ensure that the number of indexes is the same as the value of ATTRIBUTE_NUM. |
None |
Parameter |
Description |
Default Value |
|---|---|---|
CLASS_NUM |
Number of classes. |
5 |
Parameter |
Description |
Default Value |
|---|---|---|
CLASS_NUM |
Number of classes. |
80 |
BIASES_NUM |
Number of anchor widths and heights (18 indicates nine anchors, and each anchor corresponds to a pair of widths and heights). |
18 |
BIASES |
Every two numbers form the width and height of an anchor. For example, 10, 13 indicates the width and height of the first anchor. |
10, 13, 16, 30, 33, 23, 30, 61, 62, 45, 59, 119, 116, 90, 156, 198, 373, 326 |
SCORE_THRESH |
Threshold for determining whether an object is of a certain class. If the value is greater than the threshold, the object is considered as the class. |
0.3 |
OBJECTNESS_THRESH |
Threshold for determining whether it is an object. If the value is greater than the threshold, it is an object. |
0.3 |
IOU_THRESH |
IOU threshold of two enclosures. If the threshold is exceeded, the two frames are considered as one frame. |
0.45 |
YOLO_TYPE |
Number of output tensors. 3 indicates that three feature maps are output. |
3 |
ANCHOR_DIM |
Number of anchor frames corresponding to each feature map. |
3 |
MODEL_TYPE |
Data layout format. 0 indicates NHWC, and 1 indicates NCHW. |
0 |
FRAMEWORK_TYPE |
Model framework. The value 0 indicates PyTorch, and the value 1 indicates MindSpore. |
0 |
SEPARATE_SCORE_THRESH |
Threshold corresponding to each class. |
The number of SCORE_THRESH (threshold) is determined by CLASS_NUM (quantity). The threshold is separated by commas (,). (The number of thresholds is equal to the value of CLASS_NUM.) |
Parameter |
Description |
Default Value |
|---|---|---|
CLASS_NUM |
Number of classes. |
80 |
BIASES_NUM |
Number of anchor widths and heights (18 indicates nine anchors, and each anchor corresponds to a pair of widths and heights). |
18 |
BIASES |
Every two numbers form the width and height of an anchor. For example, 10, 13 indicates the width and height of the first anchor. |
10, 13, 16, 30, 33, 23, 30, 61, 62, 45, 59, 119, 116, 90, 156, 198, 373, 326 |
SCORE_THRESH |
Threshold for determining whether an object is of a certain class. If the value is greater than the threshold, the object is considered as the class. |
0.3 |
OBJECTNESS_THRESH |
Threshold for determining whether it is an object. If the value is greater than the threshold, it is an object. |
0.3 |
IOU_THRESH |
IOU threshold of two enclosures. If the threshold is exceeded, the two frames are considered as one frame. |
0.45 |
YOLO_TYPE |
Number of output tensors. 3 indicates that three feature maps are output. |
3 |
ANCHOR_DIM |
Number of anchor frames corresponding to each feature map. |
3 |
MODEL_TYPE |
Data layout format. 0 indicates NHWC, 1 indicates NCHW, and 2 indicates NCHWC. |
0 |
FRAMEWORK |
The value is of the string type. It can be MindSpore, PyTorch, TensorFlow, or Caffe. |
MindSpore |
SEPARATE_SCORE_THRESH |
Threshold corresponding to each class. |
The number of SCORE_THRESH (threshold) is determined by CLASS_NUM (quantity). The threshold is separated by commas (,). (The number of thresholds is equal to the value of CLASS_NUM.) |
YOLO_VERSION |
YOLO model version in use. |
(Mandatory) YOLO_VERSION = 4 |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
CLASS_NUM |
Number of classes. |
80 |
[0, 1000] |
BIASES_NUM |
Number of anchor widths and heights (18 indicates nine anchors, and each anchor corresponds to a pair of widths and heights). |
18 |
[0, 1000] |
BIASE |
Every two numbers form the width and height of an anchor. For example, 10, 13 indicates the width and height of the first anchor. |
10, 13, 16, 30, 33, 23, 30, 61, 62, 45, 59, 119, 116, 90, 156, 198, 373, 326 |
None |
SCORE_THRESH |
Threshold for determining whether an object is of a certain class. If the value is greater than the threshold, the object is considered as the class. |
0.3 |
[0.0, 1.0] |
OBJECTNESS_THRESH |
Threshold for determining whether it is an object. If the value is greater than the threshold, it is an object. |
0.3 |
[0.0, 1.0] |
IOU_THRESH |
IOU threshold of two enclosures. If the threshold is exceeded, the two frames are considered as one frame. |
0.45 |
[0.0, 1.0] |
YOLO_TYPE |
Number of output tensors. 3 indicates that three feature maps are output. |
3 |
[0, 1000] |
ANCHOR_DIM |
Number of anchor frames corresponding to each feature map. |
3 |
[0, 1000] |
MODEL_TYPE |
Data layout format. 0 indicates NHWC, 1 indicates NCHW, and 2 indicates NCHWC (Currently, only models in PyTorch framework are supported.). |
2 |
[0, 1000] |
FRAMEWORK |
The value is of the string type. It can be MindSpore, PyTorch, TensorFlow, or Caffe. |
PyTorch |
None |
SEPARATE_SCORE_THRESH |
Threshold corresponding to each class. |
The number of SCORE_THRESH (threshold) is determined by CLASS_NUM (quantity). The threshold is separated by commas (,). (The number of thresholds is equal to the value of CLASS_NUM.) |
None |
YOLO_VERSION |
YOLO model version in use. |
(Mandatory) YOLO_VERSION=5 |
None |
Parameter |
Description |
Default Value |
|---|---|---|
SCORE_THRESH |
Threshold for determining whether an object is of a certain class. If the value is greater than the threshold, the object is considered as the class. Value 0.3 is used in the test. |
0.5 |
FPN_SWITCH |
FPN switch. This parameter must be set to true for both models. |
false |
Parameter |
Description |
Default Value |
|---|---|---|
CLASS_NUM |
Number of classes. |
21 |
FRAMEWORK_TYPE |
Deep learning framework type. |
0: TensorFlow framework |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
IS_ORIENTED |
Indicates whether to detect box tilt. |
false |
None |
BOX_IOU_THRESH |
IOU threshold of the small box. |
0.7 |
[0.0, 1.0] |
TEXT_IOU_THRESH |
IOU threshold of the final text box. |
0.2 |
[0.0, 1.0] |
TEXT_PROPOSALS_MIN_SCORE |
Minimum score for filtering the small box. |
0.7 |
[0.0, 1.0] |
LINE_MIN_SCORE |
Minimum score for filtering the final text box. |
0.9 |
[0.0, 1.0] |
IS_MINDSPORE |
Whether the MindSpore framework is used. |
false |
None |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
IS_ORIENTED |
Indicates whether to detect box tilt. |
false |
None |
BOX_IOU_THRESH |
IOU threshold of the small box. |
0.7 |
[0.0, 1.0] |
TEXT_IOU_THRESH |
IOU threshold of the final text box. |
0.2 |
[0.0, 1.0] |
TEXT_PROPOSALS_MIN_SCORE |
Minimum score for filtering the small box. |
0.7 |
[0.0, 1.0] |
LINE_MIN_SCORE |
Minimum score for filtering the final text box. |
0.9 |
[0.0, 1.0] |
IS_MINDSPORE |
Whether the MindSpore framework is used. |
true |
None |
Parameter |
Description |
Default Value |
|---|---|---|
CLASS_NUM |
Number of classes. |
2 |
Parameter |
Description |
Default Value |
|---|---|---|
CLASS_NUM |
Number of classes. |
21 |
MODEL_TYPE |
Layout of the model inference output data. The value 0 indicates NHWC, and the value 1 indicates NCHW. |
1 |
FRAMEWORK_TYPE |
Deep learning framework type. |
2: MindSpore framework |
Parameter |
Description |
Default Value |
|---|---|---|
CLASS_NUM |
Number of classes. |
2 |
CHECK_MODEL |
Checks model compatibility. |
false |
Parameter |
Description |
Default Value |
|---|---|---|
CLASS_NUM |
Number of classes. |
21 |
CHECK_MODEL |
Checks model compatibility. |
true |
MODEL_TYPE |
Layout of the model inference output data. The value 0 indicates NHWC, and the value 1 indicates NCHW. |
1 |
FRAMEWORK_TYPE |
Deep learning framework type. |
Select 1 for the PyTorch framework. |
Parameter |
Description |
Default Value |
|---|---|---|
CLASS_NUM |
Number of classes. |
2 |
POST_TYPE |
Model post-processing mode. The value 0 indicates that argmax is performed on the model logits output (NHWC type). The value 1 indicates that the model argmax output (NHW type) is transparently transmitted. |
1 |
RESIZE_TYPE |
Interpolation restoration mode of the pixel image. Currently, only the following two modes are supported: 0: Interpolation restoration is not performed. 1: The nearest neighbor interpolation restoration is performed. |
1 |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
CLASS_NUM |
Total number of inference categories, excluding the background. |
80 |
[0, 100] |
SCORE_THRESH |
Confidence score threshold, which can be adjusted based on service scenarios. |
0.7 |
[0.0, 1.0] |
IOU_THRESH |
IOU threshold, which can be adjusted based on service scenarios. |
0.5 |
[0.0, 1.0] |
RPN_MAX_NUM |
Maximum number of region proposal networks. |
1000 |
[0, 1000] |
MAX_PER_IMG |
Maximum value of the prediction box of each image sorted by confidence. |
128 |
[0, 150] |
MASK_THREAD_BINARY |
Mask threshold of the input RCNN. |
0.5 |
[0.0, 1.0] |
MASK_SHAPE_SIZE |
Mask shape in mask_rcnn. Only a single parameter is supported to indicate a square. |
28 |
[0, 100] |
MODEL_TYPE |
The options are as follows: 0: MindSpore 1: PyTorch |
0 |
None |
SEPARATE_SCORE_THRESH |
Threshold corresponding to each class. |
The number of SCORE_THRESH (threshold) is determined by CLASS_NUM (quantity). The threshold is separated by commas (,). (The number of thresholds is equal to the value of CLASS_NUM.) |
None |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
CLASS_NUM |
Number of classes. |
81 |
[0, 100] |
SCORE_THRESH |
Threshold for determining whether an object is of a certain class. If the value is greater than the threshold, the object is considered as the class. |
0.5 |
[0.0, 1.0] |
IOU_THRESH |
Threshold of the object overlap degree. If the value is greater than the threshold, two object frames correspond to the same object. |
0.6 |
[0.0, 1.0] |
SEPARATE_SCORE_THRESH |
Threshold corresponding to each class. |
The number of SCORE_THRESH (threshold) is determined by CLASS_NUM (quantity). The threshold is separated by commas (,). (The number of thresholds is equal to the value of CLASS_NUM.) |
None |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
KEYPOINT_NUM |
Number of key points, including the background (a background is counted as one). |
19 |
[0, 100] |
FILTER_SIZE |
Length (or width) of the Gaussian filter kernel. |
25 |
[0, 100] |
SIGMA |
Variance of the Gaussian filter kernel. |
3 |
[0, 10] |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
KEYPOINT_NUM |
Number of key points. |
17 |
[0, 20] |
SCORE_THRESH |
Key point threshold. |
0.1 |
[0.0, 1.0] |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
CLASS_NUM |
Number of classes. |
3 |
None |
POST_TYPE |
Model post-processing mode. The value 0 indicates that argmax is performed on the model logits output (NHWC type). The value 1 indicates that the model argmax output (NHW type) is transparently transmitted. |
1 |
[0, 16] |
RESIZE_TYPE |
Interpolation restoration mode of the pixel image. Currently, only the following two modes are supported: 0: Interpolation restoration is not performed. 1: The nearest neighbor interpolation restoration is performed. |
1 |
[0, 16] |
Parameter |
Description |
Default Value |
Value Range |
|---|---|---|---|
CLASS_NUM |
Number of dataset types. (The default number of COCO datasets is 80.) |
80 |
[0, 100] |
MODEL_TYPE |
Model type. Currently, only the TensorFlow model is supported. |
0 |
[0, 100] |
SCORE_THRESH |
Score threshold. |
0.5 |
[0.0, 1.0] |