Request Parameters
Parameter |
Mandatory/Optional |
Parameter Type |
Value |
|---|---|---|---|
Content-Type |
Mandatory |
String |
application/json |
Parameter |
Mandatory/Optional |
Parameter Type |
Description |
|---|---|---|---|
ProjectName |
Mandatory |
String |
Project name. |
TaskName |
Mandatory |
String |
Task name. |
TaskType |
Optional |
String |
Task type. This parameter is mandatory in detection, OCR, and segmentation scenarios.
Component error/missing/reverse scenario: WithReg/WithoutReg Industrial OCR scenario: WithReg Glue detection scenario: WithReg/WithoutReg/SetTemplate Semi-automatic annotation scenario: Annot |
MachineId |
Optional |
String |
Industrial computer ID. This parameter is mandatory when WithReg or SetTemplate is used. |
ProductCode |
Optional |
String |
Code of the product that is being produced. This parameter is mandatory when WithReg or SetTemplate is used. |
CameraID |
Optional |
String |
Camera ID. This parameter is mandatory when WithReg or SetTemplate is used. |
ProductSN |
Optional |
String |
Product SN, which is an empty string by default. |
SerialNumber |
Optional |
String |
Serial number |
ProductName |
Optional |
String |
Product name |
TableName |
Optional |
String |
Production line. This parameter is mandatory when WithReg or SetTemplate is used. |
ROIs |
Optional |
Array of Table 3 objects |
ROI list, which can be left empty. |
CodeType |
Mandatory |
String |
Image encoding format. Supported format: jpg, JPG, jpeg, JPEG, png, PNG, bmp, and BMP |
Patterns |
Optional |
Array of Table 4 objects |
Template for image registration, which is used in the component error/missing/reverse scenarios. This parameter is mandatory in WithReg mode, and the list cannot be empty. |
Files |
Mandatory |
Array of Table 5 objects |
Image list. The size of a single image cannot exceed 20 MB. |
Template |
Optional |
Objects of Table 6 |
This parameter is used when TaskType is set to SetTemplate in the glue detection scenario. |
MatchParams |
Optional |
Objects of Table 7 |
Global matching parameter during the image registration. This parameter is mandatory for the WithReg mode in the component error/missing/reverse and glue detection scenarios. |
RegisterMatrix |
Optional |
Array |
Rotation-translation matrix during the image registration. A 3 x 3 matrix is used in the component error/missing/reverse and glue detection scenarios. It is used to convert the box before registration into the box after registration. That is, the detection coordinates (x', y') multiply the rotation-translation matrix to obtain the coordinates (x, y) in the template coordinate system. The formula is as follows:
The size range of each element in the array is [-100000, 100000]. Important Notes: In WithReg mode, only the RegisterMatrix request can be transferred for glue detection. The following table lists the supported error/missing/reverse detection modes.
|
ExtraParams |
Optional |
Object |
Reserved parameter. |
Parameter |
Mandatory/Optional |
Parameter Type |
Description |
|---|---|---|---|
Type |
Mandatory |
String |
|
X |
Mandatory |
Int, Float |
Value of the X coordinate of the rectangle. Value range: [0,10000]. |
Y |
Mandatory |
Int, Float |
Value of the Y coordinate of the rectangle. Value range: [0,10000]. |
Width |
Mandatory |
Int, Float |
Width of the rectangle. Value range: [0,10000]. |
Height |
Mandatory |
Int, Float |
Height of the rectangle. Value range: [0,10000]. |
Parameter |
Mandatory/Optional |
Parameter Type |
Description |
|---|---|---|---|
X |
Mandatory |
Int, Float |
Value of the X coordinate of the rectangle. Value range: [0,10000]. |
Y |
Mandatory |
Int, Float |
Value of the Y coordinate of the rectangle. Value range: [0,10000]. |
Width |
Mandatory |
Int, Float |
Width of the rectangle. Value range: [0,10000]. |
Height |
Mandatory |
Int, Float |
Height of the rectangle. Value range: [0,10000]. |
Label |
Mandatory |
String |
Template type. |
detail_label |
Optional |
String |
Secondary classification type. In the det_cls scenario, if the secondary classification type needs to be verified, the value of detail_label cannot be left blank. |
num_match |
Optional |
Integer |
Number of matched bounding boxes in the ROI. The value range is [1,5], and the recommended value is 1. |
overlap_metric |
Optional |
String |
Overlapping matching algorithm between the template frame and bounding box. The value can be IOU (recommended), IOMax, and IOMin. |
overlap_thresh |
Optional |
Float |
Overlapping threshold. The value range is [0,1], and the recommended value is 0.3. |
conf_thresh |
Optional |
Float |
Confidence threshold. The value range is [0,1], and the recommended value is 0.5. |
result |
Optional |
String |
This parameter does not need to be carried in the request. In WithReg mode, the registration result of the bounding box is returned. The value can be OK or NG. |
Parameter |
Mandatory/Optional |
Parameter Type |
Description |
|---|---|---|---|
FileName |
Mandatory |
String |
Image name. |
ImageData |
Mandatory |
String |
Base64-encoded image. |
Content |
Optional |
Objects of Table 11 |
It is mandatory in the semiconductor quality inspection scenario. |
Parameter |
Mandatory/Optional |
Parameter Type |
Description |
|---|---|---|---|
BlobMask |
Mandatory |
String |
Base64 code of the template image. |
CodeType |
Mandatory |
String |
Image format. Supported format: jpg, JPG, jpeg, JPEG, png, PNG, bmp, and BMP |
Blobs |
Mandatory |
Array of Table 8 objects |
Blob information contained in the template. |
SelectBlobs |
Mandatory |
Array |
ID of the Blob selected in the template. |
Parameter |
Mandatory/Optional |
Parameter Type |
Description |
|---|---|---|---|
global_thresh |
Optional |
Objects. Table 9 |
Global matching parameter. |
label_spec_thresh |
Optional |
Array. Objects (Table 10) |
Matching parameter corresponding to a category. |
reg_params |
Optional |
Objects. Table 12 |
The system provides advanced registration parameters. |
Parameter |
Mandatory/Optional |
Parameter Type |
Description |
|---|---|---|---|
Area |
Mandatory |
Integer |
Area of a split region. Value range: [1,100000000]. |
ID |
Mandatory |
Integer |
Pixel point ID in the split region. Value range: [1,100]. |
Label |
Mandatory |
String |
Category of a split region. |
Overlap |
Optional |
Float |
Overlap degree between the returned Blob and the template in WithReg mode. Value range: [0,1]. |
result |
Optional |
String |
Matching result of the Blob returned in WithReg mode and the template. The value can be OK or NG. |
Parameter |
Mandatory/Optional |
Parameter Type |
Description |
|---|---|---|---|
conf_thresh |
Mandatory |
Float |
Global confidence threshold. The value range is [0,1], and the recommended value is 0.5. |
overlap_thresh |
Mandatory |
Float |
Global overlapping threshold. The value range is [0,1], and the recommended value is 0.3. |
overlap_metric |
Mandatory |
String |
Global overlapping matching algorithm. The value can be IOU (recommended), IOMax, and IOMin. |
Parameter |
Mandatory/Optional |
Parameter Type |
Description |
|---|---|---|---|
conf_thresh |
Mandatory |
Float |
Confidence threshold of a single category. The value range is [0,1], and the recommended value is 0.5. |
overlap_thresh |
Mandatory |
Float |
Overlapping threshold of a single category. The value range is [0,1], and the recommended value is 0.3. |
overlap_metric |
Mandatory |
String |
Overlapping matching algorithm of a single category. The value can be IOU (recommended), IOMax, and IOMin. |
Label |
Mandatory |
String |
Category. |
Parameter |
Mandatory/Optional |
Parameter Type |
Description |
|---|---|---|---|
x_img |
Mandatory |
Float |
X coordinate. Value range: [0,100000] |
y_img |
Mandatory |
Float |
Y coordinate. Value range: [0,100000] |
setup_id |
Mandatory |
String |
Encapsulation layer type. |
device |
Mandatory |
String |
Chip model. |
station_name |
Mandatory |
String |
Device information. |
deviceshort |
Mandatory |
String |
Device product name. |
Parameter |
Mandatory/Optional |
Parameter Type |
Data Constraint |
Example |
Description |
|---|---|---|---|---|---|
iou_thre |
Optional |
Float |
(0,1] |
0.5 |
IOU threshold of a paired detections. |
transform_guess |
Optional |
Array |
The array size must be 3 x 3. The size range of each element in the array is [-100000,100000], and the element in position 3 x 3 cannot be 0. |
[[1, 0, 0], [0, 1, 0], [0, 0, 1]] |
Initialized rotation offset matrix estimation. |
search_angle_range |
Optional |
Array |
An array with a maximum of 50 elements. The value range of each element is [-180,180]. |
[0, 45, -45, 180, -90, -90, 135, -135] |
Search range of the rotation angle. |
transform_type |
Optional |
String |
rigid, affine, or perspective. |
rigid |
Transformation type. By default, the transformation type is selected based on the number of targets. The default transformation type is affine transformation. If the number of matching points is less than 3, the transformation type is degraded to rigid transformation. Optional: rigid, affine, or perspective. |
extension_ratio |
Optional |
Float |
[0, 100] |
1 |
Extension ratio. |
