Shape template matching

Function: Based on the shape of the template matching, the template image extraction gradient and other information are rotated and scaled to obtain features, and the test map is matched to obtain scores, angles, scaling, and other results.

Input Parameters:

Name Type Valid Range Default Value Meaning

Image

ColorImage

None

None

Input image, requires a color image with RGB channels.

Output Parameters:

Name Type Valid Range Default Value Meaning

Detection results

DetectInstance

None

{}

Returns bounding boxes, categories, scores and polygon.

Parameter Settings:

Name Type Valid Range Default Value Meaning

Force training

Bool

None

True

After enabling, the template will be retrained according to the parameters.

Blueprint image

File

['.png', '.jpg', '.tif', '.jpeg']

None

Model picture.

Template generation path

String

None

None

Detection threshold.

Template name

String

None

template

The template name is used to distinguish between different templates, and will be generated and found according to the name to match the template.

Enable zooming

Bool

[True, False]

False

Whether the image is scaled, for images with high resolution, direct training may lead to long time, or too many details to match the result, and the image needs to be scaled before training and testing.

Zoom scale

Float

[0.1, 1.5]

0.7

Scale before image training test.

Zoom extents

List

None

[0.8, 1.2]

Image training zoom range.

Scale steps

Float

[0.01, 1.2]

0.1

The zoom step size during image training, the smaller the size, the easier it is to match, but the smaller the size, the more time-consuming it is.

Rotation angle range

List

None

[0, 360]

Rotation angle range.

Rotation angle step

Float

[0.0, 60]

1

Rotation angle step.

Number of feature points

Integer

[0, 1000]

75

The number of feature points matched, the more the slower.

Image pyramid hierarchy

List

None

[4, 8]

Represents the proportion of the image pyramid, which is a power of 2. The smaller the matching pixel, the higher the accuracy, and the more time-consuming it is.

Scoring threshold

Float

[0, 100]

80

Results with low scores will be filtered based on this value.

NMS threshold

Float

[0.0, 1.0]

0.3

Results with large overlap will be filtered based on this value.

Extra class name

String

['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29']

0

You can set the category name according to the scene to perform operations such as filtering.