CN118430650A - Chromosome key point sequence prediction method and device - Google Patents
Chromosome key point sequence prediction method and device Download PDFInfo
- Publication number
- CN118430650A CN118430650A CN202410897387.9A CN202410897387A CN118430650A CN 118430650 A CN118430650 A CN 118430650A CN 202410897387 A CN202410897387 A CN 202410897387A CN 118430650 A CN118430650 A CN 118430650A
- Authority
- CN
- China
- Prior art keywords
- chromosome
- point
- prediction
- sequence
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 210000000349 chromosome Anatomy 0.000 title claims abstract description 121
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000012549 training Methods 0.000 claims abstract description 18
- 125000004122 cyclic group Chemical group 0.000 claims abstract description 8
- 239000013598 vector Substances 0.000 claims description 59
- 230000006870 function Effects 0.000 claims description 10
- 239000011159 matrix material Substances 0.000 claims description 9
- 238000012545 processing Methods 0.000 claims description 9
- 230000002759 chromosomal effect Effects 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 6
- 230000004913 activation Effects 0.000 claims description 3
- 238000013528 artificial neural network Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 238000010801 machine learning Methods 0.000 claims description 3
- 238000011176 pooling Methods 0.000 claims description 3
- 210000002230 centromere Anatomy 0.000 description 6
- 238000004458 analytical method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000001514 detection method Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 108091060290 Chromatid Proteins 0.000 description 3
- 210000004756 chromatid Anatomy 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 210000004027 cell Anatomy 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 206010008805 Chromosomal abnormalities Diseases 0.000 description 1
- 208000031404 Chromosome Aberrations Diseases 0.000 description 1
- 230000002159 abnormal effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000031864 metaphase Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 108091035539 telomere Proteins 0.000 description 1
- 210000003411 telomere Anatomy 0.000 description 1
- 102000055501 telomere Human genes 0.000 description 1
- 230000005945 translocation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16B—BIOINFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR GENETIC OR PROTEIN-RELATED DATA PROCESSING IN COMPUTATIONAL MOLECULAR BIOLOGY
- G16B30/00—ICT specially adapted for sequence analysis involving nucleotides or amino acids
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
- G06N3/0455—Auto-encoder networks; Encoder-decoder networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0464—Convolutional networks [CNN, ConvNet]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/60—Type of objects
- G06V20/69—Microscopic objects, e.g. biological cells or cellular parts
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/70—Labelling scene content, e.g. deriving syntactic or semantic representations
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16B—BIOINFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR GENETIC OR PROTEIN-RELATED DATA PROCESSING IN COMPUTATIONAL MOLECULAR BIOLOGY
- G16B40/00—ICT specially adapted for biostatistics; ICT specially adapted for bioinformatics-related machine learning or data mining, e.g. knowledge discovery or pattern finding
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- General Physics & Mathematics (AREA)
- Biophysics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Medical Informatics (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Multimedia (AREA)
- Biotechnology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Spectroscopy & Molecular Physics (AREA)
- Evolutionary Biology (AREA)
- Databases & Information Systems (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Public Health (AREA)
- Epidemiology (AREA)
- Bioethics (AREA)
- Chemical & Material Sciences (AREA)
- Analytical Chemistry (AREA)
- Proteomics, Peptides & Aminoacids (AREA)
- Measuring Or Testing Involving Enzymes Or Micro-Organisms (AREA)
- Image Analysis (AREA)
Abstract
The invention discloses a chromosome key point sequence prediction method and device. The method comprises the following steps: acquiring a chromosome image dataset marked with 5 key points; constructing a sequence prediction network model based on a transducer, and training the model by using the data set acquired in the step S1 to obtain a fully trained chromosome key point sequence prediction model; inputting a new single chromosome image to be tested into the chromosome key point sequence prediction model, inputting a space occupation symbol, starting cyclic prediction, and after predicting one point each time, putting the single chromosome image into the input to predict the next point again until 5 key points are all predicted, namely, drawing a chromosome image marked with 5 key point positions. The invention aims to establish a key point set sequence to construct the association relation between key points, replace the existing discrete prediction method of the key points and finally lead the prediction of the key point set to be more reasonable and reliable.
Description
Technical Field
The invention relates to the technical field of chromosome key point prediction under optical cell images, in particular to a chromosome key point sequence prediction method and device.
Background
In the abnormal chromosome karyotype judgment under the cell optical image, the detection of key points is an important technology. This is because key point detection can help identify specific regions of the chromosome, such as centromeres, telomeres, etc., while structural changes of the chromosome, such as breaks, deletions, inversions or translocations, etc., can be revealed, which are common forms of chromosomal abnormalities.
Key points generally refer to the endpoints and centromere points on both ends of a chromosome. Chromosome centromeres refer to the junction of two sister chromatids of a metaphase chromosome, and are positioned at the main constriction of the chromosome, and the centromeres divide the two chromatids into a short arm (p) and a long arm (q); after chromosome segmentation and classification, the alignment operation of the centromere of the chromosome and the homologous chromosome is required, according to the international standard requirement, all chromosomes in one split phase are not only arranged according to numbers, but also are required to be placed in the directions of the short arm upwards and the long arm downwards, and meanwhile doctors prefer two homologous similar chromosomes to be placed according to the principle of centromere approaching.
In the prior related research, researchers generally use a convolutional neural network-based method to directly predict key points of chromosome images at one time and activate the key points in a thermodynamic diagram mode. The point set predicted by the method has larger disturbance, because the convolutional neural network may predict excessive thermodynamic extremum, but only the largest points can be finally obtained; secondly, the predicted points are discrete, and no association relation exists between the points, so that sometimes obvious low-level errors exist between key points, and even almost coincident points exist. Based on the above problems, the existing key point prediction mode can make the predicted value difficult to process, and lacks logic, so that a more reasonable prediction algorithm is particularly important.
Disclosure of Invention
The invention aims to provide a chromosome key point sequence prediction method and device. The method aims at establishing a key point set sequence to construct an association relation between key points, replaces the existing key point discrete prediction method, and finally enables the prediction of the key point set to be more reasonable and reliable.
In a first aspect, the present invention provides a method for predicting a sequence of chromosomal keypoints, comprising:
S1, acquiring a chromosome image dataset marked with 5 key points; the method comprises the steps of marking 5 key points of a chromosome on the left upper corner, the right upper corner, the left lower corner, the right lower corner and the centromere center point of the chromosome on the premise that the chromosome is correctly placed;
S2, constructing a sequence prediction network model based on a transducer, and training the model by using the data set acquired in the S1 to obtain a fully trained chromosome key point sequence prediction model;
S3, inputting a new single chromosome image to be tested into the chromosome key point sequence prediction model, inputting a space occupation symbol, starting cyclic prediction, putting the single chromosome image into the input for predicting the next point again after predicting one point each time until 5 key points are completely predicted, and drawing a chromosome image marked with 5 key point positions.
More specifically, the transducer is composed of an encoder responsible for encoding the chromosome image and a decoder responsible for predicting 5 key points of the chromosome in sequence through the encoding of the chromosome image.
More specifically, during a data flow process, the transform will first encode a chromosome image X with dimension 64×64 into a feature vector V, and then input the point vector p_last obtained by the previous prediction and V into the decoder together, so as to obtain the point p_pred predicted by the current round; where V has a length of 256, P_last and P_pred have lengths of (n, 4098), n representing the number of points that are currently predicted.
More specifically, the encoder is responsible for encoding the chromosome image, including:
a process of encoding X into a vector V;
The method comprises the steps of processing a convolution layer before global pooling in ResNet neural network, coding a chromosome image X into a feature matrix with a dimension of (C, H, W), straightening second and third dimensions of the feature matrix to obtain a feature matrix F with a dimension of (C, H×W), and finally obtaining a feature vector V through self-attention operation, wherein the specific calculation formula is as follows: ;
where W Q、WK、WV is the parameters in the model, d k is the dimension, and softmax is the activation function commonly used in the machine learning field, respectively.
More specifically, the p_last and p_pred are one-dimensional point vectors, which are converted into two-dimensional coordinates in the euclidean space, and the conversion formulas of the coordinates x, y and the point vector P in the two-dimensional euclidean space are as follows:
;
Wherein onehot () represents the one-hot encoding of the number with a length of 4098, c represents the number of columns of the image, and 2 is added because the first and second bits of the fetch vector P are the start and end placeholders, respectively; similarly, the formula scaled to x, y by P is as follows:
;
Where the symbol% represents the remainder, the symbol// represents the rounding division, and argmax () represents the maximum index of the rounding vector.
More specifically, the decoder employs a combination of a mask multi-head attention module, a multi-head attention module, and a plurality of fully connected layers. The mask multi-head attention module is responsible for processing the point vector P, and the multi-head attention module is responsible for processing the pre-information and the feature vector V of the image.
More specifically, the training of the model uses KL divergence as a loss function, as follows:
;
Wherein, P (i) represents the i-th value of the predicted point vector, p_y (i) represents the i-th value of the point vector of the label, KL divergence is used as a loss function, the prediction of the point vector is regarded as a probability distribution fitting process, each node on the point vector can return gradient learning, the distribution always tends to be reasonable, multiple times of training are carried out until the average euclidean distance difference value is converged to 1, a model is saved, and training is ended.
In a second aspect, the present invention provides a chromosome keypoint sequence prediction apparatus comprising:
an acquisition unit for acquiring a chromosome image dataset labeled with 5 key points; the method comprises the steps of marking 5 key points of a chromosome on the left upper corner, the right upper corner, the left lower corner, the right lower corner and the centromere center point of the chromosome on the premise that the chromosome is correctly placed;
The training unit is used for constructing a sequence prediction network model based on a transducer, training the model by using the data set acquired in the step S1, and obtaining a fully trained chromosome key point sequence prediction model;
And the prediction output unit is used for inputting a new single chromosome image to be tested into the chromosome key point sequence prediction model, inputting a space occupation symbol, starting cyclic prediction, and putting the single chromosome image into the input for predicting the next point again after predicting one point each time until 5 key points are all predicted, namely drawing the chromosome image marked with 5 key point positions.
In a third aspect, the present invention provides an electronic device comprising: a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to perform the steps of the method of the first aspect above.
The invention has the beneficial effects that: the chromosome key point sequence prediction method based on the Transformer can effectively capture complex relations and modes in chromosome images by using a self-attention machine of the Transformer, thereby realizing accurate prediction of chromosome key points. The key point prediction Euclidean distance difference value of the model trained by the invention on the test set can be converged to less than 1, and the model has excellent key point detection effect on bifurcated and bent chromosomes. Accurate prior information can be provided for subsequent chromosome alignment, classification, principal axis extraction, stripe analysis and the like.
Drawings
For a further understanding of the nature and technical aspects of the present invention, reference should be made to the following detailed description of the invention and to the accompanying drawings, which are provided for purposes of reference only and are not intended to limit the invention.
FIG. 1 is a flow chart of the transform-based chromosome keypoint sequence prediction of the present invention;
FIG. 2 is a schematic diagram of 5 key points of a chromosome according to the present invention;
FIG. 3 is a schematic diagram of a process for sequentially predicting chromosomal keypoints according to the present invention;
FIG. 4 is a block diagram of a transducer of the present invention;
FIG. 5 is a schematic diagram of the predictive process of the model of the present invention;
Marked in the figure as: 1-upper left corner point, 2-upper right corner point, 3-lower left corner point, 4-lower right corner point and 5-centromere center point.
Detailed Description
In order to further explain the technical means adopted by the present invention and the effects thereof, the following detailed description is given with reference to the preferred embodiments of the present invention and the accompanying drawings.
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on the drawings are merely for convenience in describing the present application and simplifying the description, and do not indicate or imply that the apparatus or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present application. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more features. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the present application, the term "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described as "exemplary" in this disclosure is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for purposes of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes have not been described in detail so as not to obscure the description of the application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
The invention aims to establish a key point set sequence to construct the association relation between key points, replace the existing discrete prediction method of the key points and finally lead the prediction of the key point set to be more reasonable and reliable. The following describes in detail the chromosome keypoint sequence prediction based on the transducer of the present invention.
Referring to fig. 1, an embodiment of the present invention provides a method for predicting a sequence of chromosome keypoints, including:
s1, acquiring a chromosome image dataset marked with 5 key points; the method comprises the steps that 5 key points of a chromosome are marked on an upper left corner 1, an upper right corner 2, a lower left corner 3, a lower right corner 4 and a centromere center point 5 of the chromosome on the premise that the chromosome is placed correctly; as shown in FIG. 2, a chromosome 1 is shown, and even though sister chromatids of its long arm are not separated, two key points of 4 and 5 are marked.
S2, constructing a sequence prediction network model based on a transducer, and training the model by using the data set acquired in the S1 to obtain a fully trained chromosome key point sequence prediction model;
S3, inputting a new single chromosome image to be tested into the chromosome key point sequence prediction model, inputting a space occupation symbol, starting cyclic prediction, putting the single chromosome image into the input for predicting the next point again after predicting one point each time until 5 key points are completely predicted, and drawing a chromosome image marked with 5 key point positions.
The method comprises the steps of dividing a chromosome image to be tested by the existing correlation method to obtain a region of interest (ROI) of the chromosome image, directly inputting the ROI image into a model trained in the step 2 without alignment, inputting a space occupying symbol, starting cyclic prediction, and putting the single chromosome image into the input for predicting the next point again after predicting one point each time until 5 key points are all predicted. As shown in fig. 3,5 key points of the chromosome are predicted in turn, and the prediction of each point affects the prediction of the following point, and it should be noted that the convertors in the figure are the same model.
The region of interest (ROI, region of Interest) is set to reduce the amount of computation and to filter out targets that are not in the region of interest, thereby increasing the speed and accuracy of the algorithm execution and further improving the accuracy of the passenger flow statistics.
As shown in fig. 4, the transducer used in the present invention is composed of one encoder and one decoder. In a data flow process, a chromosome image X with dimensions of 64×64 is encoded into a feature vector V, and then, a point vector p_last obtained by the previous prediction is input to a decoder together with the point vector V, so as to obtain a point p_pred predicted by the current prediction. Where the length of V is set to 256, the lengths of p_last and p_pred are set to (n, 4098), n representing the number of points that have been predicted currently.
For the process of encoding X into vector V, the present invention uses a neural network of class ResNet for processing. The invention removes ResNet full-connection and classification layers, and only retains the convolution layers before global pooling, where the chromosome image X is encoded into a feature matrix of dimension (C, H, W). Then, the second dimension and the third dimension of the feature matrix are straightened to obtain a feature matrix F with one dimension of (C, H multiplied by W), and a feature vector V is finally obtained through self-attention operation, wherein the specific calculation formula is as follows:
;
Wherein, W Q、WK、WV is a parameter in the model, d k is a dimension, in this example, set to 256, and softmax is an activation function commonly used in the machine learning field, which is not described in detail in the present invention.
As described above, p_pred and p_last in fig. 4 are both one-dimensional point vectors, but what the present invention needs to predict is two-dimensional coordinates in the european space, specifically, conversion formulas of coordinates x, y and point vector P in the two-dimensional european space are as follows:
;
Wherein onehot () represents the one-hot encoding of numbers with a length of 4098, and c represents the number of columns of the image, and 2 is added because the first and second bits of the fetch vector P are the start and end placeholders, respectively. Similarly, the formula scaled to x, y by P is as follows:
;
Where the symbol% represents the remainder, the symbol// represents the rounding division, and argmax () represents the maximum index of the rounding vector.
The decoder in fig. 4 adopts a combination of a mask multi-head attention module, a multi-head attention module and a plurality of fully connected layers, wherein the mask multi-head attention mechanism is responsible for processing the point vector P, and the multi-head attention mechanism is responsible for processing the pre-information and the feature vector V of the image.
After the data are processed according to the method, model training can be performed, and in the invention, the prediction of each sample refers to predicting the n+1th point on the premise of knowing n predicted points. In this example it is explicitly pointed out that the length of a point vector P is 4098, comprising two start-end placeholders and 4096 coordinate points. If MSE loss function is used according to general point prediction thought, gradient return strategy is too redundant, maximum index operation is involved in the process from P to (x, y), and the process is not conductive, so that more reasonable KL divergence is adopted as loss function, and the formula is as follows:
;
Where P (i) represents the i-th value of the predicted point vector and P_y (i) represents the i-th value of the point vector of the tag. The invention uses KL divergence as a loss function, and considers the prediction of the point vector as a probability distribution fitting process, so that each node on the point vector can return gradient learning, and the distribution always tends to be reasonable. And performing multiple times of training until the average Euclidean distance difference value converges to 1, and storing the model to finish the training.
In this embodiment, a complete prediction process using the model trained by the present invention will be described, and for convenience of representing the point vector P, specific values are used to represent the vector P in the present invention, for example, p=1 represents that the first node on the vector P with a length of 4098 has a value of 1, the other nodes have a value of 0, and so on.
Fig. 5 shows a prediction process according to the present invention, in which a chromosome image with a resolution of 64×64 is encoded into a feature vector V by an encoder, the process is only required to be performed once, and the feature vector V encoded by the process can be reused in each subsequent decoding process. In the first round of decoding, a start placeholder point vector 1 is input, a first point vector 3733 of a chromosome is obtained through decoding after a decoder, and coordinates represented by the point are (19, 58); in the second round of decoding, the point vector 3733 obtained in the first round and the start placeholder point vector 1 are combined into a new point vector a, which is marked as [1, 3733], and are input into an encoder together, so that a predicted point vector b of a second round of the chromosome can be obtained, which is marked as [1, 3733, 2887], and the coordinates represented by the point are (5, 45); repeating the process to obtain point vectors c [1, 3733, 2887, 829] of a third round in sequence, wherein the coordinates are (59, 12); a fourth wheel of point vectors d [1, 3733, 2887, 829, 307], coordinates (49,4); the point vector e [1, 3733, 2887, 829, 307, 2399] of the fifth round, coordinates (26, 37); prediction was stopped until 5 keypoints of the chromosome were predicted.
The final predicted point vector in this example is [1, 3733, 2887, 829, 307, 2399], after the first placeholder is removed, the coordinates of 5 points are converted to be (19,58), (5,45), (59,12), (49,4), (26,37), and 5 points are drawn as shown in the figure. So far, in this example, all the 5 key points of the chromosome are obtained, and then the subsequent other analysis such as alignment, classification, streak analysis, principal axis analysis, straightening and the like can be further performed.
The invention provides a chromosome key point sequence prediction device, which comprises:
an acquisition unit for acquiring a chromosome image dataset labeled with 5 key points; the method comprises the steps that 5 key points of a chromosome are marked on an upper left corner 1, an upper right corner 2, a lower left corner 3, a lower right corner 4 and a centromere center point 5 of the chromosome on the premise that the chromosome is placed correctly;
The training unit is used for constructing a sequence prediction network model based on a transducer, training the model by using the data set acquired in the step S1, and obtaining a fully trained chromosome key point sequence prediction model;
And the prediction output unit is used for inputting a new single chromosome image to be tested into the chromosome key point sequence prediction model, inputting a space occupation symbol, starting cyclic prediction, and putting the single chromosome image into the input for predicting the next point again after predicting one point each time until 5 key points are all predicted, namely drawing the chromosome image marked with 5 key point positions.
According to the chromosome key point sequence prediction device based on the Transformer, the complex relation and mode in the chromosome image are efficiently captured through the self-attention module of the Transformer, so that accurate prediction of the chromosome key points is realized. The key point prediction Euclidean distance difference value of the model trained by the invention on the test set can be converged to less than 1, and the model has excellent key point detection effect on bifurcated and bent chromosomes. Accurate prior information can be provided for subsequent chromosome alignment, classification, principal axis extraction, stripe analysis and the like.
The embodiment of the invention also provides an electronic device, a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to enable the processor to execute the steps of the method.
The embodiment of the invention also provides a storage medium, and a computer program is stored in the storage medium, and when the computer program is executed by a processor, part or all of the steps in each embodiment of chromosome key point sequence prediction based on the Transformer provided by the invention are realized. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a Random Access Memory (RAM), or the like.
It will be apparent to those skilled in the art that the techniques of embodiments of the present invention may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in essence or what contributes to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments or some parts of the embodiments of the present invention.
The same or similar parts between the various embodiments in this specification are referred to each other. In particular, for embodiments of the density map-based passenger flow statistics apparatus, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments where relevant.
The embodiments of the present invention described above do not limit the scope of the present invention.
Claims (9)
1. A method for predicting a sequence of chromosomal keypoints, comprising:
S1, acquiring a chromosome image dataset marked with 5 key points; the method comprises the steps of marking 5 key points of a chromosome on the left upper corner, the right upper corner, the left lower corner, the right lower corner and the centromere center point of the chromosome on the premise that the chromosome is correctly placed;
S2, constructing a sequence prediction network model based on a transducer, and training the model by using the data set acquired in the S1 to obtain a fully trained chromosome key point sequence prediction model;
S3, inputting a new single chromosome image to be tested into the chromosome key point sequence prediction model, inputting a space occupation symbol, starting cyclic prediction, putting the single chromosome image into the input for predicting the next point again after predicting one point each time until 5 key points are completely predicted, and drawing a chromosome image marked with 5 key point positions.
2. The method for predicting a sequence of key points of a chromosome according to claim 1, wherein the fransformer is composed of an encoder for encoding the chromosome image and a decoder for predicting 5 key points of the chromosome in sequence by encoding the chromosome image.
3. The method for predicting a sequence of key points of a chromosome according to claim 2, wherein the transform encodes a chromosome image X having a dimension of 64X 64 into a feature vector V during one data flow, and then inputs the point vectors p_last obtained by the previous prediction and V together into the decoder to obtain the point p_pred predicted by the current prediction; where V has a length of 256, P_last and P_pred have lengths of (n, 4098), n representing the number of points that are currently predicted.
4. A method of predicting a sequence of chromosomal keypoints according to claim 2, wherein the encoder is responsible for encoding the chromosomal image, comprising:
a process of encoding X into a vector V;
The method comprises the steps of processing a convolution layer before global pooling in ResNet neural network, coding a chromosome image X into a feature matrix with a dimension of (C, H, W), straightening second and third dimensions of the feature matrix to obtain a feature matrix F with a dimension of (C, H×W), and finally obtaining a feature vector V through self-attention operation, wherein the specific calculation formula is as follows: ;
where W Q、WK、WV is the parameters in the model, d k is the dimension, and softmax is the activation function commonly used in the machine learning field, respectively.
5. A method for predicting a sequence of chromosomal keypoints according to claim 3, wherein p_last and p_pred are one-dimensional point vectors, which are converted into two-dimensional coordinates in the euclidean space, and the conversion formulas of the coordinates x, y and the point vector P in the two-dimensional euclidean space are as follows:
;
Wherein onehot () represents the one-hot encoding of the number with a length of 4098, c represents the number of columns of the image, and 2 is added because the first and second bits of the fetch vector P are the start and end placeholders, respectively; similarly, the formula scaled to x, y by P is as follows:
;
Where the symbol% represents the remainder, the symbol// represents the rounding division, and argmax () represents the maximum index of the rounding vector.
6. A method of predicting a sequence of chromosomal keypoints according to claim 2, wherein the decoder is in the form of a combination of a mask multi-head attention module, a multi-head attention module and a number of fully connected layers, wherein the mask multi-head attention module is responsible for processing the point vector P and the multi-head attention module is responsible for processing the pre-information and the feature vector V of the image.
7. The method for predicting a sequence of chromosomal keypoints according to claim 1, wherein the model is trained using KL divergence as a loss function, as follows:
;
Wherein, P (i) represents the i-th value of the predicted point vector, p_y (i) represents the i-th value of the point vector of the label, KL divergence is used as a loss function, the prediction of the point vector is regarded as a probability distribution fitting process, each node on the point vector can return gradient learning, the distribution always tends to be reasonable, multiple times of training are carried out until the average euclidean distance difference value is converged to 1, a model is saved, and training is ended.
8. A chromosome keypoint sequence prediction apparatus, comprising:
an acquisition unit for acquiring a chromosome image dataset labeled with 5 key points; the method comprises the steps of marking 5 key points of a chromosome on the left upper corner, the right upper corner, the left lower corner, the right lower corner and the centromere center point of the chromosome on the premise that the chromosome is correctly placed;
The training unit is used for constructing a sequence prediction network model based on a transducer, training the model by using the data set acquired in the step S1, and obtaining a fully trained chromosome key point sequence prediction model;
And the prediction output unit is used for inputting a new single chromosome image to be tested into the chromosome key point sequence prediction model, inputting a space occupation symbol, starting cyclic prediction, and putting the single chromosome image into the input for predicting the next point again after predicting one point each time until 5 key points are all predicted, namely drawing the chromosome image marked with 5 key point positions.
9. An electronic device, comprising: a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410897387.9A CN118430650B (en) | 2024-07-05 | 2024-07-05 | Chromosome key point sequence prediction method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410897387.9A CN118430650B (en) | 2024-07-05 | 2024-07-05 | Chromosome key point sequence prediction method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118430650A true CN118430650A (en) | 2024-08-02 |
CN118430650B CN118430650B (en) | 2024-09-27 |
Family
ID=92311061
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410897387.9A Active CN118430650B (en) | 2024-07-05 | 2024-07-05 | Chromosome key point sequence prediction method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118430650B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200012838A1 (en) * | 2018-07-06 | 2020-01-09 | Tata Consultancy Services Limited | Method and system for automatic chromosome classification |
CN111105032A (en) * | 2019-11-28 | 2020-05-05 | 华南师范大学 | Chromosome structure abnormality detection method, system and storage medium based on GAN |
US20210312285A1 (en) * | 2018-08-27 | 2021-10-07 | Hangzhou Diagens Biotech Co.,LTD. | Chromosome recognition method based on deep learning |
CN115147661A (en) * | 2022-07-25 | 2022-10-04 | 浙大城市学院 | Chromosome classification method, device, equipment and readable storage medium |
CN115330603A (en) * | 2022-10-17 | 2022-11-11 | 湖南自兴智慧医疗科技有限公司 | Human chromosome image rectification method based on deep learning convolutional neural network |
CN115579129A (en) * | 2022-10-24 | 2023-01-06 | 西交利物浦大学 | Down syndrome screening method, device, equipment and storage medium based on Transformer |
CN117437633A (en) * | 2023-11-09 | 2024-01-23 | 中信湘雅生殖与遗传专科医院有限公司 | Chromosome image quality evaluation method, chromosome image quality evaluation device, chromosome image quality evaluation computer device, and chromosome image quality evaluation storage medium |
CN117575111A (en) * | 2024-01-16 | 2024-02-20 | 安徽农业大学 | Agricultural remote sensing image space-time sequence prediction method based on transfer learning |
-
2024
- 2024-07-05 CN CN202410897387.9A patent/CN118430650B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20200012838A1 (en) * | 2018-07-06 | 2020-01-09 | Tata Consultancy Services Limited | Method and system for automatic chromosome classification |
US20210312285A1 (en) * | 2018-08-27 | 2021-10-07 | Hangzhou Diagens Biotech Co.,LTD. | Chromosome recognition method based on deep learning |
CN111105032A (en) * | 2019-11-28 | 2020-05-05 | 华南师范大学 | Chromosome structure abnormality detection method, system and storage medium based on GAN |
CN115147661A (en) * | 2022-07-25 | 2022-10-04 | 浙大城市学院 | Chromosome classification method, device, equipment and readable storage medium |
CN115330603A (en) * | 2022-10-17 | 2022-11-11 | 湖南自兴智慧医疗科技有限公司 | Human chromosome image rectification method based on deep learning convolutional neural network |
CN115579129A (en) * | 2022-10-24 | 2023-01-06 | 西交利物浦大学 | Down syndrome screening method, device, equipment and storage medium based on Transformer |
CN117437633A (en) * | 2023-11-09 | 2024-01-23 | 中信湘雅生殖与遗传专科医院有限公司 | Chromosome image quality evaluation method, chromosome image quality evaluation device, chromosome image quality evaluation computer device, and chromosome image quality evaluation storage medium |
CN117575111A (en) * | 2024-01-16 | 2024-02-20 | 安徽农业大学 | Agricultural remote sensing image space-time sequence prediction method based on transfer learning |
Non-Patent Citations (2)
Title |
---|
MUYU YANG等: "UNADON: Transformer-based model to predict genome-wide chromosome spatial position", ARXIV, 26 April 2023 (2023-04-26) * |
李康;谢宁;李旭;谭凯;: "基于卷积神经网络和几何优化的统计染色体核型分析方法", 南京大学学报(自然科学), no. 01, 30 January 2020 (2020-01-30) * |
Also Published As
Publication number | Publication date |
---|---|
CN118430650B (en) | 2024-09-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112651373B (en) | Method and device for identifying text information of building drawing | |
CN112085072B (en) | Cross-modal retrieval method of sketch retrieval three-dimensional model based on space-time characteristic information | |
CN111650453A (en) | Power equipment diagnosis method and system based on windowing characteristic Hilbert imaging | |
CN110874591B (en) | Image positioning method, device, equipment and storage medium | |
CN110245683B (en) | Residual error relation network construction method for less-sample target identification and application | |
CN111915555B (en) | 3D network model pre-training method, system, terminal and storage medium | |
CN112001399B (en) | Image scene classification method and device based on local feature saliency | |
CN116228792A (en) | Medical image segmentation method, system and electronic device | |
CN116189172B (en) | 3D target detection method, device, storage medium and chip | |
CN117152554A (en) | ViT model-based pathological section data identification method and system | |
CN112668608B (en) | Image recognition method and device, electronic equipment and storage medium | |
CN117975002A (en) | Weak supervision image segmentation method based on multi-scale pseudo tag fusion | |
CN114663579B (en) | Twin three-dimensional model generation method and device, electronic equipment and storage medium | |
CN118430650B (en) | Chromosome key point sequence prediction method and device | |
CN114332047A (en) | Construction method and application of surface defect detection model | |
CN117892059A (en) | Electric energy quality disturbance identification method based on multi-mode image fusion and ResNetXt-50 | |
CN116386803A (en) | Cytopathology report generation method based on graph | |
CN114494284B (en) | Scene analysis model and method based on explicit supervision area relation | |
CN113222887A (en) | Deep learning-based nano-iron labeled neural stem cell tracing method | |
CN113268625A (en) | Fine-grained cloth image retrieval method based on cross entropy loss function | |
CN111861045B (en) | Rapid generation method of offshore shortest route for massive digital water depth model data body | |
CN111882543A (en) | Cigarette filter stick counting method based on AA R2Unet and HMM | |
Xu et al. | Research on single image super-resolution algorithm based on region perception | |
CN111435537A (en) | Model training method and device and pose optimization method and device based on splicing map | |
CN115909316B (en) | Light end-to-end license plate identification method for data non-uniform scene |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |