Cell tracking method based on GNN intra-frame relation modeling

Through GNN intra-frame relationship modeling and graph attention mechanism, combined with Mask R-CNN, it solves the problem of cell shape changes and identification in high-density environments, and achieves high-precision cell tracking and lineage dynamic analysis.

CN118674750APending Publication Date: 2024-09-20CHANGCHUN UNIV OF SCI & TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410821760.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Shape changes, overlap, division or disappearance of cells make their identities difficult to identify and reduce the accuracy of cell tracking, especially in high-density environments.

Method used

Using GNN-based intra-frame relationship modeling method, combined with Mask R-CNN and graph neural network framework, through intra-frame relationship modeling and metric learning, individual tracking of cells across multiple frames is achieved, and the graph attention mechanism is used to update nodes and edges. Features, forming a directed graph for tracing cell trajectories.

Benefits of technology

It improves the precision and accuracy of cell tracking, maintains high accuracy in high-density environments, captures the dynamic evolution of cells in time and space dimensions, provides characteristics of global dynamic behavior, and achieves accurate tracking of cell lineages.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118674750A
    Figure CN118674750A
Patent Text Reader

Abstract

The invention belongs to the technical field of cell tracking, and particularly provides a GNN intra-frame relation modeling-based cell tracking method, which comprises the following steps of: firstly, detecting a cell data set by using Mask R-CNN, annotating original data, and extracting the centroid, regional area and other characteristics of a cell according to an annotated bounding box; local tracking features of cell tracking are obtained through intra-frame relation modeling of the graph neural network; applying a metric learning training model to distinguish instances of different cells and assemble instances of the same cells; node and edge features of the model after local tracking features and metric learning training are updated through a feature fusion module by applying a graph attention mechanism, and finally, links are established according to segmentation labels extracted from comprehensive features to perform pedigree tracking on cells. According to the method, accurate construction and tracking of the cell trajectory are successfully realized, the research process of cell lineage analysis is greatly promoted, and powerful technical support is provided for scientific research in related fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cell tracking technology, and in particular to a cell tracking method based on GNN intra-frame relationship modeling. Background Art

[0002] Cells are the basic building blocks of the human body, and all activities of living organisms are inseparable from cell proliferation, differentiation and migration. Graph neural networks have been combined with different message passing methods and applied to vehicle and pedestrian tracking. They have become mature in vehicle and pedestrian tracking, but only a small number of studies have been applied to cell tracking. Early studies combined traditional edge detection technology with the dynamic local prediction algorithm (DLP) and used graph neural network models to extract and integrate the spatial information of cell images to achieve prediction and tracking of cell movement trajectories; in terms of video target tracking, domestic research also uses graph neural networks to construct spatiotemporal correlation models, and improves the continuous tracking performance of targets in complex environments by considering the relationship between targets and the temporal evolution characteristics of the targets themselves; some international studies use GNN to track changes in gene regulatory networks, the dynamics of protein interaction networks, and the path prediction of virus transmission, etc., using graph structures to characterize the complex connections between biological entities.

[0003] Compared with vehicle and pedestrian tracking, cell tracking adds many uncertain challenges: the movement of cells is completely random, with no path or road, no common direction or speed; some cells in the same sequence look very similar, and some cells change their appearance over time; in addition, the number of cells increases very rapidly during tracking due to frequent mitosis events. These uncertain factors often make artificially selected features such as position, intensity, and shape insufficient for accurate cell tracking.

[0004] Therefore, we proposed a cell tracking technology method based on GNN intra-frame relationship modeling to solve the above problems. Summary of the invention

[0005] 1. Technical issues to be solved

[0006] In order to overcome the above-mentioned deficiencies of the prior art, the present invention provides a cell tracking method based on GNN intra-frame relationship modeling, which solves the problem that the identity of cells may be difficult to identify due to shape changes, overlaps, splits or disappearances, thereby reducing the accuracy of cell tracking.

[0007] (II) Technical solution

[0008] In order to achieve the above objectives, the present invention proposes a cell tracking method based on GNN intra-frame relationship modeling, which detects cells facing cell tracking challenges by applying deep learning methods, and accurately tracks cells by utilizing graph relationships of graph neural networks, so that the cell lineage can be visualized even when the cell density is very high without affecting the cell tracking accuracy.

[0009] The technical idea of ​​implementing the present invention is to combine Mask R-CNN and the graph neural network framework to build an end-to-end cell tracking framework to ensure the correct matching of the identity of the same cell in different time steps and achieve individual cell tracking across multiple frames. Its specific implementation includes the following steps:

[0010] S1. Mask R-CNN cell detection: The 2D dataset of pancreatic stem cells on a polystyrene matrix is ​​used as the research object of this experiment. By extracting candidate regions, CNN is used to obtain region boxes and an end-to-end cell detection model is constructed.

[0011] S2, preliminary feature extraction: each detected target cell is represented by a feature vector;

[0012] S3, intra-frame relationship modeling: The intra-frame relationship of the cell image sequence is modeled into a graph based on a graph neural network, where each cell instance is represented by a node and the relationship is represented by an edge;

[0013] S4, metric learning: Apply the combination of ResNet architecture and loss function to further learn the node and edge features extracted from the preliminary features, so that the learned model can distinguish instances of different cells and assemble instances of the same cell;

[0014] S5. Comprehensive feature extraction: Use graph neural network and message passing mechanism to further update the node and edge data of preliminary feature extraction to obtain updated node and edge features for training the best model for cell tracking;

[0015] S6. Cell lineage tracking: Cell trajectories are tracked by creating a directed graph by linking the relationships in each frame of the cell image.

[0016] Furthermore, the cell information extracted by preliminary feature extraction in step S2 includes: the frame number, horizontal and vertical coordinates of the center of mass, and the area of ​​the bounding box of the cell extracted by Mask R-CNN; and the major and minor axis lengths and intensities (minimum, maximum, average) of the cell extracted by the Regionprops function.

[0017] Furthermore, the intra-frame relationship modeling in step S3 utilizes the basic properties of graph neural networks, which regards cells as nodes and the relationships between cells as links between points in the same frame and across frames. This not only takes into account the movement of cells in the same frame, but also allows the proliferation and apoptosis of cells to be observed between different frames.

[0018] Furthermore, metric learning is added to step S4 because the information extracted from the preliminary features in S2 is too rough to accurately display the location of the cells, nor can it distinguish the parent-child relationship between cells. Metric learning is used to construct a multi-similarity loss function for multiple iterations of training cells. When the accuracy is improved, a new accuracy will be output until the accuracy no longer improves, and then the graph neural network model can be used to train the cells.

[0019] Furthermore, the message passing in the comprehensive feature extraction in step S5 is a general framework of the graph neural network architecture. The present invention improves the architecture of the message passing paradigm, combines the features of the edge and the features of the two nodes connected to the edge into the message function, aggregates the information functions on the edges connected to the nodes, and combines the existing node features to update the edge features and pass them to the last message passing module to complete the extraction of updated node and edge features.

[0020] (III) Beneficial effects

[0021] Compared with the prior art, the present invention provides a cell tracking method based on GNN intra-frame relationship modeling, which has the following beneficial effects:

[0022] The improved Mask R-CNN algorithm is used to detect cell features and apply them to cell lineage tracking. By optimizing and adjusting the algorithm, we can more accurately capture the state changes of cells at different time points and provide key basic data for subsequent cell tracking.

[0023] In order to better understand and depict the dynamic interaction between cells, this paper introduces an intra-frame relationship modeling method based on graph neural network (GNN). In this model, we regard the cells in each frame as nodes in the graph, and the interactions or connections between cells are represented as edges in the graph. By deeply mining and learning the characteristics of cell nodes and their associated edges in consecutive frames, we can reveal the evolution laws of cells in time and space dimensions, and then extract features that reflect the global dynamic behavior of cell populations.

[0024] By designing and applying a graph attention network, these global features can be effectively encoded and updated. The graph attention mechanism can intelligently assign attention weights to highlight nodes and edges that are critical to the construction of cell trajectories, thereby strengthening the learning of key information. In this way, by connecting the connected sequence of cell activity edges within a frame, a coherent and comprehensive history of cell-to-cell interactions is formed, enabling cell lineage tracking. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A cell tracking framework for graph neural networks.

