An image detection method, a vertex registration method, and a storage medium.

By using a graph matching algorithm to match labeled vertices in sample images within the information search range of a standard template, calculating transformation relationships and inferring information about unlabeled vertices, the problem of identifying occluded objects and extreme scales in object detection networks is solved, achieving efficient and accurate vertex registration.

CN115457092BActive Publication Date: 2026-04-03SHENZHEN HUAHAN WEIYE TECH
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-01
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing convolutional neural networks for object detection face challenges in recognizing occluded objects, extreme scales, and object orientation. Existing methods may increase computational or annotation workloads and lack sufficient detection accuracy.

Method used

A vertex registration method based on graph matching is adopted. By obtaining the standard template and information search range of the target object, the graph matching algorithm is used to match the labeled vertices in the sample image within the information search range of the standard template, calculate the transformation relationship and infer the position and angle information of the unlabeled vertices, and construct a convolutional neural network for training.

Benefits of technology

It improves the accuracy and stability of vertex registration, reduces computational complexity and manual annotation workload, and increases the speed and accuracy of vertex registration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115457092B_ABST
    Figure CN115457092B_ABST
Patent Text Reader

Abstract

This application relates to an image detection method, a vertex registration method, and a storage medium. The image detection method includes: acquiring a vertex detection model of a target object; using the vertex detection model to perform local feature detection processing on the image to be detected of the target object, obtaining several vertices on the target object; and outputting several vertices on the target object, each vertex having one or more of the following information: position coordinates, category, bounding rectangle, and enclosing rectangle. In this technical solution, when acquiring the vertex detection model, pre-registration processing is performed on each vertex of the sample images participating in network training, which helps to enhance the image detection performance of the model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, specifically to an image detection method, a vertex registration method, and a storage medium.

[0002] This case is a divisional application based on the parent application (CN202110740635.5, 2021-07-01, A vertex registration method and apparatus based on graph matching, and storage medium). Background Technology

[0003] In recent years, artificial intelligence and big data have become the focus of attention in various fields both domestically and internationally. In the field of computer vision, deep learning-based image algorithms have wide applications. Using the one-to-one correspondence between images and labeled information to train convolutional neural networks, tasks such as classification, object detection, and semantic segmentation can be performed. Among these, object detection convolutional neural networks have numerous industrial applications, such as the identification and counting of products on assembly lines.

[0004] Convolutional neural networks (CNNs) for object detection still face many challenges, such as recognizing occluded objects and identifying objects of extreme scale and shape. Furthermore, accurate orientation recognition of objects is a major requirement in industrial machine vision. Existing deep learning-based object detection algorithms include YOLO, SSD, and RCNN. These algorithms build CNNs (Convolutional Neural Networks) and train them with labeled data. After training, the input image is fed into the CNN, which outputs a feature map. The detection result is obtained by calculating the feature map, such as the type of object, the center coordinates of the circumscribed rectangle, and its length and width.

[0005] In existing applications, identifying occluded objects is one of the challenges in object detection. Firstly, techniques for optimizing occluded object detection include: enhancing the training set images, such as randomly covering a portion of the object to be detected with noise, or randomly setting a portion of the object's pixels to a fixed value (e.g., 0). The drawback of this method is that it may introduce excessive noise into the training data, making convergence of the object detection model more difficult. Furthermore, the processing of the training data may not be the same as real-world occlusion, potentially leading to incorrect detection results. Secondly, methods for optimizing multi-scale detection include: feature pyramids, which fuse feature maps of different scales to obtain multiple feature maps with different receptive fields, and then perform classification and bounding box regression on these feature maps separately to obtain the results. The drawback of this method is increased computational cost, and the aspect ratio of the object to be identified needs to be within a moderate range (generally between 1:3 and 3:1), making it difficult to detect objects with extreme aspect ratios. The three methods for identifying object orientation are: adding one or more angle regression values ​​to the existing object detection network and fitting the data with the training data to identify the object orientation; the disadvantage of this method is that it requires additional angle annotation during labeling, which increases the workload of annotation, and the addition of angle regression increases the training difficulty. Summary of the Invention

[0006] The main technical problem addressed in this application is how to accurately register vertices on a target object. To solve the above technical problem, this application provides a vertex registration method, apparatus, and storage medium based on graph matching.

[0007] According to a first aspect, one embodiment provides a vertex registration method based on graph matching, comprising: obtaining a standard template of a standard object corresponding to a target object and an information search range of the standard template; the standard template includes position information, angle information, and category information of all vertices on the standard object, wherein the vertices are used to characterize a local feature of the object surface; the information search range is used to set a detection range for angle, position, and distance scaling; obtaining at least one sample image of the target object in an image dataset; the sample image includes position information, angle information, and category information of some labeled vertices on the target object; matching some labeled vertices in the sample image within the information search range of the standard template using a preset graph matching algorithm to obtain a vertex matching result; calculating the transformation relationship of the target object in the sample image relative to the standard object in the standard template based on the vertex matching result; inferring the position information, angle information, and category information of the remaining unlabeled vertices in the sample image based on the transformation relationship; and registering each vertex of the target object in the sample image using some labeled vertices and the remaining unlabeled vertices in the sample image.

[0008] The step of matching some labeled vertices in the sample image using a preset graph matching algorithm within the information search range of the standard template to obtain vertex matching results includes: forming a set of vertices to be detected using some labeled vertices in the sample image; calculating the positional change relationship between any two vertices in the set of vertices to be detected and any two vertices in the standard template; constructing the connection relationship between vertices in the set of vertices to be detected; comparing the connection relationship between each vertex in the set of vertices to be detected and other vertices; and adding the vertex and other vertices whose connection relationship meets the preset screening conditions to the vertex set X. h In, and to determine a relationship of change. The vertex set X h The transformation relationships and definite transformation relationships corresponding to each vertex in the middle. The vertex set X is determined through comparison and voting. h The process involves identifying several vertices that match the standard template and using the correspondence between these matching vertices and their corresponding vertices in the standard template to obtain the vertex matching result.

[0009] The step of calculating the positional relationship between any two vertices in the vertex set to be detected and any two vertices in the standard template, and constructing the connection relationship between vertices in the vertex set to be detected, includes: for any two vertices k and l in the vertex set to be detected and any two vertices i and j in the standard template, calculating the positional relationship between vertex k and vertex l and representing it as β. kl Calculate the positional relationship between vertex i and vertex j and represent it as β. ij If vertex i and vertex k have the same category information, and vertex j and vertex l have the same category information, then calculate the positional relationship β. ij Relative to positional relationship β kl The relationship of change is expressed as δ ij-kl The change relationship is used to characterize the angular offset and distance scaling of the relative transformation; the change relationship δ is determined. ij-kl If the vertex is within the information search range of the standard template, then construct the connection relationship between vertex k and vertex l in the vertex set to be detected and use γ. kl This indicates that the information search range includes a detection range for angle α, coordinate x, coordinate y, and distance scaling.

