Target tracking method and device based on graph matching, equipment and medium
The node similarity matrix and edge weight matrix are constructed through the graph matching method, and the secondary weighted random walk algorithm is used for target association, which solves the complex problems of target offset and morphological changes in the microscopic image sequence, and realizes the detection of large offsets. and effective tracking of high-density small-size targets.
Patent Information
- Application Number
- CN202410743809.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-09-03
AI Technical Summary
Traditional methods based on distance similarity or linear prediction of motion trajectories are difficult to accurately track targets in microscopic image sequences. On the one hand, due to the large imaging time interval, the target may have a large offset; on the other hand, due to the low imaging resolution, the target Small in size and densely distributed.
A target tracking method based on graph matching is used to represent the relative position relationship between targets in a single frame image by constructing a node similarity matrix and an edge weight matrix of the graph data structure, and a secondary weighted random walk graph matching algorithm is used to perform target tracking. One-to-one correlation solves the problems of large target motion offsets and complex morphological changes.
It can effectively track targets with large moving distances caused by the long time interval of microscopic image sequence imaging, and handle high-density and small-sized targets in microscopic images, thereby improving the accuracy of target tracking.
Smart Images

Figure CN118587250A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to a target tracking method, device, equipment and medium based on graph matching. Background Art
[0002] Image information processing technologies such as target detection and tracking have been widely used in the fields of industry, transportation, medical treatment, biology, and drones. Common target tracking methods include active contour models, state space models, deep learning models, and target association models. The active contour model uses contour curves to locate the boundaries of each target in the current frame image. According to the characteristics of the pixel intensity distribution around the target, the target contour of the current frame image undergoes topological changes and gradually moves to the target boundary of the next frame image. When the target is greatly offset, the next frame image has only a small overlap with the same target in the current frame image, so the active contour model is difficult to track targets with large offsets. The state space model makes assumptions about the motion law of the target based on the target motion and morphology model, and uses signal filtering methods to track the target. The classic state space model is the Kalman filter and particle filter, which is based on the linear dynamic motion model of the "prediction-correction" mechanism to improve the prediction ability of the target position in the next frame image, but the tracking accuracy of nonlinear motion targets is not high. Target tracking based on the deep learning model uses a specific target detection network to extract high-level image features, fully mine the semantic information of the image, and is combined with the tracking network to form an end-to-end target tracker. For example, BGU-IL uses LSTM-Unet for target segmentation and graph convolutional neural networks for target tracking. However, such methods are difficult to apply to application scenarios where training data is scarce. Target association is to match the same target in different frames based on the similarity of the feature vectors of the target segmentation area for the segmented target. For example, the DREX-US algorithm combines the target trajectory of the next frame with the target trajectory of the current frame, calculates the posterior probability distribution of the candidate trajectory using the target motion features and morphological features, and obtains the target pairing for the next frame. KTH-SE combines short-range target trajectories to form a state space containing all candidate trajectories, and iteratively adds the target trajectory to the core trajectory based on a probability scoring function.
[0003] Traditional methods based on distance similarity or linear prediction of motion trajectories are difficult to accurately track targets in microscopic image sequences. On the one hand, due to the large imaging time interval, there may be a large offset between targets in adjacent frame images; on the other hand, due to the low imaging resolution, the targets in the microscopic images are small in size and densely distributed. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In order to solve at least one of the above-mentioned technical problems arising from target tracking based on microscopic image sequences in the prior art, the embodiments of the present invention provide a target tracking method, device, equipment and medium based on graph matching. Based on the relatively stable feature of the relative position relationship between targets in the microscopic image sequence, the node similarity matrix and edge weight matrix of the graph data structure are used to characterize the relative position relationship between targets in a single-frame image, and a quadratic weighted random walk graph matching algorithm is used to perform one-to-one association of targets, thereby effectively solving the target tracking problem caused by large target motion offset and complex morphological changes.
[0006] (II) Technical solution
[0007] In view of the above problems, embodiments of the present disclosure provide a target tracking method, apparatus, device and medium based on graph matching.
[0008] According to a first aspect of the present disclosure, a target tracking method based on graph matching is provided, the method comprising the following steps: obtaining an input image sequence, the input image sequence including a binary image of a target area; obtaining the centroid and geometric features of the target based on the binary image, and constructing a graph data structure of the binary image; calculating an edge weight matrix of a single frame image and a node similarity matrix of adjacent frame images based on the graph data structure; generating an association graph of adjacent frame images and an edge weight matrix of the association graph, wherein the edge weight matrix of the association graph is obtained based on the edge weight matrix of the single frame image and the node similarity matrix of adjacent frame images; matching nodes with the highest similarity in the graph data structure of adjacent frame images using a quadratic weighted random walk graph matching algorithm based on the edge weight matrix of the association graph, and obtaining target association results of adjacent frame images; and generating a target tracking result based on the graph matching result, wherein the graph matching result includes a target association result.
[0009] In some exemplary embodiments, when the target association result does not include all targets, the graph matching result also includes target merging and separation event detection results, and the method also includes the following steps: based on the target association result, for unpaired targets in adjacent frame images, calculating the target merging and separation event detection results.
[0010] In some exemplary embodiments, constructing a graph data structure of a binary image includes the following steps: creating a node of the graph data structure at the position of the centroid of the target; and obtaining a feature vector of the node of the graph data structure according to the geometric features of the target.
[0011] In some exemplary embodiments, an edge weight matrix of a single-frame image and a node similarity matrix of adjacent frame images are calculated, including the following steps: calculating the distance between any two targets in a single-frame image according to the node positions in a graph data structure to obtain a distance matrix of the single-frame image; normalizing the distance matrix of the single-frame image to obtain an edge weight matrix of the single-frame image, wherein the elements in the edge weight matrix are the edge weights of the corresponding nodes in the graph data structure; and using a Gaussian function to calculate the node similarity matrix of adjacent frame images according to the feature vectors of the nodes of the graph data structure of adjacent frame images.
[0012] In some exemplary embodiments, generating an association graph of adjacent frame images includes the following steps: pairing an edge of the graph data structure of the current frame image with an edge in the image data structure of the next frame image, wherein each edge connects two target nodes of a single frame image, and the combination of the nodes of the two edges constitutes a node of the association graph; and when an edge of the graph data structure of the current frame image can be paired with an edge in the image data structure of the next frame image, the nodes of the association graph are connected by an edge.
[0013] In some exemplary embodiments, a method for generating an edge weight matrix of an association graph includes: calculating the edge weights of any two nodes of the association graph to obtain the edge weight matrix of the association graph, wherein, in calculating the edge weights of any two nodes of the association graph, it includes: setting the edge weights of nodes that are not connected to each other in the association graph to 0; and setting the edge weights of adjacent nodes of the association graph to represent the edge similarity of the graph data structure of adjacent frame images corresponding to the association graph.
[0014] In some exemplary embodiments, a quadratic weighted random walk graph matching algorithm is used to match nodes with the highest similarity in a graph data structure of adjacent frame images, including the following steps: determining the probability and expansion factor of a random walker moving to an adjacent node of an association graph; calculating the sum of the edge weights of all adjacent nodes of any node in the association graph to obtain the summed edge weight of any node; taking the maximum value of the summed edge weights to obtain the maximum sum of node edge weights; initializing a random walker state vector using a uniform distribution, initializing a random transfer matrix, and iterating according to preset steps until the random walker state vector converges to obtain a converged random walker state vector; and selecting nodes of the association graph in descending order for the elements in the converged random walker state vector to generate node pairings of the graph data structure of adjacent frame images to obtain target association results of adjacent frame images, wherein the random transfer matrix includes the ratio of the edge weight matrix of the association graph to the sum of the maximum node edge weights.
[0015] In some exemplary embodiments, the preset steps include: multiplying the random walker state vector by the random transfer matrix to obtain a first random walker state vector; using an expansion factor to enhance the difference between the values of the first random walker state vector to obtain a second random walker state vector; converting the second random walker state vector into a matrix form to obtain a first random walker state tensor; using double random regularization to normalize each row and each column of the first random walker state tensor until the sum of each row is 1 and the sum of each column is 1 to obtain a second random walker state tensor; normalizing the second random walker state tensor tensor until the sum of the probabilities of the random walker jumping to all other nodes is 1, and convert it into a vector form to obtain a third random walker state vector; according to the probability of the random walker moving to the adjacent node of the association graph, the first random walker state vector value and the third random walker state vector, the probability of the random walker moving directly to the adjacent node and the probability of jumping to other nodes are weighted summed to obtain the third random walker state vector; and the third random walker state vector is normalized until the sum of the probabilities of the random walker transferring to all other nodes is 1 to obtain a fourth random walker state vector.
[0016] In some exemplary embodiments, for unpaired targets in adjacent frame images, target merging and separation event detection results are calculated, including the following steps: setting a preset pairing distance and a geometric feature similarity threshold; in a graph data structure of adjacent frame images, with the centroid of the unpaired target as the center and the preset pairing distance as the radius, finding a target that is closest to the unmatched target as the nearest neighbor target; obtaining the geometric feature similarity between the nearest neighbor target and the unpaired target based on the node similarity matrix of the adjacent frame images; and calculating the target merging and separation event detection results based on the relationship between the geometric feature similarity between the nearest neighbor target and the unpaired target and the geometric feature similarity threshold.
[0017] In some exemplary embodiments, target merging and separation event detection results are calculated based on the relationship between the geometric feature similarity between the nearest neighbor target and the unpaired target and the geometric feature similarity threshold, including: when the geometric feature similarity between the nearest neighbor target and the unpaired target is greater than the geometric feature similarity threshold, it is determined that target merging or separation has occurred between the nearest neighbor target and the unpaired target; when the geometric feature similarity between the nearest neighbor target and the unpaired target is less than the geometric feature similarity threshold, and the unpaired target is close to the boundary of the target area, it is determined that the unpaired target enters or leaves the field of view during the imaging process; and in other cases, the target is determined to appear or disappear suddenly.
[0018] A second aspect of the present disclosure provides a target tracking device based on graph matching, which includes the following modules: an acquisition module: used to acquire an input image sequence, the input image sequence includes a binary image of a target area; a construction module, used to acquire the center of mass and geometric features of the target based on the binary image, and construct a graph data structure of the binary image; a first calculation module, used to calculate the edge weight matrix of a single frame image and the node similarity matrix of adjacent frame images based on the graph data structure; a second calculation module, used to generate an association graph of adjacent frame images and an edge weight matrix of the association graph, wherein the edge weight matrix of the association graph is obtained based on the edge weight matrix of the single frame image and the node similarity matrix of the adjacent frame images; a third calculation module, used to match the nodes with the highest similarity in the graph data structure of adjacent frame images based on the edge weight matrix of the association graph using a quadratic weighted random walk graph matching algorithm to obtain a target association result of the adjacent frame images; and a result generation module, used to generate a target tracking result based on the graph matching result, wherein the graph matching result includes a target association result.
[0019] In some exemplary embodiments, when the target association result does not include all targets, the graph matching result also includes target merging and separation event detection results, and the device includes the following modules: a fourth calculation module, used to calculate the target merging and separation event detection results for unpaired targets in adjacent frame images based on the target association result.
[0020] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above method.
[0021] The fourth aspect of the present disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above method.
[0022] (III) Beneficial effects
[0023] It can be seen from the above technical solutions that the target tracking method, device, equipment and medium based on graph matching provided by the embodiments of the present disclosure have at least one of the following beneficial effects:
[0024] (1) The node similarity matrix and edge weight matrix of the graph data structure are used to represent the relative position relationship between targets in a single frame image. The quadratic weighted random walk graph matching algorithm is used to perform one-to-one association of targets, effectively solving the target tracking problem caused by large target motion offset and complex morphological changes.
[0025] (2) The target tracking method of the embodiment of the present disclosure can effectively track targets that have a large movement distance due to the long time interval between imaging of the microscopic image sequence.
[0026] (3) The target tracking method of the embodiment of the present disclosure can effectively track high-density and small-sized targets in microscopic images. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0028] Figure 1 A schematic diagram of a process of a target tracking method based on graph matching according to an embodiment of the present disclosure is schematically shown;
[0029] Figure 2 A schematic diagram of a process of another target tracking method based on graph matching according to an embodiment of the present disclosure is shown;
[0030] Figure 3 A schematic diagram schematically shows a process of constructing a graph data structure of a binary image according to an embodiment of the present disclosure;
[0031] Figure 4 A schematic diagram schematically shows a flow chart of calculating an edge weight matrix of a single frame image and a node similarity matrix of adjacent frame images according to an embodiment of the present disclosure;
[0032] Figure 5 A schematic diagram of a process of matching nodes with the highest similarity in a graph data structure of adjacent frame images using a quadratic weighted random walk graph matching algorithm according to an embodiment of the present disclosure is shown;
[0033] Figure 6 A schematic diagram of a process of calculating target merging and separation event detection results for unpaired targets in adjacent frame images according to an embodiment of the present disclosure is shown;
[0034] Figure 7 The diagram schematically shows a data structure of an adjacent frame image diagram and a correlation diagram according to an embodiment of the present disclosure;
[0035] Figure 8 A schematic diagram of a visualization result of a graph data structure of two frames of images in a sequence of microscopic images of mouse stem cells obtained by the method according to an embodiment of the present disclosure is shown;
[0036] Fig. 9 A schematic diagram of the visualization result of the target tracking trajectory of a mouse stem cell microscopic image sequence obtained by the method of an embodiment of the present disclosure is shown;
[0037] Fig.10The structure block diagram of a target tracking device 800-1 based on graph matching according to an embodiment of the present disclosure is schematically shown;
[0038] Fig.11 A structural block diagram of another target tracking device 800-2 based on graph matching according to an embodiment of the present disclosure is schematically shown; and
[0039] Fig.12 A block diagram of an electronic device according to a target tracking method based on graph matching according to an embodiment of the present disclosure is schematically shown.
[0040] Illustration Description:
[0041] 600-electronic device; 601-processor; 602-read only memory (ROM); 603-random access memory (RAM); 604-bus; 605-input / output (I / O) interface; 606-input part; 607-output part; 608-storage part; 609-communication part; 610-drive; 611-removable medium. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure.
[0043] Figure 1 A flowchart of a target tracking method based on graph matching according to an embodiment of the present disclosure is schematically shown.
[0044] like Figure 1 As shown, a target tracking method based on graph matching according to an embodiment of the present disclosure includes steps S110 to S160.
[0045] In step S110, an input image sequence is acquired, where the input image sequence includes a binary image of a target area.
[0046] In step S120, the centroid and geometric features of the target are obtained according to the binary image, and a graph data structure of the binary image is constructed.
[0047] In some exemplary embodiments, step S120 includes steps S121-S122, see Figure 3 .
[0048] In step S121 , a node of the graph data structure is created at the location of the centroid of the target.
[0049] In step S122, feature vectors of nodes of the graph data structure are obtained according to the geometric features of the target.
[0050] In step S130, the edge weight matrix of a single frame image and the node similarity matrix of adjacent frame images are calculated according to the graph data structure.
[0051] In some exemplary embodiments, step S130 includes steps S131-S133, see Figure 4 .
[0052] In step S131, the distance between any two targets in a single-frame image is calculated according to the node positions in the graph data structure to obtain a distance matrix of the single-frame image.
[0053] For example, Figure 7 The two graph data structures G1 and G2 are both undirected graphs, where the nodes corresponding to the target centroid of the current frame image G1 are a1, a2, and a3, and the nodes corresponding to the target centroid of the next frame image G2 are b1, b2, and b3. The distance between targets in a single frame image is calculated based on the target centroid position, and the distance matrix D∈R is constructed. 3×3 , the calculation formula of matrix D is:
[0054]
[0055] Among them, the matrix element D in the i-th row and j-th column ij Represents target a in a single frame image i and target a j The Euclidean distance between .
[0056] In step S132, the distance matrix of the single-frame image is normalized to obtain an edge weight matrix of the single-frame image, wherein the elements in the edge weight matrix are the edge weights of the corresponding nodes in the graph data structure.
[0057] For example, Figure 7 The corresponding distance matrix D is normalized to obtain the edge weight matrix W of the single-frame image data structure. The calculation method of the matrix W is:
[0058]
[0059] Among them, exp(·) represents the exponential with a natural constant as the base, std(D) represents the standard deviation of the distance matrix D, and W ij is the element D in the distance matrix corresponding to the edge weight matrix W ij The normalized value of .
[0060] In step S133, a node similarity matrix of adjacent frame images is calculated using a Gaussian function based on the feature vectors of the nodes of the graph data structure of adjacent frame images.
[0061] For example, the target is represented by the node of the graph data structure, and the target centroid and geometric features are represented by the node features. According to the edge weights of the single-frame image, each element in the weight matrix W is the edge weight of the corresponding node in the graph data structure, such as Figure 7 Edge w of the graph data structure G1 12 and w 13 . Use Gaussian function to calculate the similarity matrix of target nodes in adjacent frame images. Node similarity matrix S∈R 3×3 The calculation method is:
[0062]
[0063] in, and They are Figure 7 Node a in graph data structures G1 and G2 k and b m The feature vector of .
[0064] In step S140, an association graph of adjacent frame images and an edge weight matrix of the association graph are generated, wherein the edge weight matrix of the association graph is obtained according to the edge weight matrix of a single frame image and the node similarity matrix of adjacent frame images.
[0065] In some exemplary embodiments, generating an association graph of adjacent frame images includes the following steps: pairing an edge of the graph data structure of the current frame image with an edge in the image data structure of the next frame image, wherein each edge connects two target nodes of a single frame image, and the combination of the nodes of the two edges constitutes a node of the association graph; and when an edge of the graph data structure of the current frame image can be paired with an edge in the image data structure of the next frame image, the nodes of the association graph are connected by an edge.
[0066] For example, take Figure 7 The adjacent node a in G1 k and a j , adjacent node b in G2 m and b n , forming adjacent node pairs [(a k , b m ),(a j , b n )], the weight of the edge connecting these two nodes is . Association graph node (a k , b m ) and (a j ,b n) are connected, indicating that node a in the graph data structure G1 k and a j Respectively with node b in G2 m and b n One-to-one correspondence, and a k and a j between and b m and b n There are edges connecting them.
[0067] In some exemplary embodiments, the edge weight matrix of the association graph is generated by: calculating the edge weights of any two nodes of the association graph to obtain the edge weight matrix of the association graph. In calculating the edge weights of any two nodes of the association graph, the following steps are included: setting the edge weights of nodes that are not connected to each other in the association graph to 0; and setting the edge weights of adjacent nodes of the association graph to represent the edge similarity of the graph data structure of adjacent frame images corresponding to the association graph.
[0068] For example, according to Figure 7 The corresponding edge weight matrices W1 and W2 of the adjacent frame graph data structures G1 and G2 and the node similarity matrix S set the association graph G ass The edge weights of the nodes, the associated graph edge weight matrix W assr The diagonal elements of represent the node similarity of the two graph data structures, and the off-diagonal elements represent the edge similarity of the two graph data structures. t a connected by an edge k and a j , and G t+1 b connected by an edge m and b n When no pairing relationship is formed, the association graph node (a k , b m ) and (a j ,b n ) has an edge weight of 0.
[0069] In step S150, according to the edge weight matrix of the association graph, a quadratic weighted random walk graph matching algorithm is used to match the nodes with the highest similarity in the graph data structure of adjacent frame images to obtain the target association result of the adjacent frame images. Optionally, the matching of nodes in the two graph data structures is achieved by iteratively updating the state vector using a random transfer matrix in a Markov chain.
[0070] In some exemplary embodiments, step S150 includes steps S151-S155, see Figure 5 .
[0071] In step S151, the probability and expansion factor of the random walker moving to the adjacent node of the association graph are determined. For example, given the association graph edge weight matrix Wassr , determine the probability that the random walker chooses to move to an adjacent node α=0.2 and the expansion factor β=20.
[0072] In step S152, the sum of the edge weights of all adjacent nodes of any node in the association graph is calculated to obtain the summed edge weight of any node.
[0073] In step S153, the maximum value of the summed edge weights is taken to obtain the maximum sum of the node edge weights. k b m , calculate the association graph with node a k b m Sum the weights of directly connected edges and find the maximum value among them to get the sum of the maximum edge weights:
[0074]
[0075] In step S154, the random walker state vector is initialized using a uniform distribution, the random transfer matrix is initialized, and the iteration is performed according to the preset steps until the random walker state vector converges to obtain a converged random walker state vector. The random transfer matrix includes the ratio of the edge weight matrix of the association graph to the sum of the maximum edge weights. For example, the random walker state vector is initialized using a uniform distribution. , initialize the random transfer matrix , iterate according to the preset steps.
[0076] In some exemplary embodiments, the preset steps include steps S1-S7.
[0077] In step S1, the random walker state vector is multiplied by the random transfer matrix to obtain a first random walker state vector. For example, the first random walker state vector can be expressed as:
[0078]
[0079] In step S2, the difference between the values of the first random walker state vector is enhanced using the expansion factor to obtain a second random walker state vector. For example, the first random walker state vector obtained in step S1 is enhanced using the expansion factor , and get the second random walker state vector:
[0080]
[0081] In step S3, the second random walker state vector is converted into a matrix form to obtain the first random walker state tensor. For example, the second random walker state vector obtained in step S2 is converted into a matrix form to obtain the first random walker state tensor. Convert to matrix form to get the first random walker state tensor .
[0082] In step S4, double random regularization is used to normalize the rows and columns of the first random walker state tensor until the sum of each row is 1 and the sum of each column is 1, thereby obtaining a second random walker state tensor.
[0083] For example, the first random walker state tensor obtained in step S3 is updated using double random regularization , and perform the following iterative calculations.
[0084] Normalize each row of the first random walker state tensor y to get:
[0085]
[0086] Normalize each column of the first random walker state tensor y to get:
[0087]
[0088] Until the sum of each row and column of the first random walker state tensor y is 1, the second random walker state tensor is obtained.
[0089] In step S5, the second random walker state tensor is normalized until the sum of the probabilities of the random walker jumping to all other nodes is 1, thereby obtaining a third random walker state tensor;
[0090] For example, normalize the second random walker state tensor y obtained in S4 to ensure that the sum of the probabilities of the random walker jumping to all other nodes is 1, and convert it into a vector form to obtain the third random walker state vector y norm :
[0091]
[0092] In step S6, based on the probability of the random walker moving to an adjacent node of the association graph, the first random walker state vector value, and the third random walker state vector, the probability of the random walker moving directly to an adjacent node and the probability of jumping to other nodes are weighted summed to obtain the third random walker state vector.
[0093] For example, the probability of moving directly to an adjacent node and the probability of jumping to other nodes are weighted and summed to obtain the state vector of the third random walker:
[0094]
[0095] In step S7, the third random walker state vector is normalized until the sum of the probabilities of the random walker transferring to all other nodes is 1, thereby obtaining a fourth random walker state vector.
[0096] For example, the third random walker state vector obtained in step S6 is normalized to obtain a fourth random walker state vector:
[0097]
[0098] In step S155, the elements in the converged random walker state vector are selected from the nodes of the association graph in descending order, and the node pairing of the graph data structure of adjacent frame images is generated to obtain the target association result of adjacent frame images.
[0099] In step S160 , a target tracking result is generated according to the graph matching result, wherein the graph matching result includes a target association result.
[0100] like Figure 2 As shown, another target tracking method based on graph matching according to an embodiment of the present disclosure is Figure 1 Step S170 is added on the basis of the method shown. When the target association result does not include all targets, the graph matching result also includes target merging and separation event detection results, and the method further includes step S170.
[0101] In step S170, according to the target association result, the target merging and separation event detection results are calculated for the unpaired targets in the adjacent frame images.
[0102] In some exemplary embodiments, step S170 includes steps S171-S174, see Figure 6 .
[0103] In step S171 , a preset pairing distance and a geometric feature similarity threshold are set.
[0104] In step S172, in the graph data structure of adjacent frame images, with the centroid of the unpaired target as the center and the preset pairing distance as the radius, the target closest to the unmatched target is found as the nearest neighbor target.
[0105] In step S173, the geometric feature similarity between the nearest neighbor target and the unpaired target is obtained based on the node similarity matrix of the adjacent frame images.
[0106] In step S174, the target merging and separation event detection results are calculated based on the relationship between the geometric feature similarity between the nearest neighbor target and the unpaired target and the geometric feature similarity threshold. Optionally, if the geometric feature similarity between the nearest neighbor target and the unpaired target is greater than the geometric feature similarity threshold, it is determined that the nearest neighbor target and the unpaired target have been merged or separated; and if the geometric feature similarity between the nearest neighbor target and the unpaired target is less than the geometric feature similarity threshold, and the unpaired target is close to the boundary of the target area, it is determined that the unpaired target enters or leaves the field of view during the imaging process.
[0107] For example, based on the target association results, for the remaining unmatched targets, a neighborhood with a size of d=50 centered on the centroid of the unmatched target is set, and the target closest to the unmatched target is found in the neighborhood. According to the node feature similarity matrix of the adjacent frame images, if the similarity between the target geometric features and the unmatched target geometric features is greater than the specified threshold of 0.7, the target and the unmatched target may have been merged or separated, and the pairing result of the matched target in the current frame is modified accordingly. If the similarity is less than the specified threshold and the target is close to the image boundary, it is considered that the target enters or leaves the field of view during the imaging process. For other cases, the target is judged to appear or disappear suddenly. Based on the above situations, the trajectory of events such as target merging and separation in adjacent frame images is generated. The target tracking result is generated by combining the target association results and the target merging and separation event detection results.
[0108] In order to verify the accuracy of the target tracking method based on graph matching according to the embodiment of the present disclosure, the mouse stem cell microscopic image sequence Fluo-N2DH-GOWT1 and the benchmark target tracking results provided by the Cell Tracking Challenge (http: / / celltrackingchallenge.net) were selected, and the non-periodic directed graph measurement method was used as the evaluation index of the multi-target tracking accuracy. The index value range is [0,1], and when the value is 1, it means that the tracking result is completely consistent with the benchmark tracking result. The multi-target tracking accuracy of the target tracking method based on graph matching according to the embodiment of the present disclosure for the microscopic image sequence Fluo-N2DH-GOWT1 reached 0.999, indicating that the results obtained by the target tracking method based on graph matching according to the embodiment of the present disclosure are consistent with the benchmark tracking results of the microscopic image sequence. Figure 8 A schematic diagram schematically shows a visualization result of a graph data structure of two frames of images in a sequence of microscopic images of mouse stem cells obtained by the method of an embodiment of the present disclosure; and Fig. 9 A schematic diagram of the visualization results of the target tracking trajectory of a mouse stem cell microscopic image sequence obtained according to the method of an embodiment of the present disclosure is schematically shown.
[0109] Fig.10The structural block diagram of a target tracking device 800 - 1 based on graph matching according to an embodiment of the present disclosure is schematically shown.
[0110] like Fig.10 As shown, a target tracking device 800 - 1 based on graph matching according to an embodiment of the present disclosure includes an acquisition module 810 , a construction module 820 , a first calculation module 830 , a second calculation module 840 , a third calculation module 850 and a result generation module 860 .
[0111] Acquisition module 810: used to acquire an input image sequence, where the input image sequence includes a binary image of a target area.
[0112] The construction module 820 is used to obtain the centroid and geometric features of the target according to the binary image and construct a graph data structure of the binary image.
[0113] The first calculation module 830 is used to calculate the edge weight matrix of a single frame image and the node similarity matrix of adjacent frame images according to the graph data structure.
[0114] The second calculation module 840 is used to generate an association graph of adjacent frame images and an edge weight matrix of the association graph, wherein the edge weight matrix of the association graph is obtained based on the edge weight matrix of a single frame image and the node similarity matrix of adjacent frame images.
[0115] The third calculation module 850 is used to match the nodes with the highest similarity in the graph data structure of adjacent frame images according to the edge weight matrix of the association graph and adopt a quadratic weighted random walk graph matching algorithm to obtain the target association result of the adjacent frame images.
[0116] The result generation module 860 is used to generate a target tracking result according to the graph matching result, wherein the graph matching result includes a target association result.
[0117] In some specific embodiments, any multiple modules among the acquisition module 810, the construction module 820, the first calculation module 830, the second calculation module 840, the third calculation module 850 and the result generation module 860 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module.
[0118] In some specific embodiments, at least one of the acquisition module 810, the construction module 820, the first calculation module 830, the second calculation module 840, the third calculation module 850 and the result generation module 860 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by an appropriate combination of any of them. Alternatively, at least one of the acquisition module 810, the construction module 820, the first calculation module 830, the second calculation module 840, the third calculation module 850 and the result generation module 860 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.
[0119] Fig.11 The structural block diagram of another target tracking device 800 - 2 based on graph matching according to an embodiment of the present disclosure is schematically shown.
[0120] like Fig.11 As shown, another target tracking device 800-2 based on graph matching according to an embodiment of the present disclosure is compared with Fig.10 The device 800-1 shown in the figure is added with a fourth calculation module 870. When the target association result does not include all targets, the graph matching result also includes target merging and separation event detection results, and the device includes: a fourth calculation module 870, which is used to calculate the target merging and separation event detection results for unpaired targets in adjacent frame images according to the target association result.
[0121] In some specific embodiments, any multiple modules among the acquisition module 810, the construction module 820, the first calculation module 830, the second calculation module 840, the third calculation module 850, the result generation module 860 and the fourth calculation module 870 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module.
[0122] In some specific embodiments, at least one of the acquisition module 810, the construction module 820, the first calculation module 830, the second calculation module 840, the third calculation module 850, the result generation module 860 and the fourth calculation module 870 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in any appropriate combination of any of them. Alternatively, at least one of the acquisition module 810, the construction module 820, the first calculation module 830, the second calculation module 840, the third calculation module 850, the result generation module 860 and the fourth calculation module 870 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.
[0123] Fig.12 A block diagram of an electronic device according to a target tracking method based on graph matching according to an embodiment of the present disclosure is schematically shown.
[0124] like Fig.12 As shown, the electronic device 600 according to an embodiment of the present disclosure includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 to a random access memory (RAM) 603. The processor 601 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 601 may also include an onboard memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0125] In RAM603, various programs and data required for the operation of electronic device 600 are stored. Processor 601, ROM602 and RAM603 are connected to each other via bus 604. Processor 601 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM602 and / or RAM603. It should be noted that the program can also be stored in one or more memories other than ROM602 and RAM603. Processor 601 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0126] In some specific embodiments, the electronic device 600 may further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the I / O interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage portion 608 as needed.
[0127] An embodiment of the present disclosure shows a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiment; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0128] In some specific embodiments, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM602 and / or RAM603 described above and / or one or more memories other than ROM602 and RAM603.
[0129] An embodiment of the present disclosure shows a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present disclosure.
[0130] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 601. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0131] In some specific embodiments, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 609, and / or installed from a removable medium 611. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0132] In some specific embodiments, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by a computer program module.
[0133] In some specific embodiments, the program code for executing the computer program provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0134] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0135] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present invention may be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features described in the various embodiments of the present invention may be combined and / or combined in various ways. All of these combinations and / or combinations fall within the scope of the present invention.
[0136] The embodiments of the present invention are described above. However, these embodiments are only for the purpose of illustration, and are not intended to limit the scope of the present invention. Although each embodiment is described above, it does not mean that the measures in each embodiment cannot be used in combination advantageously. Without departing from the scope of the present invention, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.
Claims
1. A target tracking method based on graph matching, characterized in that: The method comprises the following steps: Acquire an input image sequence, wherein the input image sequence includes a binary image of a target area; According to the binary image, the centroid and geometric features of the target are obtained, and a graph data structure of the binary image is constructed; According to the graph data structure, an edge weight matrix of a single frame image and a node similarity matrix of adjacent frame images are calculated; Generate an association graph of adjacent frame images and an edge weight matrix of the association graph, wherein the edge weight matrix of the association graph is obtained according to the edge weight matrix of the single frame image and the node similarity matrix of the adjacent frame images; According to the edge weight matrix of the association graph, a quadratic weighted random walk graph matching algorithm is used to match the nodes with the highest similarity in the graph data structure of adjacent frame images to obtain target association results of adjacent frame images; and According to the graph matching results, the target tracking results are generated. The graph matching result includes a target association result.
2. The target tracking method based on graph matching according to claim 1, characterized in that: When the target association result does not include all targets, the graph matching result also includes target merging and separation event detection results, and the method further includes the following steps: According to the target association result, the target merging and separation event detection results are calculated for the unpaired targets in the adjacent frame images.
3. The target tracking method based on graph matching according to claim 1 or 2, characterized in that: The step of constructing the graph data structure of the binary image comprises the following steps: Creating a node of the graph data structure at the location of the centroid of the target; and According to the geometric features of the target, the feature vectors of the nodes of the graph data structure are obtained. The feature vector includes the centroid position and geometric features.
4. The target tracking method based on graph matching according to claim 3 is characterized in that: The calculation to obtain the edge weight matrix of a single frame image and the node similarity matrix of adjacent frame images includes the following steps: According to the node positions in the graph data structure, the distance between any two targets in a single frame image is calculated to obtain the distance matrix of the single frame image; Normalizing the distance matrix of the single-frame image to obtain an edge weight matrix of the single-frame image, wherein the elements in the edge weight matrix are edge weights of corresponding nodes in the graph data structure; and According to the feature vectors of the nodes of the graph data structure of the adjacent frame images, the node similarity matrix of the adjacent frame images is calculated using a Gaussian function.
5. The target tracking method based on graph matching according to claim 3, characterized in that: The generating of the association graph of adjacent frame images comprises the following steps: Take an edge of the graph data structure of the current frame image and pair it with an edge of the image data structure of the next frame image. Each edge connects two target nodes of a single frame image, and the combination of the nodes of the two edges constitutes a node of the association graph; and When an edge in the graph data structure of the current frame image can be paired with an edge in the image data structure of the next frame image, there is an edge connection between the nodes of the association graph, and / or The method for generating the edge weight matrix of the association graph includes: calculating the edge weights of any two nodes of the association graph to obtain the edge weight matrix of the association graph, Wherein, in the step of calculating the edge weight between any two nodes of the association graph, it includes: Setting the edge weights of the nodes in the association graph that are not connected to each other to 0; and Setting the edge weights of adjacent nodes of the association graph represents the edge similarity of the graph data structure of adjacent frame images corresponding to the association graph.
6. The target tracking method based on graph matching according to claim 5, characterized in that: The method of using a quadratic weighted random walk graph matching algorithm to match nodes with the highest similarity in a graph data structure of adjacent frame images includes the following steps: Determining a probability and a dilation factor for a random walker to move to an adjacent node of the association graph; Calculate the sum of the edge weights of all adjacent nodes of any node in the association graph to obtain the summed edge weight of any node; Taking the maximum value of the summed edge weights to obtain the sum of the maximum node edge weights; Initializing a random walker state vector using uniform distribution, initializing a random transfer matrix, and iterating according to preset steps until the random walker state vector converges to obtain a converged random walker state vector; and The elements in the converged random walker state vector are selected from large to small order, and the node pairing of the graph data structure of adjacent frame images is generated to obtain the target association result of adjacent frame images. The random transfer matrix includes the ratio of the edge weight matrix of the association graph to the sum of the maximum node edge weights.
7. The target tracking method based on graph matching according to claim 2, characterized in that: The step of calculating the target merging and separation event detection results for unpaired targets in adjacent frame images comprises the following steps: Set preset pairing distance and geometric feature similarity thresholds; In the graph data structure of adjacent frame images, the center of mass of the unpaired target is taken as the center, the preset pairing distance is taken as the radius, and the target closest to the unmatched target is found as the nearest neighbor target; According to the node similarity matrix of the adjacent frame images, obtaining the geometric feature similarity between the nearest neighbor target and the unpaired target; and According to the relationship between the geometric feature similarity between the nearest neighbor target and the unpaired target and the geometric feature similarity threshold, the target merging and separation event detection results are calculated.
8. A target tracking device based on graph matching, characterized in that: The device comprises the following modules: An acquisition module: used to acquire an input image sequence, wherein the input image sequence includes a binary image of a target area; A construction module, used to obtain the centroid and geometric features of the target according to the binary image, and construct a graph data structure of the binary image; A first calculation module is used to calculate the edge weight matrix of a single frame image and the node similarity matrix of adjacent frame images according to the graph data structure; A second calculation module is used to generate an association graph of adjacent frame images and an edge weight matrix of the association graph, wherein the edge weight matrix of the association graph is obtained according to the edge weight matrix of the single frame image and the node similarity matrix of the adjacent frame images; A third calculation module is used to match the nodes with the highest similarity in the graph data structure of adjacent frame images according to the edge weight matrix of the association graph, using a quadratic weighted random walk graph matching algorithm to obtain a target association result of the adjacent frame images; and The result generation module is used to generate target tracking results based on the graph matching results. The graph matching result includes a target association result.
9. An electronic device, wherein: include: one or more processors; as well as a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Non-registration multi-modal target detection decision fusion method based on graph matching
CN121053372A
