CN117011234A - Chromosome anomaly detection system and method based on denoising diffusion probability model - Google Patents

Chromosome anomaly detection system and method based on denoising diffusion probability model Download PDF

Info

Publication number
CN117011234A
CN117011234A CN202310784284.7A CN202310784284A CN117011234A CN 117011234 A CN117011234 A CN 117011234A CN 202310784284 A CN202310784284 A CN 202310784284A CN 117011234 A CN117011234 A CN 117011234A
Authority
CN
China
Prior art keywords
image
chromosome
denoising
original image
model
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.)
Pending
Application number
CN202310784284.7A
Other languages
Chinese (zh)
Inventor
余永国
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
XinHua Hospital Affiliated To Shanghai JiaoTong University School of Medicine
Original Assignee
XinHua Hospital Affiliated To Shanghai JiaoTong University School of Medicine
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by XinHua Hospital Affiliated To Shanghai JiaoTong University School of Medicine filed Critical XinHua Hospital Affiliated To Shanghai JiaoTong University School of Medicine
Priority to CN202310784284.7A priority Critical patent/CN117011234A/en
Publication of CN117011234A publication Critical patent/CN117011234A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0012Biomedical image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/061Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using biological neurons, e.g. biological neurons connected to an integrated circuit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/003Reconstruction from projections, e.g. tomography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30204Marker

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • Computational Linguistics (AREA)
  • Neurology (AREA)
  • Quality & Reliability (AREA)
  • Medical Informatics (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Probability & Statistics with Applications (AREA)
  • Algebra (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a chromosome abnormality detection system and a chromosome abnormality detection method based on a denoising diffusion probability model, wherein a forward diffusion model is used for adding noise to an input chromosome image as an original image in t times along a Markov process until a pure noise image is obtained; traversing the inverse diffusion model backwards along a Markov chain to perform t denoising operations on the pure noise image to obtain a reconstructed image; and the analysis model calculates the mean square error of the original image and the reconstructed image, compares the obtained mean square error with a preset threshold value, and judges that the original image with the mean square error larger than the threshold value is abnormal, otherwise, the original image with the mean square error larger than the threshold value is normal. The beneficial effects of the invention are as follows: compared with the traditional detection mode, the invention has the advantages of high efficiency, accuracy and the like.

Description

Chromosome anomaly detection system and method based on denoising diffusion probability model
Technical Field
The invention relates to the field of medical image analysis, in particular to a chromosome abnormality detection system and a chromosome abnormality detection method based on a denoising diffusion probability model.
Background
Chromosome structural abnormalities mean that chromosome or chromosome monomers undergo a break-over-change or exchange mechanism to produce a chromosome aberration (chromosome aberration) and a chromosome aberration (chromatid aberration). Including loss of fragments from the chromosome (Deletion) (resulting in a reduction in the number of genes on the chromosome); increased Duplication of fragments (resulting in increased number of genes on chromosomes); the chromosome fragment was inverted 180 ° (Inversion) (the order of genes on this chromosome segment was reversed from the order of other genes, and the number of genes was not changed); translocation (including reciprocal Translocation and non-reciprocal Translocation) of reciprocal fragments between non-homologous chromosomes, and the like.
Genetically, the method comprises: most congenital malformations, mental disabilities, and infertility are caused by chromosomal abnormalities. Cytogenetics and detection of structural abnormalities of chromosomes are also important in diagnosis, prognosis, screening and monitoring of treatments for blood and tumors.
The conventional technical means mostly adopt chromosome counting to the karyotype analysis result, and are mostly suitable for detecting triploid syndrome. And lack of accurate detection means for chromosomal structural abnormalities.
For chromosome structure abnormality detection, the existing methods are mostly focused on the detection process. That is, the input single chromosome is subjected to classification prediction to determine whether or not abnormality exists. For abnormal categories and abnormal areas, automatic identification cannot be realized, and labeling must be performed by means of a professional doctor, so that the efficiency is very low.
Aiming at the chromosome structural abnormality such as the deletion of fragments, how to provide a high-efficiency and accurate detection system and method is the technical problem to be solved by the invention.
Disclosure of Invention
The invention aims to provide an accurate and efficient chromosome abnormality detection method based on a denoising diffusion probability model and a method thereof.
In order to achieve the above purpose, the present invention provides the following technical solutions:
a chromosome abnormality detection system based on a denoising diffusion probability model comprises a forward diffusion model, a reverse diffusion model and an analysis model; the forward diffusion model adds noise to the input chromosome image as an original image in t times along a Markov process until a pure noise image is obtained; the inverse diffusion model traverses backwards along a Markov chain to perform t denoising operations on the pure noise image to obtain a reconstructed image, wherein t is a natural number greater than 0; the analysis model compares the similarity of the original image and the reconstructed image to judge whether the original image is abnormal or normal; the forward diffusion model, the reverse diffusion model and the analysis model are all trained independently according to chromosome types chr1, chr2 … chr22, chrX and chrY to obtain a single model aiming at the chromosome type.
Preferably, the noise is Simplex noise, gaussian noise or white noise.
Preferably, in the training process, the value range of t is 1000-1500; in the detection process, the value range of t is 25-50.
The invention also provides a chromosome abnormality detection method based on the denoising diffusion probability model, which comprises the chromosome abnormality detection system based on the denoising diffusion probability model, and comprises the following steps:
s1, taking chromosome images of different types as an original image x 0 Inputting the image into a forward diffusion model of a corresponding type to perform t times of superposition and adding Simplex noise along a Markov process to obtain a pure noise image; wherein the forward diffusion model is formulated using the T step of the markov chain, namely: given data point x 0 At each step q (x t |x t-1 ) Add a Simplex noise to generate a new latent variable x t The method comprises the steps of carrying out a first treatment on the surface of the The distribution formula of the Simplex noise e is as follows: e-Simplex (v=2) -6 N=6, γ=0.8), t is the sequence number of each step operation, x is the image, x t Is the image of step t, x t-1 Is the image of step t-1, x 0 Is the original image of the input, q (x t |x t-1 ) Is the Markov process of the T step, T is the maximum number of steps and T > 1000, v and N, Y are both super parameters,v represents initial starting frequency, N represents noise measurement index, Y is noise attenuation rate;
s2, traversing the inverse diffusion model backwards along a Markov chain to perform t denoising operations on the pure noise image until a reconstructed image is obtained
S3, the analysis model is used for analyzing the original image x 0 Reconstructing an imageComparing the similarity degree, comparing the difference obtained by the comparison with a threshold value c obtained by pre-training, and comparing the original image x with the threshold value c 0 If the result is abnormal, the result is normal.
Preferably, the original image x0 in the step S1 is preprocessed, and the processing step includes:
s0-1, performing chromosome segmentation on an initial image containing a plurality of chromosomes through an automatic segmentation network to obtain an image only comprising one chromosome and a mask of the chromosome outline, and extracting the chromosome from the image;
s0-2, straightening the extracted chromosome in a manner that a short arm is arranged below an upper arm and a long arm, and filling a blank area with white pixels to obtain a rectangular single chromosome image;
s0-3, identifying chromosomes in the single chromosome image to obtain the types of the chromosomes.
Preferably, the step S2 includes the steps of:
s2-1, calculating a chromosome skeleton in an original image x0 by using a Zhang-Suen algorithm;
s2-2, traversing backwards along the Markov chain to perform t denoising operations on the pure noise image until a reconstructed image is obtainedWherein, each denoising operation takes the chromosome skeleton as a constraint;
the training method of the inverse diffusion model comprises the following steps:
s2-11, constructing a deep learning model pθ (xt-1|xt) by using a U-Net++ network, wherein pθ refers to the deep learning model;
s2-12, traversing backwards along a Markov chain to perform t denoising operations on the pure noise image; each denoising operation samples one noise epsilon-Simplex (v=2-6, n=6, gamma=0.8) from Simplex noise, and then performs denoising diffusion probability reconstruction on an input image; each layer of the deep learning model pθ is embedded into the chromosome skeleton obtained in the step S2-1, so that the network learns different morphological characteristics and structural information on different layers, and the U-Net++ network introduces an SE module to add an attention mechanism, and the implementation steps are as follows:
s2-12-1, compressing each channel of the U-Net++ network by using global average pooling to obtain a global feature vector of each channel,
s2-12-2, performing linear transformation on the global feature vector of the channel, and exciting by using an activation function to obtain the weight of each channel;
in the step S2-12, multiplying the weight of the channel with the input feature map in each denoising operation to obtain an output feature map reconstructed by denoising diffusion probability weighted by an attention mechanism, wherein the input feature map is the output feature map of the previous step;
the U-Net++ network is subjected to pruning training, and the implementation steps are as follows:
1) Training a complete U-Net++ network, and recording a gradient value Hessian matrix of each neuron or weight;
2) According to the gradient value and the index of the Hessian matrix, calculating the influence degree I of each neuron or weight on the output of the U-Net++ network i
Wherein I is i Representing the loss function of the ith neuron, w i Representing the ith neuron or weight;
3) Pruning neurons or weights according to a preset contribution threshold;
s2-13, calculating noise distribution E and deep learning predicted result E at t step length through loss function in each denoising operation θ Loss function L between t The expression is:
wherein t represents the t step, L of the diffusion process in the diffusion probability model t Represents the loss function value at the diffusion of the t-th step, E is Simplex noise generated by random sampling, and the input isAnd t, & lt>Is a manually set superparameter,/->The mathematical expected value is calculated, gradient is calculated for Lt, and training is carried out t times until the loss function converges.
Preferably, in said step S3, the original image x is subjected to a mean square error MSE calculation or a cross entropy loss function calculation 0 Reconstructing an imageComparing the similarity;
the method for calculating the MSE comprises the following steps:
wherein I is the reconstructed image->K is the original image x 0 The method comprises the steps of carrying out a first treatment on the surface of the I (I, j) is the value of the (I, j) th pixel in the test image, and K (I, j) is the value of the (I, j) th pixel in the reference image; original image x 0 The number of pixels of (2) is m×n; the MSE is smaller than the threshold value c, and the MSE is larger than or equal to the threshold value c;
the method for calculating the cross entropy loss function comprises the following steps:
with I being the reconstructed imageK is the original image x0; for the original image x0 and the reconstructed image +.>Respectively carrying out normalization processing on pixel values of (1), and marking as p and q;
let pi, j be the value of the (i, j) th pixel point in the original image, qi, j be the value of the (i, j) th pixel point in the reconstructed image; the pixel number of the original image x0 is m×n;
calculating a cross entropy loss function H (p, q):
if H (p, q) is smaller than the threshold value c, judging that the operation is normal, and if H (p, q) is larger than or equal to the threshold value c, judging that the operation is abnormal; the threshold c is obtained through pre-training;
wherein, the original image x0 and the reconstructed image are firstly aligned before the step S3The alignment is carried out, and the steps are as follows:
a) From the original image x0 and the reconstructed imageExtracting a plurality of characteristic points from the original image x0 and the reconstructed image +.>Matching the feature points in the model;
b) Removing the wrong matching points, and removing the wrong matching characteristic points by using a RANSAC algorithm;
c) Using a basis matrix or homography matrix to reconstruct an original image x0 and a reconstructed imagePerforming geometric transformation to obtain a transformation matrix; and transforming the original image x0 and the reconstructed image based on the feature points of the matching points +.>To align with another image.
Preferably, the solving step of the threshold c is as follows:
s4-1, taking N chromosome images which are manually marked as normal and N chromosome images which are manually marked as abnormal, inputting the N chromosome images into the denoising diffusion probability model to obtain a mean square error MSE of an original image and a reconstructed image, taking different thresholds, judging whether the input chromosome images are normal or abnormal,
s4-2, solving the true positive rate:
s4-3, solving false positive rate:
s4-4, solving sensitivity:
s4-5, solving the specificity:
s4-6, calculating a about step index J: j=sensitivity+specificity-1, and selecting the point with the largest J value as the optimal threshold c, wherein TP is the number of positive in both the judgment result and the labeling result, FN is the number of negative in both the judgment result and the labeling result, TN is the number of negative in both the judgment result and the labeling result, and FP is the number of positive in both the judgment result and the labeling result.
Preferably, the analysis model calculates a pixel difference matrix D:
wherein D is ij Representing the value, x, of the pixel point of the ith row and the jth column in the differential image 0ij Andrespectively representing the values of pixel points of the ith row and the jth column in the original image and the reconstructed image; the difference image is an m multiplied by n matrix obtained by calculating the difference between the original image and the reconstructed image for each pixel point, wherein m and n are the length and the width of the original image respectively; the analysis model visually displays the differential image in a thermodynamic diagram mode;
the analytical model coordinates the abnormal chromosomal region by:
s3-1, setting a judgment threshold value c for the difference matrix D 1 The method comprises the steps of carrying out a first treatment on the surface of the Extracting D > c 1 The region of (2) is denoted as D 1 The method comprises the steps of carrying out a first treatment on the surface of the The threshold value c 1 Is obtained by optimizing and adjusting according to the result;
s3-2, pair D 1 Calculate the geometric center and record as C 1
S3-3 for C 1 Obtaining the connected domain, namely D 2
S3-4, pair D 2 Performing the operations of expansion and corrosion, filling the gaps, and recording the obtained region as D 3 Namely, an abnormal chromosome region;
s3-5, performing skeleton extraction processing on the input chromosome image to obtain a skeleton coordinate vector S thereof;
s3-6, calculating the abnormal chromosome region D 3 Upper and lower boundary B of (2) 1 And B 2 Calculation B 1 And B 2 Intersection point X with skeleton coordinate vector S 1 And X 2 Then calculate X 1 And X 2 Distance d from the start end of the position of the skeleton S 1 And d 2 And the total length I of S;
s3-7, based on human chromosome coordinate information published by the international naming system of human cytogenomics, obtaining coordinate information of a corresponding chromosome abnormal region according to the percentage of d1 and d2 in l.
The beneficial effects of the invention are as follows: the image is corrupted and an approximate healthy chromosome image is reconstructed using a denoising diffusion probability model (Denoising diffusion probabilistic models). Comparing the reconstructed chromosome image with the original chromosome image, extracting a section with pixel difference, generating a thermodynamic diagram aiming at the difference region, extracting region labels possibly with structural abnormality, and carrying out coordinate calculation. Compared with the traditional detection mode, the invention has the advantages of high efficiency, accuracy and the like.
Drawings
FIG. 1 is a schematic diagram of the preparation process of an original image x0 of the present invention;
FIG. 2 is a flow diagram of the forward and reverse diffusion models of the present invention, wherein the network structure diagram represents the U-Net++ network used;
FIG. 3 is a schematic diagram of a chromosome abnormality detection method based on a denoising diffusion probability model;
FIG. 4 is a schematic flow chart of the coordinate calculation of the abnormal chromosome region, wherein each text mark corresponds to the detection target in the steps S3-5 to S3-7.
Detailed Description
The technical scheme of the patent is further described in detail below with reference to the specific embodiments.
In the description of the present invention, it should be noted that the positional or positional relationship indicated by the terms such as "inner", "outer", "upper", "lower", "horizontal", etc. are based on the positional or positional relationship shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the apparatus or element in question must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as limiting the present invention.
As shown in fig. 1 to 4, a chromosome abnormality detection system based on a denoising diffusion probability model according to the present invention includes a forward diffusion model, a reverse diffusion model, and an analysis model.
The forward diffusion model adds noise to the input chromosome image as an original image for t times along a Markov process until a pure noise image is obtained; traversing the inverse diffusion model backwards along a Markov chain to perform t denoising operations on the pure noise image to obtain a reconstructed image, wherein t is a natural number larger than 0; the analysis model compares the similarity of the original image and the reconstructed image to judge whether the original image is abnormal or normal; the forward diffusion model, the reverse diffusion model and the analytical model were each trained separately on chromosome types chr1, chr2, … chr22, chrX, chrY to obtain a single model for that chromosome type.
The noise is Simplex noise, gaussian noise or white noise, preferably Simplex noise.
In the training process, the value range of t is 1000-1500; in the detection process, the value range of t is 25-50, so that the operand can be reduced, and the analysis speed can be improved.
The invention also provides a chromosome abnormality detection method based on the denoising diffusion probability model, which comprises a chromosome abnormality detection system based on the denoising diffusion probability model, and comprises the following steps:
s1, taking chromosome images of different types as an original image x 0 Inputting the image into a forward diffusion model of a corresponding type to perform t times of superposition and adding Simplex noise along a Markov process to obtain a pure noise image; wherein the forward diffusion model is formulated using the T step of the markov chain, namely: given data point x 0 At each step q (x t |x t-1 ) Adding a Simplex noise to generate aNew latent variable x t The method comprises the steps of carrying out a first treatment on the surface of the The distribution formula of the Simplex noise e is as follows: e-Simplex (v=2) -6 N=6, γ=0.8), t is the sequence number of each step operation, x is the image, x t Is the image of step t, x t-1 Is the image of step t-1, x 0 Is the original image of the input, q (x t |x t-1 ) The method is a Markov process of the T step, T is the maximum step number, T > 1000, v and N, Y are super parameters, v represents the initial starting frequency initial starting frequency, N represents the noise measurement index octave, and Y is the noise attenuation rate decay rate; in practice, T is taken 1200.
S2, traversing the inverse diffusion model backwards along a Markov chain to perform t denoising operations on the pure noise image until a reconstructed image is obtainedThe denoising operation refers to sampling a noise E-Simplex (v=2) from Simplex noise -6 N=6, γ=0.8), and then denoising diffusion probability reconstruction is performed on the input image; i.e. the inverse of the q-process, denoted by p, the training objective is to obtain a good probability distribution of the restored image: p is p θ (x t-1 |x t ) By traversing backwards along the Markov chain, new data can be regenerated +.>
S3, analyzing the original image x by the model 0 Reconstructing an imageComparing the similarity degree, comparing the difference obtained by the comparison with a threshold value c obtained by pre-training, and comparing the original image x with the threshold value c 0 If the result is abnormal, the result is normal.
Further, referring to fig. 1, the original image x in step S1 0 The pretreatment comprises the following steps:
s0-1, performing chromosome segmentation on an initial image (namely an original metaphase image) containing a plurality of chromosomes through an automatic segmentation network or other automatic or manual segmentation software (such as Ikaros, cytoVision and the like) to obtain an image comprising only one chromosome and a mask of the chromosome outline, and extracting the chromosome from the image;
s0-2, straightening the extracted chromosome in a mode that a short arm is arranged below an upper arm and a long arm, and filling a blank area with white pixels as a background to obtain a rectangular single chromosome image;
s0-3, identifying chromosomes in the single chromosome image to obtain the types of the chromosomes.
Through the step, the input chromosome can be input into a forward diffusion model, a reverse diffusion model and an analysis model of a specific kind for detection, so that a higher recognition rate is obtained.
Further, step S2 includes the steps of:
s2-1, calculating a chromosome skeleton in an original image x0 by using a Zhang-Suen algorithm;
s2-2, traversing backwards along the Markov chain to perform t denoising operations on the pure noise image until a reconstructed image is obtainedWherein, each denoising operation takes a chromosome skeleton as a constraint; because t and the forward diffusion model are identical, the output of each step is an expected image, but cannot be determined to be the same each time;
the training method of the back diffusion model comprises the following steps:
s2-11, constructing a deep learning model pθ (xt-1|xt) by using a U-Net++ network, wherein pθ refers to the deep learning model;
s2-12, traversing backwards along a Markov chain to perform t denoising operations on the pure noise image; each denoising operation samples one noise epsilon-Simplex (v=2-6, n=6, and γ=0.8) from Simplex noise, and then performs denoising diffusion probability reconstruction on an input image; in the process of diffuse probability reconstruction, the probability model needs to be trained to obtain model parameters, which is typically achieved by maximum likelihood estimation, where the goal is to maximize the probability of observed noisy images under the model. To achieve this, a reverse procedure may be used, i.e. by generating noise stepwise iteratively and updating the model parameters by comparing the generated noise with the observed noise. Each layer of the deep learning model pθ is embedded into the chromosome skeleton obtained in the step S2-1, so that the network learns different morphological characteristics and structural information on different layers, thereby more comprehensively understanding the morphology and structure of the chromosome, the U-net++ network is introduced into a SE model (a brand new image recognition structure published in 2017 by the autopilot company Momenta, which enhances important characteristics to improve accuracy rate by modeling the correlation among characteristic channels) to add a attention mechanism, and the implementation steps are as follows:
s2-12-1, compressing each channel of the U-Net++ network by using global average pooling to obtain a global feature vector of each channel,
s2-12-2, performing linear transformation on the global feature vector of the channel, and exciting by using an activation function to obtain the weight of each channel;
in the step S2-12, multiplying the weight of the channel with the input feature map in each denoising operation to obtain an output feature map reconstructed by denoising diffusion probability weighted by an attention mechanism, wherein the input feature map is the output feature map of the previous step;
the U-Net++ network is subjected to pruning training, and the implementation steps are as follows:
1) Training a complete U-Net++ network and recording a gradient value Hessian matrix (black plug matrix) of each neuron or weight;
2) According to the gradient value and the index of the Hessian matrix, the influence degree Ii of each neuron or weight on the U-Net++ network output is calculated:
wherein I is i Representing the loss function of the ith neuron, w i Represents the ithIndividual neurons or weights;
3) Pruning neurons or weights according to a preset contribution threshold;
s2-13, calculating noise distribution E and deep learning predicted result E at t step length through loss function in each denoising operation θ Loss function L between t The expression is:
wherein t represents the t step, L of the diffusion process in the diffusion probability model t Represents the loss function value at the diffusion of the t-th step, and E is Simplex noise generated by random sampling θ Noise representing the output of the network, the input of which isAnd t, & lt>Is a manually set superparameter,/->Representation of the mathematical expectation value, for L t Gradient is calculated, and training is carried out t times until the loss function converges.
In step S3, the original image x is subjected to a mean square error MSE calculation or a cross entropy loss calculation function 0 Reconstructing an imageComparing the similarity;
the method for calculating the MSE comprises the following steps:
wherein I is the reconstructed image->K is the original image x 0 The method comprises the steps of carrying out a first treatment on the surface of the I (I, j) is the value of the (I, j) th pixel in the test image, and K (I, j) is the value of the (I, j) th pixel in the reference image; original image x 0 The number of pixels of (2) is m×n; the MSE is smaller than the threshold value c, and is judged to be normal, and the MSE is larger than or equal to the threshold value c, and is judged to be abnormal;
the method for calculating the cross entropy loss function comprises the following steps:
with I being the reconstructed imageK is the original image x 0 The method comprises the steps of carrying out a first treatment on the surface of the For the original image x 0 And reconstructing an image +.>Respectively carrying out normalization processing on pixel values of (1), and marking as p and q;
at p i,j Is the value of the (i, j) th pixel point in the original image, q i,j Is the value of the (i, j) th pixel point in the reconstructed image; original image x 0 The number of pixels of (2) is m×n;
calculating a cross entropy loss function H (p, q):
if H (p, q) is smaller than the threshold value c, judging that the operation is normal, and if H (p, q) is larger than or equal to the threshold value c, judging that the operation is abnormal; the threshold c is obtained by pre-training;
wherein, the original image x is first aligned by the alignment operation before step S3 0 Reconstructing an imageThe alignment is carried out, and the steps are as follows:
a) From the original image x 0 Reconstructing an imageExtracting a plurality of characteristic points from the image, and using a characteristic extraction algorithmFor SIFT (scale invariant feature transform) algorithm then the FLANN (fast nearest neighbor) algorithm is used on the original image x 0 Reconstructing an imageMatching the feature points in the model;
b) Eliminating false matching points, and eliminating false matching characteristic points by using a RANSAC algorithm (RANSAC is Random Sample Consensus abbreviation, which is an algorithm for calculating mathematical model parameters of data according to a group of sample data sets containing abnormal data to obtain effective sample data);
c) Using a basis matrix or homography matrix to reconstruct an original image x0 and a reconstructed imagePerforming geometric transformation to obtain a transformation matrix; and transforming the original image x0 and the reconstructed image based on the feature points of the matching points +.>To align with another image.
The solving step of the threshold c is as follows:
s4-1, taking N chromosome images which are manually marked as normal and N chromosome images which are manually marked as abnormal, inputting the N chromosome images into a model based on denoising diffusion probability to obtain mean square error MSE of an original image and a reconstructed image, taking different thresholds, judging whether the input chromosome images are normal or abnormal,
s4-2, solving the true positive rate:
s4-3, solving false positive rate:
s4-4, solving sensitivity:
s4-5, solving the specificity:
s4-6, calculating a about step index J: j=sensitivity+specificity-1, and selecting the point with the largest J value as the optimal threshold c, wherein TP is the number of positive in both the judgment result and the labeling result, FN is the number of negative in both the judgment result and the labeling result, TN is the number of negative in both the judgment result and the labeling result, and FP is the number of positive in both the judgment result and the labeling result.
Namely: for normal and abnormal chromosome images that have been marked by a practitioner, an abnormality is defined as positive, and P is marked as negative, and a normal is marked as N. From the original image x 0 Reconstructing an imageDifferent determination thresholds c are divided, where N is determined as the MSE being smaller than c, and P is determined as the MSE being greater than or equal to c.
Then there is a confusion matrix:
prediction/true P N
P TP FP
N FN TN
And drawing an ROC curve by taking FPR as an abscissa and TPR as an ordinate. And calculates a jordng index (Youden index) J:
J=sensitivity+specificity-1
the point where the J value is greatest is selected as the optimal threshold for distinguishing normal and abnormal chromosome images.
Further, the analytical model calculates a pixel difference matrix D:
wherein D is ij Representing the value, x, of the pixel point of the ith row and the jth column in the differential image 0ij Andrespectively representing the values of pixel points of the ith row and the jth column in the original image and the reconstructed image; the difference image is an m×n matrix obtained by calculating the difference between the original image and the reconstructed image for each pixel point, where m and n are the length and width of the original image, respectively; the analysis model visually displays the differential image in a thermodynamic diagram mode;
the analytical model coordinates the abnormal chromosome region by:
s3-1, setting a judgment threshold value c for the difference matrix D 1 The method comprises the steps of carrying out a first treatment on the surface of the Extracting D > c 1 The region of (2) is denoted as D 1 The method comprises the steps of carrying out a first treatment on the surface of the The threshold value c 1 Is obtained by optimizing and adjusting according to the result;
s3-2, pair D 1 Calculate the geometric center and record as C 1
S3-3 for C 1 Obtaining the connected domain, namely D 2
S3-4, pair D 2 Performing the operations of expansion and corrosion, filling the gaps, and recording the obtained region as D 3 Namely, an abnormal chromosome region;
s3-5, performing skeleton extraction processing on the input chromosome image to obtain a skeleton coordinate vector S thereof;
s3-6, calculating the abnormal chromosome region D 3 Upper and lower boundary B of (2) 1 And B 2 Calculation B 1 And B 2 Intersection point X with skeleton coordinate vector S 1 And X 2 Then calculate X 1 And X 2 Distance d from the start end of the position of the skeleton S 1 And d 2 And the total length I of S;
s3-7, based on human chromosome coordinate information (i.e. biological coordinates in FIG. 4) published by the International naming system of human cytogenomics, according to d 1 And d 2 And (3) accounting for the percentage of I, and obtaining the coordinate information of the corresponding chromosome abnormal region.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present invention.