[0010] The process involves comparing the connectivity between each vertex in the set of vertices to be detected and all other vertices, and then adding that vertex and other vertices whose connectivity matches the preset filtering criteria to the vertex set X. h In, and to determine a relationship of change. This includes: determining if there are connections between vertices in the set of vertices to be detected, and then storing all vertices in the set of vertices to be detected into stack S. t From the stack S t Pop each vertex from the stack in sequence and label it as vertex h, and construct the vertex set X in sequence. h Add vertex h to vertex set X h ; Traverse the set of vertices to be detected that have connections with vertex h, vote to determine one of the connections and obtain the corresponding change relationship. And using other vertices connected to vertex h to form a candidate vertex set P; for each vertex o in the candidate vertex set P, obtain the connection relationship and corresponding change relationship between vertex o and each vertex in the vertex set to be detected, and if it is determined that vertex o is connected to the vertex set X h The change relation corresponding to the connection relationship of any vertex in the equation is equal to the change relation. Then vertex o is temporarily added to the vertex set X. h In the middle; then obtain the vertex set X. h New internal connections between internal vertices in and each internal vertex and the vertex set X h New external connections between external vertices out Determine the newly added internal connection relationship. in Is the number of external connections less than the number of newly added external connections? out When the number is such that vertex o is removed from the vertex set X, h Otherwise, the newly added external connection relationship will be... out Another vertex associated with vertex o is also added to the candidate vertex set P; traverse all vertices in the candidate vertex set P and update the vertex set X. h Output the final vertex set X. h and definite relationship of change

[0011] The vertex set X h The transformation relationships and definite transformation relationships corresponding to each vertex in the middle. The vertex set X is determined through comparison and voting. h The process involves identifying several vertices that match the standard template, including: obtaining the vertex set X. h The connection relationships and corresponding changes between vertex h and all other vertices; if the change relationship between vertex h and any other vertex is equal to the change relationship... Then, the connection relationship is marked as the first value; a vote is performed on the vertices whose connection relationship is marked as the first value to obtain the voting results of each vertex in the vertex set, and several vertices that match the standard template are determined based on the voting results.

[0012] The step of obtaining the standard template of the standard object corresponding to the target object and the information search range of the standard template includes: obtaining a standard image of the standard object corresponding to the target object, and obtaining the annotation information of all vertices on the standard object in the standard image; generating the standard template based on the annotation information of all vertices on the standard object; the annotation information includes the position information, angle information and category information of each vertex on the standard object; obtaining the reference direction and rotation center point configured for the standard template, and the maximum change of the angle, position and distance scaling scale configured for the standard template; setting the detection range of the angle, position and distance scaling scale based on the configured reference direction, rotation center point and the maximum change of the angle, position and distance scaling scale, thereby forming the information search range of the standard template.

[0013] After registering each vertex of the target object in the sample image, the method further includes: constructing a deep learning-based convolutional neural network; training the convolutional neural network using the sample image after vertex registration until the loss function corresponding to the convolutional neural network converges; using the trained convolutional neural network as a vertex detection model; the vertex detection model is used to perform local feature detection processing on the image to be detected of the target object to obtain several vertices on the target object.

[0014] According to a second aspect, one embodiment provides an image processing apparatus, comprising: a storage unit storing a standard template of a standard object corresponding to a target object and an information search range of the standard template, and storing an image dataset; the standard template includes position information, angle information, and category information of all vertices on the standard object, wherein the vertices are used to characterize a local feature of the object surface; the information search range is used to set a detection range for angle, position, and distance scaling; the image dataset includes at least one sample image of the target object, wherein the sample image includes position information, angle information, and category information of partially labeled vertices on the target object; and an acquisition unit for acquiring the standard template corresponding to the target object from the storage unit. The system includes a standard template for the target object and the information search range of the standard template, and acquires at least one sample image of the target object from the image dataset; a processing unit is configured to match some labeled vertices in the sample image within the information search range of the standard template using a preset graph matching algorithm to obtain vertex matching results, calculate the transformation relationship of the target object in the sample image relative to the standard object in the standard template based on the vertex matching results; and infer the position information, angle information, and category information of the remaining unlabeled vertices in the sample image based on the transformation relationship, and register each vertex of the target object in the sample image using some labeled vertices and the remaining unlabeled vertices in the sample image.

[0015] The processing unit, when executing the preset graph matching algorithm, includes the following steps: forming a set of vertices to be detected using some labeled vertices in the sample image; calculating the positional relationship between any two vertices in the set of vertices to be detected and any two vertices in the standard template; constructing the connection relationship between vertices in the set of vertices to be detected; comparing the connection relationship between each vertex in the set of vertices to be detected and all other vertices; and adding the vertex and other vertices whose connection relationship meets the preset screening conditions to the vertex set X. h In, and to determine a relationship of change. The vertex set X h The transformation relationships and definite transformation relationships corresponding to each vertex in the middle. The vertex set X is determined through comparison and voting. h The process involves identifying several vertices that match the standard template and using the correspondence between these matching vertices and their corresponding vertices in the standard template to obtain the vertex matching result.

[0016] According to a third aspect, one embodiment provides a computer-readable storage medium storing a program that can be executed by a processor to implement the vertex registration method as described in the first aspect above.

[0017] The beneficial effects of this application are:

[0018] According to the above embodiments, a vertex registration method, apparatus, and storage medium based on graph matching are disclosed. The vertex registration method includes: obtaining a standard template of a standard object corresponding to a target object and an information search range of the standard template; matching some labeled vertices in a sample image within the information search range of the standard template using a preset graph matching algorithm to obtain vertex matching results; calculating the transformation relationship between the target object in the sample image and the standard object in the standard template based on the vertex matching results; inferring the position information, angle information, and category information of the remaining unlabeled vertices in the sample image based on the transformation relationship; and registering each vertex of the target object in the sample image using some labeled vertices and the remaining unlabeled vertices in the sample image. Firstly, by matching some labeled vertices in the sample image within the information search range of the standard template using a graph matching algorithm, the vertex matching problem is transformed into a graph matching algorithm to improve the accuracy and stability of subsequent registration. Furthermore, by calculating the positional relationships between vertices, appropriate vertices are selected, reducing computational complexity and improving algorithm efficiency. Secondly, the technical solution infers the positional, angle, and category information of the remaining unlabeled vertices in the sample image based on the transformation relationship between the target object in the sample image and the standard object in the standard template. Therefore, the remaining unlabeled vertices can be inferred using only a small number of labeled vertices, significantly reducing the workload of manual annotation of the sample image. Thirdly, since information on some labeled vertices and the remaining unlabeled vertices in the sample image can be obtained, the vertices of the target object in the sample image can be registered based on this vertex information, thereby improving both the speed and accuracy of vertex registration.