[0026] Figure 2 This is the cell detection image of Mask R-CNN.

[0027] Figure 3 It is a feature extraction framework.

[0028] Figure 4 News and updates for MPNN.

[0029] Figure 5 Partial images for cell lineage tracking. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] Example

[0032] like Figure 1-5 As shown, a cell tracking technology method based on GNN intra-frame relationship modeling proposed in one embodiment of the present invention includes the following steps:

[0033] S1. Mask R-CNN cell detection: The 2D dataset of pancreatic stem cells on a polystyrene matrix is ​​used as the research object of this experiment. By extracting candidate regions, CNN is used to obtain region boxes and an end-to-end cell detection model is constructed.

[0034] S11. First, ResNet50 and RPN are used to pre-train the model. The confidence threshold of the cell detection model is set to 0.5. The ROI of interest is retrieved and Faster R-CNN is used for classification detection. The image data is passed through the Mask R-CNN model to test and output the mask and bounding box. Then, the test set is optimized using the non-maximum suppression technique in the post-processing stage to generate the final detection results. Finally, the detected cells and bounding boxes are annotated on the original image.

[0035] S2. Preliminary feature extraction: Each detected target cell is represented by a feature vector.

[0036] S21. Preliminary feature extraction is to first preprocess the cell image, fill the image with the copyMakeBorder function of OpenCV, and then process the sub-regions of the cell according to different normalization types;

[0037] S22, extract the area of ​​the cell region using the anchor frame of the cell image detected based on Mask R-CNN in S1. Calculate the horizontal and vertical coordinates of the cell centroid based on the improved anchor frame, and use the major and minor axis lengths of the ellipse with the same standard second-order central moment as the region as the major and minor axis lengths of the cell;

[0038] S23. Calculate the intersection of the result and the mask, find the cell with the largest overlap, and use the Regionprops function to extract the properties of the overlapping area. Take the minimum bounding rectangle of each cell as a reference and the bounding box of the inner area of ​​the image as the intensity of the cell;

[0039] S24. So far, these feature vectors only distinguish instances of cells based on their visual appearance and cannot explain the global spatiotemporal characteristics of cells.

[0040] S3. Intra-frame relationship modeling: The cell image sequence is modeled into a graph through intra-frame relationships based on a graph neural network, where each cell instance is represented by a node and the association is represented by an edge.

[0041] S31, because the preliminary feature extraction in step S2 only extracts the basic features of the cells, ignoring the interaction with the cells in the frame and other frames, and cannot track the trajectory of the cells. Therefore, the present invention proposes a new end-to-end model, which considers the interaction between cells in the frame and the relationship between cells and trajectories between different frames;

[0042] S32, within a frame, establish a graph model of the relationship between the target and the neighboring targets to obtain local tracking features; between frames, establish a graph model of the relationship between the target and the trajectory to obtain global tracking features. Indicates that the number is express;

[0043] S33. In terms of intra-frame modeling, the basic definition of graph neural networks is applied to represent cells as nodes and relationships as edges. The formula is:

[0044] G=(V,E)

[0045] Where V is the set of nodes and E is the set of edges. Let vi∈V represent a node, e ij =(v i ,v j )∈E represents the j The edge pointing to v i The potential connection between two vertices. i , i=1,…,M represents the instance of each cell, where M represents the instance of all cells in the entire sequence. The calculation formula is as follows:

[0046]

[0047] S34, T represents the length of the cell sequence, K t Grayscale image representing a cell instance. Since the labels of different cells in each frame of the cell image are also different, the number of cells is related to the number of cells entering and leaving the field of view and the mitosis events of the cells, K t Varies depending on the number of frames of the cell image;

[0048] S35, between frames ij Represents an example of cells in consecutive frames. In order to better display the trajectory of cell tracking, the present invention only links the trajectories of a pair of cells in a neighborhood area. The neighborhood of node v is defined as:

[0049] N(v)={u∈V(v,u)∈E}