Claims (9)

1. A chromosome anomaly detection system based on a denoising diffusion probability model is characterized in that: comprises a forward diffusion model, a reverse diffusion model and an analysis model; the forward diffusion model adds noise to the input chromosome image as an original image in t times along a Markov process until a pure noise image is obtained; the inverse diffusion model traverses backwards along a Markov chain to perform t denoising operations on the pure noise image to obtain a reconstructed image, wherein t is a natural number greater than 0; the analysis model compares the similarity of the original image and the reconstructed image to judge whether the original image is abnormal or normal; the forward diffusion model, the reverse diffusion model and the analysis model are all trained independently according to chromosome types chr1, chr2 … chr22, chrX and chrY to obtain a single model aiming at the chromosome type.
2. The chromosomal abnormality detection system based on a denoising diffusion probability model according to claim 1, wherein the noise is Simplex noise, gaussian noise or white noise.
3. The chromosome abnormality detection system based on the denoising diffusion probability model according to claim 1, wherein the value range of t is 1000-1500 in the training process; in the detection process, the value range of t is 25-50.
4. A method for detecting chromosomal abnormalities based on a denoising diffusion probability model, comprising a chromosomal abnormality detection system based on a denoising diffusion probability model according to one of claims 1 to 3, characterized by comprising the steps of:
s1, taking chromosome images of different types as an original image x 0 Inputting the image into a forward diffusion model of a corresponding type to perform t times of superposition and adding Simplex noise along a Markov process to obtain a pure noise image; wherein the forward diffusion model is formulated using the T step of the markov chain, namely: given data point x 0 At each step q (x t |x t-1 ) Add a Simplex noise to generate a new latent variable x t The method comprises the steps of carrying out a first treatment on the surface of the The distribution formula of the Simplex noise e is as follows: e-Simplex (v=2) -6 N=6, γ=0.8), t is the sequence number of each step operation, x is the image, x t Is the image of step t, x t-1 Is the image of step t-1, x 0 Is the original image of the input, q (x t |x t-1 ) Is the Markov process of the T-th step, T is the maximum number of steps and T>>1000, v, N and gamma are all super parameters, v represents initial starting frequency, N represents noise measurement index, and gamma is noise attenuation rate;
s2, traversing the inverse diffusion model backwards along a Markov chain to perform t denoising operations on the pure noise image until a reconstructed image is obtained
S3, the analysis model is used for analyzing the original image x 0 Reconstructing an imageComparing the similarity degree, comparing the difference obtained by the comparison with a threshold value c obtained by pre-training, and comparing the original image x with the threshold value c 0 If the result is abnormal, the result is normal.
5. The method for detecting chromosome abnormality based on the denoising diffusion probability model according to claim 4, wherein: the original image x in the step S1 0 The pretreatment comprises the following steps:
s0-1, performing chromosome segmentation on an initial image containing a plurality of chromosomes through an automatic segmentation network to obtain an image only comprising one chromosome and a mask of the chromosome outline, and extracting the chromosome from the image;
s0-2, straightening the extracted chromosome in a manner that a short arm is arranged below an upper arm and a long arm, and filling a blank area with white pixels to obtain a rectangular single chromosome image;
s0-3, identifying chromosomes in the single chromosome image to obtain the types of the chromosomes.
6. The method for detecting chromosomal abnormalities based on a denoising diffusion probability model according to claim 5, wherein said step S2 comprises the steps of:
s2-1, calculating an original image x by using Zhang-Suen algorithm 0 A chromosomal backbone of (a);
s2-2, traversing backwards along the Markov chain to perform t denoising operations on the pure noise image until a reconstructed image is obtainedWherein, each denoising operation takes the chromosome skeleton as a constraint;
the training method of the inverse diffusion model comprises the following steps:
s2-11, and building a deep learning model p by using U-Net++ network θ (x t-1 |x t ),p θ Refers to a deep learning model;
s2-12, traversing backwards along a Markov chain to perform t denoising operations on the pure noise image; wherein each denoising operation samples one noise e-Simplex (v=2) from the Simplex noise -6 N=6, γ=0.8), and then denoising diffusion probability reconstruction is performed on the input image; wherein, the deep learning model p θ The chromosome skeleton obtained in the step S2-1 is embedded into each layer, so that the network learns different morphological characteristics and structural information on different layers, and the U-Net++ network introduces an SE module to add an attention mechanism, and the implementation steps are as follows:
s2-12-1, compressing each channel of the U-Net++ network by using global average pooling to obtain a global feature vector of each channel,
s2-12-2, performing linear transformation on the global feature vector of the channel, and exciting by using an activation function to obtain the weight of each channel;
in the step S2-12, multiplying the weight of the channel with the input feature map in each denoising operation to obtain an output feature map reconstructed by denoising diffusion probability weighted by an attention mechanism, wherein the input feature map is the output feature map of the previous step;
the U-Net++ network is subjected to pruning training, and the implementation steps are as follows:
1) Training a complete U-Net++ network, and recording a gradient value Hessian matrix of each neuron or weight;
2) According to the gradient value and the index of the Hessian matrix, calculating the influence degree I of each neuron or weight on the output of the U-Net++ network i
Wherein I is i Representing the loss function of the ith neuron, W i Representing the ith neuron or weight;
3) Pruning neurons or weights according to a preset contribution threshold;
s2-13, calculating noise distribution E and deep learning predicted result E at t step length through loss function in each denoising operation θ Loss function L between t The expression is:
wherein t represents the t step, L of the diffusion process in the diffusion probability model t Represents the loss function value at the diffusion of the t-th step, E is Simplex noise generated by random sampling, and the input isAnd t, & lt>Is a manually set superparameter,/->Representation of the mathematical expectation value, for L t Gradient is calculated, and training is carried out t times until the loss function converges.
7. The method for detecting chromosomal abnormalities based on a denoising diffusion probability model as claimed in claim 4, wherein in said step S3, the original image x is subjected to mean square error MSE calculation or cross entropy loss function calculation 0 Reconstructing an imageComparing the similarity;
the method for calculating the MSE comprises the following steps:
wherein I is the reconstructed image->K is the original image x 0 The method comprises the steps of carrying out a first treatment on the surface of the I (I, j) is the value of the (I, j) th pixel in the test image, and K (I, j) is the value of the (I, j) th pixel in the reference image; original image x 0 The number of pixels of (2) is m×n; the MSE is smaller than the threshold value c, and the MSE is larger than or equal to the threshold value c;
the method for calculating the cross entropy loss function comprises the following steps:
with I being the reconstructed imageK is the original image x 0 The method comprises the steps of carrying out a first treatment on the surface of the For the original image x 0 And reconstructing an image +.>Respectively carrying out normalization processing on pixel values of (1), and marking as p and q;
at p i,j Is the value of the (i, j) th pixel point in the original image, q i,j Is the value of the (i, j) th pixel point in the reconstructed image; original image x 0 The number of pixels of (2) is m×n;
calculating a cross entropy loss function H (p, q):
if H (p, q) is smaller than the threshold value c, judging that H (p, q) is larger than or equal to the threshold value c is normal; the threshold c is obtained through pre-training;
wherein, the original image x is first aligned by the alignment operation before the step S3 0 Reconstructing an imageThe alignment is carried out, and the steps are as follows:
a) From the original image x 0 Reconstructing an imageExtracting a plurality of characteristic points from the original image, wherein the characteristic extraction algorithm is SIFT algorithm, and then FLANN algorithm is used for the original image x 0 And reconstructing an image +.>Matching the feature points in the model;
b) Removing the wrong matching points, and removing the wrong matching characteristic points by using a RANSAC algorithm;
c) Primitive image x using basis matrix or homography matrix 0 Reconstructing an imagePerforming geometric transformation to obtain a transformation matrix; and transforming the original image x based on the feature points of the matching points 0 And reconstructing an image +.>To align with another image.
8. The method for detecting chromosomal abnormalities based on a denoising diffusion probability model according to claim 4, wherein the step of solving the threshold c is:
s4-1, taking N chromosome images which are manually marked as normal and N chromosome images which are manually marked as abnormal, inputting the N chromosome images into the denoising diffusion probability model to obtain a mean square error MSE of an original image and a reconstructed image, taking different thresholds, judging whether the input chromosome images are normal or abnormal,
s4-2, solving the true positive rate:
s4-3, solving false positive rate:
s4-4, solving sensitivity:
s4-5, solving the specificity:
s4-6, calculating a about step index J: j=sensitivity+specificity-1, and selecting the point with the largest J value as the optimal threshold c, wherein TP is the number of positive in both the judgment result and the labeling result, FN is the number of negative in both the judgment result and the labeling result, TN is the number of negative in both the judgment result and the labeling result, and FP is the number of positive in both the judgment result and the labeling result.
9. The method for detecting chromosomal abnormalities based on a denoising diffusion probability model according to claim 4, wherein said analysis model calculates a pixel difference matrix D:
wherein D is ij Representing the value, x, of the pixel point of the ith row and the jth column in the differential image 0ij Andrespectively representing the values of pixel points of the ith row and the jth column in the original image and the reconstructed image; the difference image is an m multiplied by n matrix obtained by calculating the difference between the original image and the reconstructed image for each pixel point, wherein m and n are the length and the width of the original image respectively; the analysis model visually displays the differential image in a thermodynamic diagram mode;
the analytical model coordinates the abnormal chromosomal region by:
s3-1, setting a judgment threshold value c for the difference matrix D 1 The method comprises the steps of carrying out a first treatment on the surface of the Extraction of D>c 1 The region of (2) is denoted as D 1 The method comprises the steps of carrying out a first treatment on the surface of the The threshold value c 1 Is obtained by optimizing and adjusting according to the result;
s3-2, pair D 1 Calculate the geometric center and record as C 1
S3-3 for C 1 Obtaining the connected domain, namely D 2
S3-4, pair D 2 Performing the operations of expansion and corrosion, filling the gaps, and recording the obtained region as D 3 Namely, an abnormal chromosome region;
s3-5, performing skeleton extraction processing on the input chromosome image to obtain a skeleton coordinate vector S thereof;
s3-6, calculating the abnormal chromosome region D 3 Upper and lower boundary B of (2) 1 And B 2 Calculation B 1 And B 2 Intersection point X with skeleton coordinate vector S 1 And X 2 Then calculate X 1 And X 2 Distance d from the start end of the position of the skeleton S 1 And d 2 And the total length of S, l;
s3-7, based on human chromosome coordinate information published by human cytogenomics International naming system, according to d 1 And d 2 And (3) accounting for the percentage of l, and obtaining the coordinate information of the corresponding chromosome abnormal region.
CN202310784284.7A 2023-06-29 2023-06-29 Chromosome anomaly detection system and method based on denoising diffusion probability model Pending CN117011234A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310784284.7A CN117011234A (en) 2023-06-29 2023-06-29 Chromosome anomaly detection system and method based on denoising diffusion probability model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310784284.7A CN117011234A (en) 2023-06-29 2023-06-29 Chromosome anomaly detection system and method based on denoising diffusion probability model

Publications (1)

Publication Number Publication Date
CN117011234A true CN117011234A (en) 2023-11-07

Family

ID=88568115

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310784284.7A Pending CN117011234A (en) 2023-06-29 2023-06-29 Chromosome anomaly detection system and method based on denoising diffusion probability model

Country Status (1)

Country Link
CN (1) CN117011234A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117726542A (en) * 2024-02-18 2024-03-19 北京理工大学 Controllable noise removing method and system based on diffusion model
CN117974650A (en) * 2024-03-29 2024-05-03 北京大学人民医院 Whole-body computerized tomography wound detection system and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117726542A (en) * 2024-02-18 2024-03-19 北京理工大学 Controllable noise removing method and system based on diffusion model
CN117974650A (en) * 2024-03-29 2024-05-03 北京大学人民医院 Whole-body computerized tomography wound detection system and computer equipment

Similar Documents

Publication Publication Date Title
CN117011234A (en) Chromosome anomaly detection system and method based on denoising diffusion probability model
WO2022222026A1 (en) Medical diagnosis missing data completion method and completion apparatus, and electronic device and medium
CN112070685B (en) Method for predicting dynamic soft tissue movement of HIFU treatment system
CN111047559B (en) Method for rapidly detecting abnormal area of digital pathological section
CN116309368B (en) Lung cancer pathological diagnosis system based on deep migration learning
CN114445356A (en) Multi-resolution-based full-field pathological section image tumor rapid positioning method
CN115511798A (en) Pneumonia classification method and device based on artificial intelligence technology
CN118196418A (en) Semi-supervised embryo image cell debris segmentation method based on average teacher
CN115762721A (en) Medical image quality control method and system based on computer vision technology
Drioua et al. Breast cancer detection from histopathology images based on yolov5
CN114035843A (en) Code clone detection method and detection device based on Seq2Seq model
CN116228759B (en) Computer-aided diagnosis system and apparatus for renal cell carcinoma type
CN117409201A (en) MR medical image colorectal cancer segmentation method and system based on semi-supervised learning
CN116680639A (en) Deep-learning-based anomaly detection method for sensor data of deep-sea submersible
CN115880277A (en) Stomach cancer pathology total section T stage classification prediction method based on Swin transducer and weak supervision
CN115984639A (en) Intelligent detection method for fatigue state of part
CN115471724A (en) Fine-grained fish epidemic disease identification fusion algorithm based on self-adaptive normalization
CN113962928A (en) Defect detection method, device and medium based on multi-scale feature distillation
CN114219752B (en) Abnormal region detection method for serum protein electrophoresis
CN117636099B (en) Medical image and medical report pairing training model
CN113298825B (en) Image segmentation method based on MSF-Net network
Li et al. BaseFormer: Transformer based Base-Caller for Fast and Accurate Next Generation Sequencing
Zhu et al. Automatic Recognition of Steel Deterioration Grade By CNN
Hara et al. Development of automated detection system for lung nodules in chest radiograms
Samarakoon et al. Leveraging Basecaller's Move Table to Generate a Lightweight k-mer Model

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