[0019] To obtain vertex matching results for some labeled vertices in a sample image, the technical solution proposes a graph matching algorithm to match some labeled vertices within the information search range of a standard template. This transforms the vertex matching problem into a graph matching problem for solution and calculation, thereby realizing the correspondence between some labeled vertices and vertices in the standard template. With the partial correspondence of vertices obtained, it is convenient to calculate the corresponding transformation matrix based on the correspondence, thereby inferring and identifying the remaining vertices on the target object through this transformation relationship, and finally completing the registration of each vertex on the target object. Attached Figure Description

[0020] Figure 1This is a flowchart of the vertex registration method based on graph matching in this application;

[0021] Figure 2 A flowchart for obtaining vertex matching results;

[0022] Figure 3 A schematic diagram illustrating the setting of vertices on the dial to be tested;

[0023] Figure 4 A diagram illustrating the creation of a standard template for a watch face;

[0024] Figure 5 This is a schematic diagram of the vertices and connections of a standard template;

[0025] Figure 6 Let X be the set of vertices. h A diagram illustrating the vertices and their connections;

[0026] Figure 7 A schematic diagram illustrating the principle of counting and voting;

[0027] Figure 8 A flowchart for obtaining complete vertex annotation information and vertex registration;

[0028] Figure 9 A flowchart for establishing a vertex detection model;

[0029] Figure 10 This is a schematic diagram of the vertex detection model.

[0030] Figure 11 This is a schematic diagram of the image processing apparatus in this application;

[0031] Figure 12 This is a schematic diagram of the image processing device in another embodiment. Detailed Implementation

[0032] The present application will now be described in further detail with reference to the accompanying drawings and specific embodiments. Similar elements in different embodiments are referred to by related similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of the present application. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to the present application are not shown or described in the specification. This is to avoid obscuring the core parts of the present application with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.

[0033] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.

[0034] The serial numbers assigned to components in this document, such as "first" and "second," are used only to distinguish the described objects and have no sequential or technical meaning. The terms "connection" and "linkage" used in this application, unless otherwise specified, include both direct and indirect connections (linkages).

[0035] In many industrial production processes, the shape of the target object to be inspected is relatively fixed. In such cases, these shape changes can be approximated as affine transformations. This situation often occurs in the inspection of standardized products such as metal parts and plastic casings. A complete target object can be divided into several feature vertices, hereinafter referred to as vertices (these vertices need to be set as local regions that can better reflect the characteristics of the object to be inspected). The set of multiple vertices is called a template. By detecting each vertex, the entire template can be inspected; that is, by detecting the local parts of the target object, the entire target object can be inspected.

[0036] The technical solution of this application will be specifically described below with reference to the embodiments.

[0037] Example 1

[0038] Please refer to Figure 1 This application discloses a vertex registration method based on graph matching, which includes steps 110-150, which are described below.

[0039] Step 110: Obtain the standard template of the standard object corresponding to the target object, and the information search range of the standard template. The target object here can be a product on an industrial assembly line, a mechanical part in a container, or a tool on an operating table. Such target objects may have partial occlusion, surface damage, or abnormal shape in certain scenarios, which can make it difficult to detect the surface features of the target object. The standard object corresponding to the target object is a target object without occlusion, surface defects, deformation, and normal posture. The standard object has relatively complete surface features. If these surface features are represented by feature vertices, then the standard template of the standard object is the set of these vertex information.

[0040] Here, the standard template can include the position, angle, and category information of all vertices on the standard object, where each vertex is a local feature representing the object's surface. Furthermore, the search range of the standard template is used to set the detection range for angle, position, and distance scaling. It should be noted that for any target object or its corresponding standard object, its surface local features include, but are not limited to: convex and concave shapes that characterize the object's core features, printed patterns that characterize the object's core features, etc.; once a certain type of local feature is selected, all vertices belonging to that type of local feature must be labeled. It is understandable that each vertex includes at least the following two pieces of information: the vertex's x and y coordinates (i.e., the vertex's coordinates) and the category of the local feature it represents (i.e., the vertex's category). Of course, in addition to these two pieces of information, other information can be added to speed up subsequent matching. Generally, the optional information includes: the minimum bounding rectangle of the local feature (i.e., the vertex's bounding rectangle, whose information may include the rectangle's center point, length, and width, and can refer to a standard rectangle with rotation angles), and the outer rectangle of the local feature (i.e., the vertex's outer rectangle, whose information may include the rectangle's center point, length, width, and direction, and can refer to a standard rectangle without rotation angles). It is understandable that since each vertex on an object represents a local feature, and local features have a clear category, precise location, relative rotation angle, and area size within the entire object image, vertices can be described using specific numerical values ​​such as angle, location, category, and rectangle.

[0041] In one specific embodiment, the standard template and information search range for a standard object can be obtained through the following method:

[0042] (1) Obtain a standard image of the standard object corresponding to the target object from the camera device, and obtain the annotation information of all vertices on the standard object in the standard image. Generate a standard template based on the annotation information of all vertices on the standard object. Here, the annotation information of all vertices on the standard object can be generated manually. The annotation information includes the position information, angle information and category information of each vertex on the standard object. Of course, the annotation information can also include values ​​such as the vertex bounding rectangle and the vertex enclosing rectangle.

[0043] (2) Obtain the reference direction and rotation center point configured for the standard template, as well as the maximum change in the angle, position, and distance scaling scale configured for the standard template; set the detection range of the angle, position, and distance scaling scale according to the configured reference direction, rotation center point, and the maximum change in the angle, position, and distance scaling scale, thereby forming the information search range of the standard template.

[0044] for example Figure 3 and Figure 4The watch face to be detected serves as the standard object corresponding to the target object. Some significant local features on watch face 1 are labeled, such as vertex A1 at the center of the large watch face, vertices A2 and A4 at the center of the small watch face, and vertex A3 at the edge numbers of the small watch face. Using this vertex labeling information, a simple standard template can be generated. See details... Figure 4 A1-A2-A3-A4 in; Figure 4 In this example, the reference direction of the standard template is L1, and the rotation center point is L0. Since the same vertex displays different shapes in images of different sizes and rotation directions, adjustments to the vertex shape are necessary for matching. These adjustments include not only the vertex's own angular and positional offsets but also the scaling of the distance between the vertex and another vertex. The information search range here indicates that standard templates that transform within this range can be detected, while those outside this range cannot.