[0050] S36, there is a node attribute X in a frame v , where X∈R n×d is the feature matrix of a node, X v ∈R d represents the feature vector of node v; the attribute of the edge is X e , where X e ∈R m×b is the characteristic matrix of the edge, represents the eigenvector of edge (v,u). The adjacency matrix A is an n×n matrix. If e ij ∈E then A ij =1; if Then A ij = 0. The present invention treats the inter-frame cell global relationship model as an edge classification problem, and the output edge function Y formula is as follows:

[0051]

[0052] S4. Metric learning: Apply a combination of ResNet architecture and loss function to further learn the node and edge features extracted from the preliminary features, so that the learned model can distinguish instances of different cells and assemble instances of the same cell.

[0053] S41. Before metric learning, preprocess the data: split the data set into training set, validation set, and test set. Normalize the pixel values ​​of the image according to the bounding box coordinates extracted from the preliminary features in S2; fill the cell image to ensure that the cell image is relatively centered;

[0054] S42. Apply the learning rate and weight decay specified by the ResNet18 network architecture to train the processed 2D data set, and obtain the feature dimension of the output layer to determine the feature dimension of the embedding layer. The embedder is composed of a multi-layer perceptron. A linear layer is created in the input layer and the output layer, and the ReLU function is added for activation. The input data is forward propagated, and then the output is propagated. Normalization is performed using the L2 norm;

[0055]

[0056] It represents the probability of whether each edge is activated: if it is activated (=1) or not activated (=0). ε is constrained by the miner function of metric learning to control the margin. First, an affinity matrix is ​​constructed, where each column in the matrix represents the similarity of all batch instances to this column;

[0057] S43. If an instance i and j are not in the same class, then i and j will form a hard negative example; if an instance i and l are in the same class, then i and l will form a hard positive example, but the similarity of hard positive examples is often not as good as the similarity of hard negative examples;

[0058] S44, the present invention uses GT edge data activation vector To train the model. Since most of the edges of the image are inactive, a multiple similarity loss function is used to solve the problem of data imbalance. The metric function of the multiple similarity loss function selects the adjusted cosine similarity, and the calculation formula is as follows:

[0059]

[0060] Where x,y represents the size of the neighborhood region, but since the size of the neighborhood region remains stable throughout the dataset, the number of neighborhood regions increases with the density of the frames. The number of frames, the length before iteration, the label and other data of the cell dataset are sampled to ensure that the characteristics of the cell can be considered while training.

[0061] S5. Comprehensive feature extraction: Use graph neural networks and message passing mechanisms to further update the node and edge data of the preliminary feature extraction to obtain updated node and edge features for training the optimal model for cell tracking.

[0062] S51, comprehensive feature extraction is to set up a feature fusion module based on the preliminary feature extraction in step S2 and the metric learning in step S3 using a message passing mechanism to integrate local and global tracking features;

[0063] S52, the number of message passing modules determines the scope of message passing - the association of cell instances in consecutive frames is also affected by sequences outside other frames. The last message passing module, i.e., the feature fusion module, consists of updated node and edge features;

[0064] S53, node feature update: First, define a fully connected layer with input channels and output channels, and use a multi-layer perceptron to activate the fully connected layer in an S-shaped ReLU, so that each node v i The features of are updated by multiplying the optimal result produced by the graph attention mechanism to summarize and learn the aggregation weight of each edge. The formula is as follows:

[0065] P node : R n×d →R dv

[0066] Where P node It is a vector function implemented by MLP, which updates the output node with dv feature by training its own node feature vector and neighboring node weights in step 2;

[0067] S54. Update of edge features: The edge update feature is also a function implemented by an MLP, and the formula is as follows:

[0068] P edge : R n×d →R d(v,u)

[0069] P edge The scalar trained by the graph attention mechanism is used to represent the weights, providing the edge features updated by the message passing module;

[0070] S55, but the edge and node features are updated alternately: P edgeReturns the updated features of each edge, P node Returns the edge features of the connected node update feature vector. The formula for integrating edge update features according to the feature fusion module is:

[0071]