[0045] Step 120: Obtain at least one sample image of the target object from the image dataset; the sample image includes the position information, angle information, and category information of the labeled vertices on the upper part of the target object. The image dataset here can be a user-provided training dataset containing images and annotation information of the target object.

[0046] It should be noted that although the image dataset contains some sample images of the target object, these sample images need to be annotated with a large number of vertices before they can be used for training some detection models. The process of annotating the sample images can begin by annotating a small number of vertices, and then using steps 130-140 below to infer the remaining unannotated vertices. This way, the annotation information for most vertices can be obtained, which can greatly reduce the workload of manual annotation.

[0047] Step 130: Match some labeled vertices in the sample image using a preset graph matching algorithm within the information search range of the standard template to obtain vertex matching results.

[0048] In this embodiment, see Figure 2 Step 130 above may include steps 131-134, which are explained below.

[0049] Step 131: Use some labeled vertices in the sample image to form a set of vertices to be detected, calculate the positional change relationship between any two vertices in the set of vertices to be detected and any two vertices in the standard template, and construct the connection relationship between vertices in the set of vertices to be detected.

[0050] Since the standard template is pre-constructed, the vertex {v} in the standard template can be obtained. iGiven a set of vertices {p} (i = 1, 2, ..., N1) and the connection relationships between them, then given a set of vertices to be detected {p} i In the case of} (i = 1, 2, ..., N2), the problem to be solved is the correspondence between the two. Here, in order to quickly solve the correspondence, the vertex matching problem is transformed into a graph matching problem for solution and calculation.

[0051] In one specific embodiment, step 131 specifically includes the following process:

[0052] (1) For the set of vertices to be detected, P = {p i Any two vertices k and l in}, and the standard template V = {v i Given any two vertices i and j in}, calculate the positional relationship between vertices k and l and represent it as β. kl Calculate the positional relationship between vertex i and vertex j and represent it as β. ij .

[0053] (2) Obtain the detection range of angle α, coordinate x, coordinate y and distance scaling scale (which can be set by the user), thereby setting the information search range of the standard template, which can be represented as Ω.

[0054] (3) Determine the category of the vertices. If the category information of vertex i and vertex k is the same, and the category information of vertex j and vertex l is the same, then calculate the positional relationship β. ij Relative to positional relationship β kl The relationship of change is expressed as δ ij-kl The relationship of change here is δ ij-kl The angular offset and distance scaling used to characterize relative transformation, i.e., positional relationship β ij Transform to positional relationship β kl The required angular offset, and vertex v i —v j Distance transformation between vertices v k —v l The distance scaling required between them.

[0055] (4) Determine the relationship of change δ ij-kl Is it within the information search range Ω of the standard template? If so, it means δ ij-kl If ∈Ω, then construct the connection relationship between vertex k and vertex l in the vertex set to be detected and use γ kl This indicates that, as the information search range Ω includes a detection range with angle α, coordinate x, coordinate y, and distance scaling, when the transformation relationship δ... ij-klThe connection between vertex k and vertex l in the set of vertices to be detected is constructed only when all the information in the set satisfies the corresponding detection range. This indicates that vertex k and vertex l may be transformed from vertex i and vertex j through a certain transformation method. In this case, vertex k and vertex l can be said to form an edge of the graph and have a connection relationship.

[0056] Step 132: Compare the connectivity between each vertex in the vertex set to be detected and all other vertices, and add the vertex and other vertices whose connectivity meets the preset filtering criteria to the vertex set X. h In, and to determine a relationship of change.

[0057] In one specific embodiment, step 132 specifically includes the following process:

[0058] (1) If it is determined that there are connections between vertices in the set of vertices to be detected, then all vertices in the set of vertices to be detected are stored in stack S. t In other words, all vertices to be detected are pushed onto the stack, and the stack can be denoted as S. t .

[0059] (2) From stack S t Pop each vertex from the stack in sequence and label it as vertex h, and construct the vertex set X in sequence. h Add vertex h to vertex set X h Because a new vertex set X was created. h Then vertex h can be added to vertex set X. h .

[0060] It should be noted that in the vertex set X h In the middle, the vertex set X h The connection between internal vertices is called the internal connectivity. in , set the vertex set X h The connection between an internal vertex and any vertex outside the set is called an external connectivity. out Of course, if multiple internal points are connected to the same point outside the vertex set, the external connection is counted only once.

[0061] (3) Traverse the set of vertices to be detected that have a connection relationship with vertex h, vote to determine one of the connection relationships and obtain the corresponding change relationship. And use other vertices that are connected to vertex h to form a candidate point set P, that is, add all vertices that are connected to vertex h to the candidate point set P.

[0062] It is understandable that, since each vertex connected to h stores a transformation relationship (including angular offset and distance scaling), calculating the mode of the transformation relationships can achieve voting to determine the transformation relationships. The process. Furthermore, for the initial vertex set X... h There is only one vertex, and the internal edges are empty.

[0063] (4) For each vertex o in the candidate vertex set P, obtain the connection relationship and corresponding change relationship between vertex o and each vertex in the vertex set to be detected. If the vertex o and vertex set X are judged... h The change relation corresponding to the connection relationship of any vertex in the equation is equal to the change relation. Then temporarily add vertex o to vertex set X. h Next, obtain the vertex set X. h New internal connections between internal vertices in and the internal vertices and vertex set X h New external connections between external vertices out Then we can determine the newly added internal connection relationship. in Is the number of external connections less than the number of newly added external connections? out When the number of vertexes is such that vertex o is removed from vertex set X, h Otherwise, the newly added external connection relationship will be... out The vertices associated with vertex o are also added to the candidate vertex set P.

[0064] It is understandable to add vertex o to the vertex set X. h Afterwards, you can view the newly added internal connections. in And newly added external connections l out To determine the number, if a new internal connection is added... in More than newly added external connections out If candidate vertex o meets the requirements, the newly added vertex will be added to the vertex set X. h If the newly added internal connection l in Smaller than the newly added external connection l out If not, then it does not meet the requirements and candidate vertex o should be removed from vertex set X. h Remove from the middle.

[0065] (5) Traverse all vertices in the candidate vertex set P and update the vertex set X. h That is, repeatedly perform step (4) until the candidate point set P becomes empty, then output the final vertex set X. h and definite relationship of change

[0066] It's understandable that the above is from stack S. t Pop a vertex h from the stack and form a vertex set X. h and definite relationship of change So next we need to work from stack S t Pop the next vertex from the stack and perform similar calculations until stack S is reached. t It becomes empty.

[0067] Step 133, set the vertex set X h The transformation relationships and definite transformation relationships corresponding to each vertex in the middle. The vertex set X is determined through comparison and voting. h Several vertices that match the standard template.

[0068] In one specific embodiment, step 133 specifically includes the following process:

[0069] (1) For a vertex h, obtain the vertex set X. h The connection relationships and corresponding changes between the middle vertex h and the other vertices.

[0070] (2) If the change relationship between vertex h and any other vertex is equal to the change relationship Then mark the connection as the first value, for example, set it to 1.

[0071] (3) Count and vote on the vertices whose connection relationship is marked as the first value, obtain the voting results of each vertex in the vertex set, and determine several vertices that match the standard template based on the voting results.

[0072] See Figure 5 and Figure 6 The standard template has vertices UVW, and the lines connecting three vertices form a connection relationship; vertex set X h Let there be vertices EFHG, and the lines connecting the four vertices form a connection. Then, we can obtain the vertex set X in Table 1 below. h The correspondence and transformation relationship between the template and the standard template.

[0073] Table 1 Vertex Set X h Correspondence and variation with standard templates

[0074] WU WV HE <![CDATA[δ WU~HE ]]> <![CDATA[δ WV~HE ]]> HF <![CDATA[δ WU~HF ]]> <![CDATA[δ WV~HF <!-- 8 -->]]> HG <![CDATA[δ WU~HG ]]> <![CDATA[δ WV~HG ]]>

[0075] Regarding the changes in Table 1, if the changes are equal to... If the condition is set to 1 and not satisfied, set it to 0, then the marking results in Table 2 will be obtained.

[0076] Table 2 shows the numerical labels of the change relationships.

[0077] WU WV HE 1 0 HF 0 1 HG 0 0

[0078] Based on Table 2, we can count and vote for each vertex. The number of votes for vertices of different categories is set to -1. Then we have the counting and voting results in Table 3.

[0079] Table 3 Counting Voting Results

[0080] U V W E 1 0 -1 F 0 1 -1 G 0 0 0 H -1 -1 2

[0081] The counting and voting results in Table 3 are used... Figure 7 A more intuitive representation would show that vertices E and U have 1 vote, vertices F and V have 1 vote, and vertices H and W have 2 votes. Therefore, we can conclude that vertices E and U match, vertices F and V match, and vertices H and W also match.

[0082] Step 134: Obtain the vertex matching result by using the correspondence between the matched vertices and the corresponding vertices in the standard template.

[0083] It's understandable; what can be confirmed is the vertex set X. h There is some correspondence between it and the standard template, but the vertex set X is unknown. h Which vertices in the set X correspond to which vertices in the standard template? A counting and voting algorithm is used to solve this problem, thus obtaining the vertex set X. h The correspondence between the vertices of a given template and the vertices of the standard template is called the vertex matching result, which can be represented as F1.

[0084] It is understandable that, by matching some labeled vertices in the sample image within the information search range of the standard template using a graph matching algorithm, the vertex matching problem is not only transformed into a graph matching algorithm to improve the accuracy and stability of subsequent registration, but also appropriate vertices are selected by calculating the positional relationships between vertices, thereby reducing computational complexity and improving the algorithm's running efficiency.

[0085] Step 140: Calculate the transformation relationship between the target object in the sample image and the standard object in the standard template based on the vertex matching results, and infer the position information, angle information and category information of the remaining unlabeled vertices in the sample image based on the transformation relationship.

[0086] It should be noted that, since the vertex set X is obtained... hBy establishing the correspondence between the vertices of the sample image and the vertices of the standard template, we can determine the angular offset and distance scaling required to transform the standard object in the standard template into the target object in the sample image. This establishes the transformation relationship between the target object in the sample image and the standard object in the standard template. Since some labeled vertices in the sample image can match some vertices in the standard template, the unlabeled vertices in the sample image can also match the remaining vertices in the standard template. Thus, we can infer the position, angle, and category information of the remaining unlabeled vertices in the sample image.

[0087] It is understandable that the position, angle and category information of the remaining unlabeled vertices in the sample image are inferred based on the transformation relationship between the target object in the sample image and the standard object in the standard template. Thus, the remaining unlabeled vertices can be inferred with only a few labeled vertices, which greatly reduces the workload of manual annotation of sample images.

[0088] Step 150: Using some labeled vertices in the sample image and the remaining unlabeled vertices in the sample image, register each vertex of the target object in the sample image. It can be understood that since we have obtained information about some labeled vertices in the sample image, as well as information about the remaining unlabeled vertices, it is equivalent to obtaining information about each vertex of the target object in the sample image, thus achieving the registration of each vertex.

[0089] It is understandable that since information about some labeled vertices and the remaining unlabeled vertices in the sample image can be obtained, the vertices of the target object in the sample image can be registered based on this vertex information, thereby improving both the speed and accuracy of vertex registration.

[0090] In this embodiment, the disclosed vertex registration method based on graph matching can be specifically referred to... Figure 8 On one hand, it is necessary to obtain a standard template and information search range for the standard object. This can be achieved by acquiring a standard image of the target object from a camera device, along with annotation information for all vertices on the standard object within that image. A standard template can then be generated based on this annotation information, and the information search range can be set automatically or manually. On the other hand, it is necessary to obtain at least one sample image of the target object. This can be done by acquiring at least one sample image of the target object from an image dataset, and annotating some vertices on the target object within the sample image to obtain the position, angle, and category information of these annotated vertices. Finally, a graph matching algorithm can be used to match the vertices between the sample image and the standard template.

[0091] In the execution of the graph matching algorithm, firstly, a set of vertices to be detected and their connections can be formed using some labeled vertices in the sample image. The positional changes between any two vertices in the set of vertices to be detected and any two vertices in the standard template are calculated, and the connections between vertices in the set of vertices to be detected are constructed. Next, the connections between each vertex in the set of vertices to be detected and all other vertices are compared. Vertices whose connections meet the preset filtering criteria are added to the vertex set X. h In, and to determine a relationship of change. Then, the vertex set X h The transformation relationships and definite transformation relationships corresponding to each vertex in the middle. The vertex set X is determined through comparison and voting. h The process involves identifying several vertices that match the standard template; finally, the vertex matching result is obtained by using the correspondence between the matched vertices and their corresponding vertices in the standard template.

[0092] After obtaining the vertex matching results, the transformation relationship between the target object in the sample image and the standard object in the standard template can be calculated based on the vertex matching results. Then, the position information, angle information and category information of the remaining unlabeled vertices in the sample image can be inferred based on the transformation relationship.

[0093] Since we have obtained information about some labeled vertices in the sample image and the remaining unlabeled vertices in the sample image, it is equivalent to obtaining information about each vertex on the target object in the sample image. Thus, the registration task of each vertex on the target object in the sample image is achieved.