[0072] S6. Cell lineage tracking: Cell trajectories are tracked by creating a directed graph by linking the relationships in each frame of the cell image.

[0073] S61, cell lineage tracking calculates the closest parent cell according to the centroid position of each cell's starting node through the segmentation labels in the spatiotemporal vector extracted by the comprehensive feature extraction in step S5, and creates a table: unique label (L), starting frame (B), ending frame (E) and parent track label (P), which contains the parent-child relationship specific to the cell frame across time, and clears any duplicates in the data;

[0074] S62. Process the parent-child relationship of cells according to the parameters in the table. If the graph is undirected, the edges will be merged and matched appropriately. If the graph is directed, the sigmoid function will be directly applied to the prediction tensor, compared with the decision threshold, and set as the generated hard prediction.

[0075] S63. For each cell, generate links between nodes in the same frame and between nodes in consecutive frames; calculate the index of the next frame of the cell based on the links, check whether the frame of the current cell plus a certain number equals the frame of the next cell, if satisfied, establish links between corresponding nodes; finally handle the special cases including the first frame and the end frame. Each link represents a movement trajectory of the cell, that is, the lineage of the cell.

[0076] The present invention is described above by way of example. It should be noted that, without departing from the core of the present invention, the above is only a preferred embodiment of the present invention. It should be pointed out that, for a person skilled in the art, without departing from the principle of the present invention, several improvements and modifications may be made, and these improvements and modifications shall also be regarded as within the scope of protection of the present invention.

[0077] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A cell tracking method based on GNN intra-frame relationship modeling, characterized in that: The method comprises the following steps: S1. Mask R-CNN cell detection: The 2D dataset of pancreatic stem cells on a polystyrene matrix is ​​used as the research object of this experiment. By extracting features from candidate regions, CNN is used to obtain region boxes and an end-to-end cell detection model is constructed. S2, preliminary feature extraction: each detected target cell is represented by a feature vector; S3, intra-frame relationship modeling: The intra-frame relationship of the cell image sequence is modeled into a graph based on a graph neural network, where each cell instance is represented by a node and the relationship is represented by an edge; S4, metric learning: Apply the combination of ResNet architecture and loss function to further learn the node and edge features extracted from the preliminary features, so that the learned model can distinguish instances of different cells and assemble instances of the same cell; S5. Comprehensive feature extraction: Use graph neural network and message passing mechanism to further update the node and edge data of preliminary feature extraction to obtain updated node and edge features for training the best model for cell tracking; S6. Cell lineage tracking: Cell trajectories are tracked by creating a directed graph by linking the relationships in each frame of the cell image.

2. A cell tracking method based on GNN intra-frame relationship modeling according to claim 1, characterized in that: The Mask R-CNN cell detection in step S1: The Mask R-CNN network model is used as the basic framework, and the cells in each frame are displayed with colored bounding boxes through the generation of candidate regions to achieve cell detection.

3. The cell tracking method based on GNN intra-frame relationship modeling according to claim 1, characterized in that: The preliminary feature extraction in step S2 includes: frame number, area, bounding box coordinates, centroid, cell major and minor axis length, and intensity. Mask R-CNN is used to extract the horizontal and vertical coordinates of the cell's centroid and the area of ​​the bounding box.

4. The cell tracking method based on GNN intra-frame relationship modeling according to claim 1, characterized in that: The intra-frame relationship modeling in step S3 includes: acquiring global features of cell tracking by introducing an end-to-end learning framework and considering the relationship between cells within a frame and the association relationship between target cells and trajectories between frames.

5. The cell tracking method based on GNN intra-frame relationship modeling according to claim 1, characterized in that: The cell lineage tracking in step S6 includes: generating links between nodes in the same frame and between nodes in consecutive frames through the segmentation labels in the spatiotemporal vector extracted by comprehensive features in step S5, and each link represents a movement trajectory of a cell, that is, the lineage of the cell.

Citation Information

Cited By

  • Method and system for monitoring cervical cancer cell reproduction inhibition state of traditional Chinese medicine

    CN120015368A

  • Cell tracking method based on intra-frame relation modeling and edge feature map attention network

    CN120070505A