[0094] It should be noted that the vertex registration method mentioned above mainly obtains the information of each vertex in the sample image through graph matching, thereby obtaining a sample image with complete vertex annotation. Since the sample image is the necessary training data for training a network model and has complete vertex annotation information, one or more such sample images can be used to train the network model, thereby improving the accuracy of the network model in object detection.

[0095] In another embodiment, after registering the vertices of the target object in the sample image, a model building step is also included. See [link to related document]. Figure 9 The model construction steps can specifically include steps 210-220, which are explained below.

[0096] Step 210: Construct a deep learning-based convolutional neural network. Train the convolutional neural network using sample images registered at each vertex until the loss function corresponding to the convolutional neural network converges.

[0097] In one specific embodiment, the deep learning-based convolutional neural network can adopt network types such as YOLO, Retina-Net, and SSD. Since these network types are relatively common, it is easy to configure the corresponding loss function for the convolutional neural network. The process of using sample images in the training of the convolutional neural network is the process of updating the network weight coefficients. As the number of updates increases, the corresponding loss function gradually converges. Generally, the training of the convolutional neural network can be considered complete when the loss function converges.

[0098] Step 220: Using the trained convolutional neural network as a vertex detection model, this model is used to detect local features in the image of the target object, thereby obtaining several vertices on the target object. In other words, after obtaining the vertex detection model, the image of the target object can be input, and by detecting local features of the target object in the image, several vertices on the target object can be output. It can be understood that the information for each vertex output may include: vertex position coordinates, vertex category, vertex bounding rectangle, vertex enclosing rectangle, etc. The specific information that can be output depends on the structure of the convolutional neural network itself and the vertex information of the sample images used in training.

[0099] For information on the structure of convolutional neural networks, please refer to [link / reference]. Figure 10 The network is specifically configured with a backbone network for image feature extraction, a classification and detection network for classification, and a bounding box regression network for regression. The backbone network can incorporate operations such as convolution, activation functions, and pooling to extract image features from the input image (e.g., the image of dial 1), thus obtaining the corresponding feature map. The classification and detection network can also incorporate convolution, activation functions, and pooling. Due to differences in network parameters, the classification and detection network can focus on feature classification, further classifying the obtained feature map to obtain feature maps of vertices on the target object with respect to classification information, thereby obtaining the vertex classification information. The bounding box regression network can also incorporate convolution, activation functions, and pooling. Depending on its own network parameters, it can further regress the obtained feature map to obtain feature maps of vertices on the target object with respect to bounding boxes, thus obtaining the vertex position and the bounding rectangle / outer rectangle.

[0100] Those skilled in the art will understand that the technical solution proposes a graph matching algorithm to match some labeled vertices in a sample image within the information search range of a standard template, transforming the vertex matching problem into a graph matching problem for solution and calculation. This achieves the correspondence between some labeled vertices and vertices in the standard template. With the partial correspondence of vertices obtained, it is convenient to calculate the corresponding transformation matrix based on the correspondence, thereby inferring and identifying the remaining vertices on the target object through this transformation relationship, and finally completing the registration of each vertex on the target object.

[0101] Example 2

[0102] Please refer to Figure 11 Based on the vertex registration method based on graph matching disclosed in Embodiment 1, this embodiment discloses an image processing device, which mainly includes a storage unit 31, an acquisition unit 32 and a processing unit 33, which are described below.

[0103] Storage unit 31 can be any type of memory, mainly used to store the standard template of the standard object corresponding to the target object and the information search range of the standard template, as well as the image dataset. In this embodiment, the standard template includes the position information, angle information, and category information of all vertices on the standard object, where vertices are used to characterize a local feature of the object's surface; the information search range is used to set the detection range of angle, position, and distance scaling. In this embodiment, the image dataset includes at least one sample image of the target object, and each sample image includes the position information, angle information, and category information of some labeled vertices on the target object.

[0104] The acquisition unit 32 is used to acquire from the storage unit 31 the standard template of the standard object corresponding to the target object and the information search range of the standard template, and to acquire at least one sample image of the target object in the image dataset.

[0105] The processing unit 33 can be a data processing device such as a CPU, FPGA, or MCU. The processing unit 33 can be used to match some labeled vertices in the sample image within the information search range of the standard template using a preset graph matching algorithm to obtain vertex matching results. Based on the vertex matching results, the transformation relationship between the target object in the sample image and the standard object in the standard template is calculated. Furthermore, the processing unit 33 infers the position information, angle information, and category information of the remaining unlabeled vertices in the sample image based on the transformation relationship. Using some labeled vertices in the sample image and the remaining unlabeled vertices in the sample image, the processing unit 33 registers each vertex of the target object in the sample image.

[0106] In one specific embodiment, the processing unit 33 includes the following process when executing a preset graph matching algorithm:

[0107] (1) Use some labeled vertices in the sample image to form a set of vertices to be detected, calculate the positional relationship between any two vertices in the set of vertices to be detected and any two vertices in the standard template, and construct the connection relationship between vertices in the set of vertices to be detected.

[0108] For example, for any two vertices k and l in the set of vertices to be detected and any two vertices i and j in the standard template, the processing unit 33 calculates the positional relationship between vertex k and vertex l and represents it as β. kl Calculate the positional relationship between vertex i and vertex j and represent it as β. ij If vertex i and vertex k have the same category information, and vertex j and vertex l have the same category information, then calculate the positional relationship β. ij Relative to positional relationship β kl The relationship of change is expressed as δ ij-kl Determine the relationship of change δ ij-kl If the vertex is within the information search range of the standard template, then construct the connection relationship between vertex k and vertex l in the vertex set to be detected and use γ. kl express.

[0109] (2) Compare the connectivity between each vertex in the vertex set to be detected and all other vertices, and add the vertex and other vertices whose connectivity meets the preset filtering conditions to the vertex set X. h In, and to determine a relationship of change.

[0110] For example, if processing unit 33 determines that there are connections between vertices in the vertex set to be detected, then it stores all vertices in the vertex set to be detected into stack S. t From stack S t Pop each vertex from the stack in sequence and label it as vertex h, and construct the vertex set X in sequence. h Add vertex h to vertex set X h Iterate through the set of vertices to be detected, identifying all other vertices connected to vertex h, and determine one connection relationship by voting, thus obtaining the corresponding change relationship. And using other vertices connected to vertex h, a candidate vertex set P is formed. For each vertex o in the candidate vertex set P, the connection relationship and corresponding change relationship between vertex o and each vertex in the vertex set to be detected are obtained. If it is determined that vertex o and vertex set X... h The change relation corresponding to the connection relationship of any vertex in the equation is equal to the change relation. Then temporarily add vertex o to vertex set X. hIn the middle; then obtain the vertex set X. h New internal connections between internal vertices in and the internal vertices and vertex set X h New external connections between external vertices out Determine the newly added internal connection relationship. in Is the number of external connections less than the number of newly added external connections? out When the number of vertexes is such that vertex o is removed from vertex set X, h Otherwise, the newly added external connection relationship will be... out Vertices associated with vertex o are also added to the candidate vertex set P. The vertex set X is then updated by traversing all vertices in the candidate vertex set P. h Output the final vertex set X h and definite relationship of change

[0111] (3) Set the vertex set X h The transformation relationships and definite transformation relationships corresponding to each vertex in the middle. The vertex set X is determined through comparison and voting. h Several vertices that match the standard template.

[0112] For example, processing unit 33 obtains the vertex set X. h The connection relationships and corresponding changes between vertex h and all other vertices; if the change relationship between vertex h and any other vertex is equal to the change relationship... Then mark the connection relationship as the first value; count and vote on the vertices whose connection relationship is marked as the first value to obtain the voting results of each vertex in the vertex set, and determine several vertices that match the standard template based on the voting results.

[0113] (4) The vertex matching result is obtained by using the matching vertices and the correspondence between them and the corresponding vertices in the standard template.

[0114] It should be noted that the specific functions of the processing unit 33 can be found in steps 130-150 of Embodiment 1, and will not be repeated here.

[0115] Example 3

[0116] Please refer to Figure 12 This embodiment discloses an image processing device, which mainly includes a memory 41 and a processor 42.

[0117] The main components of the image processing device 4 are a memory 41 and a processor 42. The memory 41, as a computer-readable storage medium, is mainly used to store programs, which may be the program code corresponding to the vertex registration method in Embodiment 1.

[0118] The processor 42 is connected to the memory 41 and is used to execute the program stored in the memory 31 to implement the vertex registration method. The function implemented by the processor 42 can be referred to the processing unit 33 in Embodiment 2, and will not be described in detail here.

[0119] Those skilled in the art will understand that all or part of the functions of the various methods in the above embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, which may include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to achieve the above functions. For example, the program can be stored in the memory of a device, and when the program in the memory is executed by the processor, all or part of the above functions can be achieved. In addition, when all or part of the functions in the above embodiments are implemented by computer programs, the program can also be stored in a server, another computer, disk, optical disk, flash drive, or external hard drive, etc., and can be downloaded or copied to the memory of a local device, or the system of the local device can be updated. When the program in the memory is executed by the processor, all or part of the functions in the above embodiments can be achieved.

[0120] The above examples illustrate the present invention only to aid in understanding it and are not intended to limit the scope of the invention. Those skilled in the art can make various simple deductions, modifications, or substitutions based on the principles of this invention.

Claims

1. An image detection method, characterized in that, include: A vertex detection model for a target object is obtained. This model is configured as the training result of at least one registered sample image on a convolutional neural network. The registered sample image contains the target object, and each vertex of the target object has been pre-registered. Each vertex represents a local feature of the object's surface. The process of obtaining the registered sample image includes: obtaining a standard template of the target object and the information search range of the standard template; obtaining at least one pre-registration sample image of the target object from the image dataset; forming a set of vertices to be detected using partially labeled vertices in the pre-registration sample image; calculating the positional change relationship between any two vertices in the set of vertices to be detected and any two vertices in the standard template; constructing the connection relationship between vertices in the set of vertices to be detected; determining if a connection relationship exists between vertices in the set of vertices to be detected; then storing all vertices in the set of vertices to be detected into a stack; popping each vertex from the stack and labeling it as vertex h; and sequentially establishing a vertex set X. h Add vertex h to vertex set X h The process involves traversing the set of vertices to be detected that are connected to vertex h, voting to determine one of the connections and obtaining the corresponding change relationship, and forming a candidate vertex set using the other vertices connected to vertex h. For each vertex in the candidate vertex set, the process is then performed based on the vertex and the vertex set X. h The change relationship corresponding to the connection relationship of any vertex in the set X, and the vertex set X h The newly added internal connections between the internal vertices and the relationship between the internal vertices and the vertex set X h New external connections are established between external vertices, and it is determined whether to add the vertex to the vertex set X. h Iterate through all vertices in the candidate vertex set P and update the vertex set X. h Output the final vertex set X h and the determined change relationship, and from the vertex set X h Several vertices that match the standard template are identified to form a vertex matching result, and a registered sample image is obtained based on the vertex matching result; The vertex detection model is used to perform local feature detection processing on the image of the target object to obtain several vertices on the target object; Output several vertices on the target object; each vertex has one or more of the following information: position coordinates, category, bounding rectangle, and enclosing rectangle.

2. The image detection method as described in claim 1, characterized in that, The configuration process for the vertex detection model includes: Construct the convolutional neural network based on deep learning; The convolutional neural network is trained using at least one registered sample image until the loss function corresponding to the convolutional neural network converges. The trained convolutional neural network is used as a vertex detection model; In the registered sample image, each local feature of the target object is represented by a vertex, and the registered sample image includes the position information, angle information and category information of all vertices on the target object.

3. The image detection method as described in claim 1, characterized in that, The standard template includes the position information, angle information, and category information of all vertices on the standard object, and each vertex is used to characterize a local feature of the object's surface. The information search range is used to set the detection range for angle, position, and distance scaling; the sample image before registration includes the position information, angle information, and category information of the vertices that have been labeled on the target object; The step of obtaining the registered sample image based on the vertex matching result includes: The transformation relationship between the target object in the sample image before registration and the standard object in the standard template is calculated based on the vertex matching results. Based on the transformation relationship, infer the position, angle, and category information of the remaining unlabeled vertices in the sample image before registration; By using some labeled vertices in the sample image before registration and the remaining unlabeled vertices in the sample image before registration, the vertices of the target object in the sample image before registration are registered to obtain the registered sample image.

4. The image detection method as described in claim 1, characterized in that, From the vertex set X h The process involves identifying several vertices that match the standard template to form a vertex matching result, including: The vertex set X h The transformation relationships and definite transformation relationships corresponding to each vertex in the middle. The vertex set X is determined through comparison and voting. h Several vertices that match the standard template; The vertex matching result is obtained by using several matching vertices and their correspondence with the corresponding vertices in the standard template.

5. The image detection method as described in claim 1, characterized in that, The process of obtaining the standard template of the standard object corresponding to the target object and the information search range of the standard template includes: Obtain a standard image of the standard object corresponding to the target object, and obtain the annotation information of all vertices on the standard object in the standard image; generate the standard template based on the annotation information of all vertices on the standard object; the annotation information includes the position information, angle information and category information of each vertex on the standard object; Obtain the reference direction and rotation center point configured for the standard template, as well as the maximum change in the angle, position, and distance scaling scale configured for the standard template; The detection range of angle, position, and distance scaling is set according to the configured reference direction, rotation center point, and the maximum change of angle, position, and distance scaling scale, thereby forming the information search range of the standard template.

6. A vertex registration method, characterized in that, include: Obtain a standard template of a standard object corresponding to the target object. The standard template includes the position information, angle information, and category information of all vertices on the standard object. The vertices are used to represent a local feature of the object's surface. Obtain at least one sample image of the target object from the image dataset. The sample image includes the position information, angle information, and category information of some labeled vertices on the target object. Using some labeled vertices in the sample image, a set of vertices to be detected is formed. The positional changes between any two vertices in the set and any two vertices in the standard template are calculated. Connections between vertices in the set are constructed. If connections between vertices are found in the set, all vertices in the set are stored in a stack. Each vertex is popped from the stack and denoted as vertex h, thus establishing a vertex set X. h Add vertex h to vertex set X h The process involves traversing the set of vertices to be detected that are connected to vertex h, voting to determine one of the connections and obtaining the corresponding change relationship, and forming a candidate vertex set using the other vertices connected to vertex h. For each vertex in the candidate vertex set, the process is then performed based on the vertex and the vertex set X. h The change relationship corresponding to the connection relationship of any vertex in the set X, and the vertex set X h The newly added internal connections between the internal vertices and the relationship between the internal vertices and the vertex set X h New external connections are established between external vertices, and it is determined whether to add the vertex to the vertex set X. h Iterate through all vertices in the candidate vertex set P and update the vertex set X. h Output the final vertex set X h and the determined change relationship, and from the vertex set X h The process involves identifying several vertices that match the standard template to form a vertex matching result. The transformation relationship between the target object in the sample image and the standard object in the standard template is calculated based on the vertex matching results. Based on the transformation relationship, infer the position, angle, and category information of the remaining unlabeled vertices in the sample image; Using some labeled vertices in the sample image and the remaining unlabeled vertices in the sample image, the vertices of the target object in the sample image are registered.

7. The vertex registration method as described in claim 6, characterized in that, From the vertex set X h The process involves identifying several vertices that match the standard template to form a vertex matching result, including: The vertex set X h The transformation relationships and definite transformation relationships corresponding to each vertex in the middle. The vertex set X is determined through comparison and voting. h Several vertices that match the standard template; The vertex matching result is obtained by using several matching vertices and their correspondence with the corresponding vertices in the standard template.

8. The vertex registration method as described in claim 6, characterized in that, The calculation of the positional changes between any two vertices in the vertex set to be detected and any two vertices in the standard template, and the construction of the connection relationships between vertices in the vertex set to be detected, include: For any two vertices k and l in the set of vertices to be detected and any two vertices i and j in the standard template, calculate the positional relationship between vertex k and vertex l and represent it as β. kl Calculate the positional relationship between vertex i and vertex j and represent it as β. ij ; If vertex i and vertex k have the same category information, and vertex j and vertex l have the same category information, then calculate the positional relationship β. ij Relative to positional relationship β kl The relationship of change is expressed as δ ij-kl The aforementioned relationship is used to characterize the angular offset and distance scaling of the relative transformation. Determine the relationship of change δ ij-kl If the vertex is within the information search range of the standard template, then construct the connection relationship between vertex k and vertex l in the vertex set to be detected and use γ. kl This indicates that the information search range includes a detection range for angle α, coordinate x, coordinate y, and distance scaling.

9. The vertex registration method as described in claim 6, characterized in that, If it is determined that there are connections between vertices in the set of vertices to be detected, then all vertices in the set of vertices to be detected are stored in a stack. Each vertex is popped from the stack in sequence and denoted as vertex h, thus establishing a vertex set X. h Add vertex h to vertex set X h The process involves traversing the set of vertices to be detected that are connected to vertex h, voting to determine one of the connections and obtaining the corresponding change relationship, and forming a candidate vertex set using the other vertices connected to vertex h. For each vertex in the candidate vertex set, the process is then performed based on the vertex and the vertex set X. h The change relationship corresponding to the connection relationship of any vertex in the set X, and the vertex set X h The newly added internal connections between the internal vertices and the relationship between the internal vertices and the vertex set X h New external connections are established between external vertices, and it is determined whether to add the vertex to the vertex set X. h Iterate through all vertices in the candidate vertex set P and update the vertex set X. h Output the final vertex set X h And definite relationships of change, including: If it is determined that there are connections between vertices in the set of vertices to be detected, then all vertices in the set of vertices to be detected are stored in stack S. t From the stack S t Pop each vertex from the stack in sequence and label it as vertex h, and construct the vertex set X in sequence. h Add vertex h to vertex set X h ; Iterate through the set of vertices to be detected, identifying all other vertices connected to vertex h, and determine one connection relationship by voting, thus obtaining the corresponding change relationship. And using other vertices that have connections with vertex h to form a candidate point set P; For each vertex o in the candidate vertex set P, obtain the connection relationship and corresponding change relationship between vertex o and each vertex in the vertex set to be detected. If it is determined that vertex o and vertex set X h The change relation corresponding to the connection relationship of any vertex in the equation is equal to the change relation. Then vertex o will be temporarily added to the vertex set X. h In the middle; then obtain the vertex set X. h New internal connections between internal vertices in and each internal vertex and the vertex set X h New external connections between external vertices out Determine the newly added internal connection relationship. in Is the number of external connections less than the number of newly added external connections? out When the number is such that vertex o is removed from the vertex set X, h Otherwise, the newly added external connection relationship will be... out The vertices associated with vertex o are also added to the candidate point set P; Iterate through all vertices in the candidate vertex set P and update the vertex set X. h Output the final vertex set X h and definite relationship of change .

10. The vertex registration method as described in claim 7, characterized in that, The vertex set X h The transformation relationships and definite transformation relationships corresponding to each vertex in the middle. The vertex set X is determined through comparison and voting. h The vertices that match the standard template include: Obtain the vertex set X h The connection relationships between the middle vertex h and the other vertices, and the corresponding changes thereto; If the change relationship corresponding to the connection between vertex h and any other vertex is equal to the change relationship... If so, then the connection relationship is marked as the first value; The vertices whose connection relationship is marked as the first value are counted and voted to obtain the voting results of each vertex in the vertex set. Based on the voting results, several vertices that match the standard template are determined.

11. A computer-readable storage medium, characterized in that, The medium stores a program that can be executed by a processor to implement the image detection method as described in any one of claims 1-5, or the vertex registration method as described in any one of claims 6-10.

Citation Information

Patent Citations

  • Image annotation method and device, target detection method and device and storage medium

    CN112232420A