CN114240881A - Method, device and system for constructing and segmenting paper electrocardiogram segmentation model - Google Patents
Method, device and system for constructing and segmenting paper electrocardiogram segmentation model Download PDFInfo
- Publication number
- CN114240881A CN114240881A CN202111545765.XA CN202111545765A CN114240881A CN 114240881 A CN114240881 A CN 114240881A CN 202111545765 A CN202111545765 A CN 202111545765A CN 114240881 A CN114240881 A CN 114240881A
- Authority
- CN
- China
- Prior art keywords
- waveform
- neural network
- deep neural
- segmentation
- electrocardiogram
- 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
Links
- 230000011218 segmentation Effects 0.000 title claims abstract description 150
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000013528 artificial neural network Methods 0.000 claims abstract description 161
- 238000001514 detection method Methods 0.000 claims abstract description 72
- 238000011282 treatment Methods 0.000 claims abstract description 8
- 238000012937 correction Methods 0.000 claims abstract description 7
- 238000004519 manufacturing process Methods 0.000 claims abstract description 7
- 238000005457 optimization Methods 0.000 claims description 38
- 238000010276 construction Methods 0.000 claims description 34
- 230000006870 function Effects 0.000 claims description 30
- 238000012549 training Methods 0.000 claims description 19
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 claims description 14
- 238000012545 processing Methods 0.000 claims description 13
- 238000013135 deep learning Methods 0.000 claims description 12
- 238000007781 pre-processing Methods 0.000 claims description 8
- 238000009826 distribution Methods 0.000 claims description 7
- 238000009795 derivation Methods 0.000 claims description 6
- 238000012805 post-processing Methods 0.000 claims description 4
- 238000005520 cutting process Methods 0.000 claims description 3
- 238000004458 analytical method Methods 0.000 description 2
- 238000003745 diagnosis Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 238000003709 image segmentation Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000002565 electrocardiography Methods 0.000 description 1
- 238000005562 fading Methods 0.000 description 1
- 208000019622 heart disease Diseases 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
- 238000004393 prognosis Methods 0.000 description 1
- 238000004171 remote diagnosis Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000003860 storage Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0012—Biomedical image inspection
-
- 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
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G06T5/80—
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30004—Biomedical image processing
Abstract
The invention discloses a method, a device and a system for constructing and segmenting a paper electrocardiogram segmentation model based on a cascade deep neural network, wherein the model constructing method comprises the following steps: acquiring a paper electrocardiogram sample image, and performing correction treatment; calibrating a waveform region in an image to obtain a waveform detection data set; manufacturing a waveform label according to the calibrated waveform area to obtain a waveform segmentation data set; constructing a waveform detection deep neural network based on the waveform detection data set; constructing a waveform segmentation depth neural network based on the waveform segmentation data set; and cascading the waveform detection deep neural network and the waveform segmentation deep neural network to obtain an electrocardiogram segmentation model. The invention realizes the rapid and accurate end-to-end segmentation of the waveform curve under different scenes, and can provide high-quality data for the accurate digitization of the waveform curve.
Description
Technical Field
The invention relates to the technical field of image segmentation, in particular to a method, a device and a system for constructing and segmenting a paper electrocardiogram segmentation model based on a cascaded deep neural network.
Background
Electrocardiography is the main means for monitoring heart diseases in medical institutions, and thus is widely applied to diagnosis, treatment and prognosis analysis tasks. At present, paper electrocardiograms are the most common storage method. However, most paper electrocardiograms are damaged to different degrees due to factors such as difficult preservation of paper electrocardiograms, easy fading of writing, easy breaking of paper and the like. The method can establish a rich case database by combining the paper electrocardiogram, which is beneficial for researchers to carry out scientific research and analysis, improves the teaching quality of medical institutions, increases the diagnosis experience of clinicians, supports remote diagnosis and the like. Therefore, the extraction of the digitized information of the paper electrocardiogram becomes a problem which needs to be solved urgently.
Paper electrocardiograms contain a lot of information. Such as patient information, electrocardiographic waveform curves, background coordinate grids, and the like. The extraction of the digitized information of the paper electrocardiogram refers to converting waveform data stored on paper into an electrocardiogram signal through a series of processes.
In order to extract the digitized information of the paper electrocardiogram, some researchers combine the traditional image segmentation algorithm to preprocess the paper electrocardiogram image, and then combine the preprocessing result to segment the electrocardiogram waveform. However, these methods have the following drawbacks:
(1) the requirement on the original paper electrocardiogram image is higher. When the image background is too complex, the segmentation result is greatly influenced;
(2) in the processing process, the methods are difficult to ensure the integrity and the consistency of the curve, and even some methods cannot obtain accurate segmentation results;
(3) the methods use a plurality of steps to process the image step by step, so that the whole process is longer, the complexity of the algorithm is higher, and quick end-to-end segmentation is difficult to realize.
Disclosure of Invention
In order to solve the technical problems in the background art, the invention provides a method, a device and a system for constructing and segmenting a paper electrocardiogram segmentation model based on a cascaded deep neural network, so that a waveform curve can be segmented quickly and accurately from end to end in different scenes, and high-quality data can be provided for accurate digitization of the waveform curve.
The invention provides a paper electrocardiogram segmentation model construction method based on a cascade deep neural network, which comprises the following steps:
s1: acquiring a paper electrocardiogram sample image, and performing correction treatment;
s2: calibrating a waveform area in the corrected paper electrocardiogram sample image to obtain a waveform detection data set;
s3: manufacturing a waveform label according to the calibrated waveform area to obtain a waveform segmentation data set;
s4: constructing an initial deep neural network for waveform detection, and training and optimizing the initial deep neural network based on a waveform detection data set to obtain a waveform detection deep neural network;
s5: constructing an initial deep neural network for waveform segmentation, and training and optimizing the initial deep neural network based on a waveform segmentation data set to obtain a waveform segmentation deep neural network;
s6: and cascading the waveform detection deep neural network and the waveform segmentation deep neural network to obtain an electrocardiogram segmentation model.
Preferably, the step S4 specifically includes:
s41: preprocessing the waveform detection data set; the waveform detection data set comprises waveform area calibration coordinate data and waveform area image data;
s42: taking a waveform region image as input, taking a waveform region prediction coordinate and prediction probability as output, and constructing an initial deep neural network A for waveform detection;
s43: carrying out weight initialization on an initial deep neural network A for waveform detection;
s44: setting a loss function for adjusting parameters of the deep neural network A and an optimization algorithm for deep learning;
s45: and (4) combining the waveform detection data set, the loss function and the optimization algorithm to carry out iterative training on the deep neural network A to obtain the waveform detection deep neural network.
Preferably, the step S41 specifically includes:
s411: distorting the length and width of the waveform area image and filling four boundaries of the image with gray pixel values;
s412: judging whether the image turning condition is met or not, if so, turning the waveform area image;
s413: and adjusting the color gamut of the waveform area image.
Preferably, the step S43 specifically includes: parameters in the deep neural network A are initialized randomly by adopting normal distribution with the mean value of 0 and the variance of 1.
Preferably, the step S44 specifically includes:
the loss function is set to:wherein: m represents the number of paper electrocardiogram sample images, and alpha and gamma represent weight parameters, respectively. PiRepresenting a prediction probability;
and setting the optimization algorithm of deep learning as an Adam optimization algorithm.
Preferably, the step S45 specifically includes:
s451: extracting the image characteristics of the waveform region through a forward propagation algorithm to obtain a waveform region prediction coordinate;
s452: by a loss function LFdetectionObtaining a loss value between a waveform area prediction coordinate and a waveform area calibration coordinate;
s453: combining back propagation algorithm based on chain derivation rule and Adam optimization algorithm to carry out optimization on weight parameters W in deep neural network AACarrying out gradient updating;
s454: repeating the steps S451-S453 until the deep neural network A converges;
s455: recording loss value in weight parameter WAThe change curve in the updating process stores the corresponding weight parameter W when the loss value reaches a preset threshold valueAAnd obtaining the waveform detection deep neural network.
Preferably, the step S45 is followed by: according to the waveform detection deep neural network output waveform area prediction coordinate, post-processing operation is carried out, and the method specifically comprises the following steps:
designing a fine tuning algorithm based on the thought of gradual long comparison;
optimizing a waveform detection deep neural network output waveform area prediction coordinate through a fine tuning algorithm;
and obtaining an accurate waveform area from the paper electrocardiogram sample image according to the optimized waveform area prediction coordinates.
Preferably, the step S5 specifically includes:
s51: preprocessing the waveform segmentation data set; the waveform segmentation data set comprises a waveform label and waveform region image data; the pretreatment specifically comprises: cutting a paper electrocardiogram sample image into a plurality of square image blocks with the same size;
s52: constructing an initial deep neural network B for waveform segmentation by taking the image block as input and taking a waveform segmentation result as output;
s53: carrying out weight initialization on the deep neural network B;
s54: setting a loss function of a parameter B of the deep neural network and an optimization algorithm of deep learning;
s55: and (4) combining the waveform segmentation data set, the loss function and the optimization algorithm to carry out iterative training on the deep neural network B to obtain the waveform segmentation deep neural network.
Preferably, the step S53 specifically includes: and (3) randomly initializing parameters in the deep neural network B by adopting normal distribution with the mean value of 0 and the variance of 1.
Preferably, the step S54 specifically includes:
the loss function is set to:wherein: m represents the number of paper electrocardiogram sample images, TiDenotes a waveform label, QiRepresenting a segmentation result;
and setting the optimization algorithm of deep learning as an Adam optimization algorithm.
Preferably, the step S55 specifically includes:
s551: extracting image block features through a forward propagation algorithm to obtain a waveform segmentation result;
s552: by a loss function LFsegObtaining a loss value between the waveform label and the waveform segmentation result;
s553: combining back propagation algorithm based on chain derivation rule and Adam optimization algorithm to carry out optimization on weight parameters W in deep neural network BBCarrying out gradient updating;
s554: repeating the steps S551-S553 until the deep neural network B converges;
s555: recording loss value in weight parameter WBThe change curve in the updating process stores the corresponding weight parameter W when the loss value reaches a preset threshold valueBAnd obtaining the waveform segmentation deep neural network.
Preferably, the step S1 specifically includes:
s11: acquiring a paper electrocardiogram sample image;
s12: setting an angle range, and solving the sum of line pixels of the image at different angles in the angle range by a preset step length;
s13: and comparing the line pixels and the sizes at different angles, and correcting the inclination angle of the image according to the line pixels and the maximum value.
Based on the same invention concept, the invention also provides a paper electrocardiogram segmentation model construction device based on the cascade deep neural network, which comprises the following steps:
the pretreatment module is used for acquiring a paper electrocardiogram sample image and carrying out correction treatment;
the data set acquisition module is used for calibrating a waveform area in the corrected paper electrocardiogram sample image to obtain a waveform detection data set; manufacturing a waveform label according to the calibrated waveform area to obtain a waveform segmentation data set;
a waveform detection construction module: the method comprises the steps of constructing an initial deep neural network for waveform detection, and training and optimizing the initial deep neural network based on a waveform detection data set to obtain a waveform detection deep neural network;
a waveform segmentation construction module: the method comprises the steps of constructing an initial deep neural network for waveform segmentation, and training and optimizing the initial deep neural network based on a waveform segmentation data set to obtain a waveform segmentation deep neural network;
a cascade module: the method is used for cascading the waveform detection deep neural network and the waveform segmentation deep neural network to obtain the electrocardiogram segmentation model.
Based on the same invention concept, the invention also provides a paper electrocardiogram segmentation model construction system based on the cascade deep neural network, which comprises the following steps:
the image acquisition device is used for acquiring a paper electrocardiogram sample image;
a memory for storing a program;
and the processor is used for receiving the paper electrocardiogram sample image and executing the program to realize the operation in the paper electrocardiogram segmentation model construction method based on the cascaded deep neural network.
Based on the same invention concept, the invention also provides a paper electrocardiogram segmentation method based on the cascade deep neural network, which comprises the following steps:
acquiring a paper electrocardiogram image to be segmented;
inputting a paper electrocardiogram image to be segmented into an electrocardiogram processing model to obtain a waveform segmentation result;
the electrocardiogram processing model is an electrocardiogram segmentation model obtained by the paper electrocardiogram segmentation model construction method based on the cascaded deep neural network.
Based on the same invention concept, the invention also provides a paper electrocardiogram segmentation device based on the cascade deep neural network, which comprises the following components:
the image data acquisition unit is used for acquiring a paper electrocardiogram image;
the segmentation unit is used for inputting the paper electrocardiogram image into the electrocardiogram processing model to obtain a waveform segmentation result;
the electrocardiogram processing model is an electrocardiogram segmentation model obtained by the paper electrocardiogram segmentation model construction method based on the cascaded deep neural network.
Based on the same invention concept, the invention also provides a paper electrocardiogram segmentation system based on the cascade deep neural network, which comprises the following components:
the image acquisition device is used for acquiring a paper electrocardiogram image;
a memory for storing a program;
and the processor is used for receiving the paper electrocardiogram sample image and executing the program to realize the operation in the paper electrocardiogram segmentation method based on the cascaded deep neural network.
Based on the technical problems in the background art, the invention provides a paper electrocardiogram waveform segmentation method based on a cascaded deep neural network. According to the method, the rapid and accurate end-to-end segmentation of the waveform curve under different scenes is realized by cascading the deep neural networks for the waveform detection task and the waveform segmentation task, and the high-quality data is provided for the accurate digitization of the waveform curve.
Drawings
FIG. 1 is a flow chart of a paper electrocardiogram segmentation model construction method based on a cascaded deep neural network, which is provided by the invention;
FIG. 2 is a flow chart of a paper electrocardiogram segmentation model construction method based on a cascaded deep neural network, which is provided by the invention;
FIG. 3 is a flow chart of a paper electrocardiogram segmentation method based on a cascaded deep neural network according to the present invention;
fig. 4 is a structural diagram of a paper electrocardiogram segmentation device based on a cascaded deep neural network according to the present invention.
Detailed Description
As shown in fig. 1, fig. 1 is a flowchart of a paper electrocardiogram segmentation model construction method based on a cascaded deep neural network according to an embodiment of the present invention;
referring to fig. 1, a method for constructing a paper electrocardiogram segmentation model based on a cascaded deep neural network according to an embodiment of the present invention includes:
step S1: acquiring a paper electrocardiogram sample image, and performing correction treatment;
in this embodiment, the step S1 specifically includes:
step S11: acquiring a paper electrocardiogram sample image;
step S12: setting an angle range, and solving the sum of line pixels of the image at different angles in the angle range by a preset step length;
step S13: and comparing the line pixels and the sizes at different angles, and correcting the inclination angle of the image according to the line pixels and the maximum value.
Specifically, a certain angle range is set, and the sum of the pixels of the lines of the images at different angles is obtained by taking 1 as a step length in the range; then, comparing the line pixels at different angles with the sizes; finally, the tilt angle of the image is adjusted according to the line pixels and the maximum value of the calculated image.
Step S2: calibrating a waveform area in the corrected paper electrocardiogram sample image to obtain a waveform detection data set;
step S3: manufacturing a waveform label according to the calibrated waveform area to obtain a waveform segmentation data set;
in particular embodiments, each waveform region may be circled with a bounding box, e.g., a square, and waveform labels are made from the waveforms in the waveform region to facilitate neural network learning training. It should be noted that, in the present embodiment and the following embodiments, specific numerical values do not limit the technical solutions of the present embodiment unless otherwise specified, and the technical solutions should be understood as examples for facilitating understanding of the technical solutions by those skilled in the art.
Step S4: constructing an initial deep neural network A for waveform detection, and training and optimizing the initial deep neural network A based on a waveform detection data set to obtain a waveform detection deep neural network;
in this embodiment, the step S4 specifically includes:
step S41: preprocessing the waveform detection data set; the waveform detection data set comprises waveform area calibration coordinate data and waveform area image data;
in this embodiment, the step S41 specifically includes:
step S411: distorting the length and width of the waveform area image and filling four boundaries of the image with gray pixel values;
specifically, the length and width of the image are distorted at a random ratio and the upper, lower, left, and right sides are filled with gray pixel values to ensure that the image is not distorted after sampling to a fixed size, and the formula of the random ratio is as follows:
α=rand(0,1)*(b-a)+a;
wherein rand (0,1) can obtain a random sample value uniformly distributed according to 0-1, and a and b are preset values. In this way a random number between a-b can be obtained;
step S412: judging whether the image turning condition is met or not, if so, turning the waveform area image;
specifically, whether the image is turned over is judged by taking 0.5 as a threshold value; and if so, turning over the waveform area image.
Step S413: and adjusting the color gamut of the waveform area image.
Specifically, the color gamut of the image is adjusted at a random ratio, the formula of which is consistent with the above-described random ratio formula of the warped image.
Step S42: taking a waveform region image as input, taking a waveform region prediction coordinate and prediction probability as output, and constructing an initial deep neural network A for waveform detection;
specifically, the input of the initial deep neural network A for waveform detection is a waveform area image after preprocessing is completedThe output of the deep neural network A is a waveform area prediction coordinate P(top,left,bottom,right)And a prediction probability PiB represents the batch size of an input network, c represents the channel number of a paper electrocardiogram, nh and nw respectively represent the length and width of a waveform calibration image, top and bottom respectively represent the upper and lower boundaries of a waveform area, and left and right respectively represent the left and right boundaries of the waveform area;
step S43: carrying out weight initialization on the initial deep neural network A;
in the present embodiment, the parameters in the deep neural network a are randomly initialized by using a normal distribution with a mean value of 0 and a variance of 1.
Step S44: setting a loss function for adjusting parameters of the initial deep neural network A and an optimization algorithm for deep learning;
in this embodiment, the loss function is set as:wherein: m represents the number of paper electrocardiogram sample images, and alpha and gamma represent weight parameters, respectively. PiRepresenting a prediction probability; and setting the optimization algorithm of deep learning as an Adam optimization algorithm.
It should be noted that, in the present embodiment, the loss function LF is defineddetectionMeasuring the difference between the calibration coordinates of the waveform area and the prediction coordinates of the waveform area, wherein the difference is specifically quantized into a loss value; in particular by applying a loss function LFdetectionAnd solving an optimal solution, and updating parameters in the deep neural network A by using an Adam optimization algorithm until the deep neural network A converges.
Step S45: and (4) combining the waveform detection data set, the loss function and the optimization algorithm to carry out iterative training on the deep neural network to obtain the waveform detection deep neural network.
In this embodiment, step S45 specifically includes:
step S451: extracting the image characteristics of the waveform region through a forward propagation algorithm to obtain a waveform region prediction coordinate;
step S452: by a loss function LFdetectionObtaining a loss value between a waveform area prediction coordinate and a waveform area calibration coordinate;
step S453: combining back propagation algorithm based on chain derivation rule and Adam optimization algorithm to carry out optimization on weight parameters W in deep neural network AACarrying out gradient updating;
step S454: repeating the steps S451-S453 until the deep neural network A converges;
step S455: recording loss value in weight parameter WAThe change curve in the updating process stores the corresponding weight parameter W when the loss value reaches a preset threshold valueAAnd obtaining the waveform detection deep neural network.
It should be noted that, in this embodiment, the method further includes performing post-processing operation according to the waveform area prediction coordinate set output by the waveform detection deep neural network, and the post-processing operation specifically includes:
designing a fine tuning algorithm based on the thought of gradual long comparison;
optimizing a waveform detection deep neural network output waveform area prediction coordinate through a fine tuning algorithm;
and obtaining an accurate waveform area from the paper electrocardiogram sample image according to the optimized waveform area prediction coordinates.
Step S5: constructing an initial deep neural network for waveform segmentation, and training and optimizing the initial deep neural network based on a waveform segmentation data set to obtain a waveform segmentation deep neural network;
in this embodiment, step S5 specifically includes:
step S51: preprocessing the waveform segmentation data set; the waveform segmentation data set comprises a waveform label and waveform region image data; the pretreatment specifically comprises: cutting a paper electrocardiogram sample image into a plurality of square image blocks with the same size;
specifically, a square with a fixed size slides from left to right and from top to bottom to cut the paper electrocardiogram into a plurality of image blocks with the same sizeWherein c is the number of channels of the image block, nh and nw are the length and width of the preprocessed image block;
step S52: constructing an initial deep neural network B for waveform segmentation by taking the image block as input and taking a waveform segmentation result as output;
specifically, the deep neural network B inputs the image blocks with the same sizeOutput as a segmentation result Pseg. Where b is the batch size of the input network, c is the number of channels of the image block, and nh and nw are the length and width of the preprocessed image block.
Step S53: carrying out weight initialization on the deep neural network B;
specifically, the parameters in the deep neural network B are randomly initialized by adopting a normal distribution with a mean value of 0 and a variance of 1.
Step S54: setting a loss function of a parameter B of the deep neural network and an optimization algorithm of deep learning;
in this embodiment, the loss function is set as:wherein: m represents the number of paper electrocardiogram sample images, TiDenotes a waveform label, QiRepresenting a segmentation result; and setting the optimization algorithm of deep learning as an Adam optimization algorithm.
It should be noted that a loss function LF is definedsegTo measure the difference between the waveform signature and the segmentation result, which is specifically quantified as a loss value; in particular, by applying a loss function LFsegAnd (5) solving an optimal solution, and updating parameters in the deep neural network B by using an Adam optimization algorithm until the deep neural network B converges.
Step S55: and (4) combining the waveform segmentation data set, the loss function and the optimization algorithm to carry out iterative training on the deep neural network B to obtain the waveform segmentation deep neural network.
In this embodiment, step S55 specifically includes:
step S551: extracting image block features through a forward propagation algorithm to obtain a waveform segmentation result;
step S552: by a loss function LFsegObtaining a loss value between the waveform label and the waveform segmentation result;
step S553: combining back propagation algorithm based on chain derivation rule and Adam optimization algorithm to carry out optimization on weight parameters W in deep neural network BBCarrying out gradient updating;
step S554: repeating the steps S551 to S553 until the deep neural network B converges;
step S555: recording loss value in weight parameter WBThe change curve in the updating process stores the corresponding weight parameter W when the loss value reaches a preset threshold valueBAnd obtaining the waveform segmentation deep neural network.
Step S6: and cascading the waveform detection deep neural network and the waveform segmentation deep neural network to obtain an electrocardiogram segmentation model.
It should be noted that the present invention is cascaded in the order of "detection-segmentation".
As shown in fig. 1 and fig. 2, in this embodiment, the step S4 of constructing the waveform detection deep neural network and the step S5 of constructing the waveform segmentation deep neural network may be performed step by step or may be performed synchronously; the process steps shown in fig. 1 are stepwise, and the process steps shown in fig. 2 are synchronous.
The embodiment of the invention also provides a paper electrocardiogram segmentation model construction device based on the cascade deep neural network, which comprises the following steps:
the pretreatment module is used for acquiring a paper electrocardiogram sample image and carrying out correction treatment;
the data set acquisition module is used for calibrating a waveform area in the corrected paper electrocardiogram sample image to obtain a waveform detection data set; manufacturing a waveform label according to the calibrated waveform area to obtain a waveform segmentation data set;
a waveform detection construction module: the method comprises the steps of constructing an initial deep neural network for waveform detection, and training and optimizing the initial deep neural network based on a waveform detection data set to obtain a waveform detection deep neural network;
a waveform segmentation construction module: the method comprises the steps of constructing an initial deep neural network for waveform segmentation, and training and optimizing the initial deep neural network based on a waveform segmentation data set to obtain a waveform segmentation deep neural network;
a cascade module: the method is used for cascading the waveform detection deep neural network and the waveform segmentation deep neural network to obtain the electrocardiogram segmentation model.
As shown in fig. 3, an embodiment of the present invention further provides a paper electrocardiogram segmentation method based on a cascaded deep neural network, including:
acquiring a paper electrocardiogram image to be segmented;
inputting a paper electrocardiogram image to be segmented into an electrocardiogram processing model to obtain a waveform segmentation result;
it should be noted that the electrocardiogram processing model is the electrocardiogram segmentation model obtained by the paper electrocardiogram segmentation model construction method based on the cascaded deep neural network according to the above embodiment.
As shown in fig. 4, an embodiment of the present invention further provides a paper electrocardiogram segmentation apparatus based on a cascaded deep neural network, including:
the image data acquisition unit is used for acquiring a paper electrocardiogram image;
the segmentation unit is used for inputting the paper electrocardiogram image into the electrocardiogram processing model to obtain a waveform segmentation result;
it should be noted that the electrocardiogram processing model is the electrocardiogram segmentation model obtained by the paper electrocardiogram segmentation model construction method based on the cascaded deep neural network according to the above embodiment.
According to the embodiment of the invention, the rapid and accurate end-to-end segmentation of the waveform curve under different scenes is realized by cascading the deep neural networks for the waveform detection task and the waveform segmentation task, so that high-quality data are provided for accurate digitization of the waveform curve.
The embodiment of the invention also provides a paper electrocardiogram segmentation model construction system based on the cascade deep neural network, which comprises the following steps:
the image acquisition device is used for acquiring a paper electrocardiogram sample image;
a memory for storing a program;
and the processor is used for receiving the paper electrocardiogram sample image and executing the program to realize the operation in the paper electrocardiogram segmentation model construction method based on the cascaded deep neural network.
The embodiment of the invention also provides a paper electrocardiogram segmentation system based on the cascade deep neural network, which comprises the following steps:
the image acquisition device is used for acquiring a paper electrocardiogram image;
a memory for storing a program;
and the processor is used for receiving the paper electrocardiogram sample image and executing the program to realize the operation in the paper electrocardiogram segmentation method based on the cascaded deep neural network.
It should be noted that the program in the above embodiments may be any combination of one or more programming languages, including an object oriented programming language such as Java, C + +, etc., and a conventional procedural programming language such as "C" or similar programming languages, to write program code for performing the operations of the embodiments of the present application. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the device described above, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention should be equivalent or changed within the scope of the present invention.
Claims (17)
1. A paper electrocardiogram segmentation model construction method based on a cascade deep neural network is characterized by comprising the following steps:
s1: acquiring a paper electrocardiogram sample image, and performing correction treatment;
s2: calibrating a waveform area in the corrected paper electrocardiogram sample image to obtain a waveform detection data set;
s3: manufacturing a waveform label according to the calibrated waveform area to obtain a waveform segmentation data set;
s4: constructing an initial deep neural network for waveform detection, and training and optimizing the initial deep neural network based on a waveform detection data set to obtain a waveform detection deep neural network;
s5: constructing an initial deep neural network for waveform segmentation, and training and optimizing the initial deep neural network based on a waveform segmentation data set to obtain a waveform segmentation deep neural network;
s6: and cascading the waveform detection deep neural network and the waveform segmentation deep neural network to obtain an electrocardiogram segmentation model.
2. The paper electrocardiogram segmentation model construction method according to claim 1, wherein the step S4 specifically comprises:
s41: preprocessing the waveform detection data set; the waveform detection data set comprises waveform area calibration coordinate data and waveform area image data;
s42: taking a waveform region image as input, taking a waveform region prediction coordinate and prediction probability as output, and constructing an initial deep neural network A for waveform detection;
s43: carrying out weight initialization on an initial deep neural network A for waveform detection;
s44: setting a loss function for adjusting parameters of the deep neural network A and an optimization algorithm for deep learning;
s45: and (4) combining the waveform detection data set, the loss function and the optimization algorithm to carry out iterative training on the deep neural network A to obtain the waveform detection deep neural network.
3. The paper electrocardiogram segmentation model construction method according to claim 2, wherein the step S41 specifically includes:
s411: distorting the length and width of the waveform area image and filling four boundaries of the image with gray pixel values;
s412: judging whether the image turning condition is met or not, if so, turning the waveform area image;
s413: and adjusting the color gamut of the waveform area image.
4. The paper electrocardiogram segmentation model construction method according to claim 2, wherein the step S43 specifically includes: parameters in the deep neural network A are initialized randomly by adopting normal distribution with the mean value of 0 and the variance of 1.
5. The paper electrocardiogram segmentation model construction method according to claim 2, wherein the step S44 specifically includes:
the loss function is set to:wherein: m represents the number of paper electrocardiogram sample images, and alpha and gamma represent weight parameters, respectively. PiRepresenting a prediction probability;
and setting the optimization algorithm of deep learning as an Adam optimization algorithm.
6. The paper electrocardiogram segmentation model construction method according to claim 2, wherein the step S45 specifically includes:
s451: extracting the image characteristics of the waveform region through a forward propagation algorithm to obtain a waveform region prediction coordinate;
s452: by a loss function LFdetectionObtaining a loss value between a waveform area prediction coordinate and a waveform area calibration coordinate;
s453: combining back propagation algorithm based on chain derivation rule and Adam optimization algorithm to carry out optimization on weight parameters W in deep neural network AACarrying out gradient updating;
s454: repeating the steps S451-S453 until the deep neural network A converges;
s455: recording loss value in weight parameter WAThe change curve in the updating process stores the corresponding weight parameter W when the loss value reaches a preset threshold valueAAnd obtaining the waveform detection deep neural network.
7. The paper electrocardiogram segmentation model construction method according to claim 2, wherein the step S45 is followed by further comprising: according to the waveform detection deep neural network output waveform area prediction coordinate, post-processing operation is carried out, and the method specifically comprises the following steps:
designing a fine tuning algorithm based on the thought of gradual long comparison;
optimizing a waveform detection deep neural network output waveform area prediction coordinate through a fine tuning algorithm;
and obtaining an accurate waveform area from the paper electrocardiogram sample image according to the optimized waveform area prediction coordinates.
8. The paper electrocardiogram segmentation model construction method according to claim 1, wherein the step S5 specifically comprises:
s51: preprocessing the waveform segmentation data set; the waveform segmentation data set comprises a waveform label and waveform region image data; the pretreatment specifically comprises: cutting a paper electrocardiogram sample image into a plurality of square image blocks with the same size;
s52: constructing an initial deep neural network B for waveform segmentation by taking the image block as input and taking a waveform segmentation result as output;
s53: carrying out weight initialization on the deep neural network B;
s54: setting a loss function of a parameter B of the deep neural network and an optimization algorithm of deep learning;
s55: and (4) combining the waveform segmentation data set, the loss function and the optimization algorithm to carry out iterative training on the deep neural network B to obtain the waveform segmentation deep neural network.
9. The paper electrocardiogram segmentation model construction method according to claim 8, wherein the step S53 specifically comprises: and (3) randomly initializing parameters in the deep neural network B by adopting normal distribution with the mean value of 0 and the variance of 1.
10. The paper electrocardiogram segmentation model construction method according to claim 8, wherein the step S54 specifically comprises:
the loss function is set to:wherein: m represents the number of paper electrocardiogram sample images, TiDenotes a waveform label, QiRepresenting a segmentation result;
and setting the optimization algorithm of deep learning as an Adam optimization algorithm.
11. The paper electrocardiogram segmentation model construction method according to claim 8, wherein the step S55 specifically comprises:
s551: extracting image block features through a forward propagation algorithm to obtain a waveform segmentation result;
s552: by a loss function LFsegObtaining a loss value between the waveform label and the waveform segmentation result;
s553: combining back propagation algorithm based on chain derivation rule and Adam optimization algorithm to carry out optimization on weight parameters W in deep neural network BBCarrying out gradient updating;
s554: repeating the steps S551-S553 until the deep neural network B converges;
s555: recording loss value in weight parameter WBThe change curve in the updating process stores the corresponding weight parameter W when the loss value reaches a preset threshold valueBAnd obtaining the waveform segmentation deep neural network.
12. The paper electrocardiogram segmentation model construction method according to claim 1, wherein the step S1 specifically comprises:
s11: acquiring a paper electrocardiogram sample image;
s12: setting an angle range, and solving the sum of line pixels of the image at different angles in the angle range by a preset step length;
s13: and comparing the line pixels and the sizes at different angles, and correcting the inclination angle of the image according to the line pixels and the maximum value.
13. A paper electrocardiogram segmentation model construction device based on a cascade deep neural network is characterized by comprising the following steps:
the pretreatment module is used for acquiring a paper electrocardiogram sample image and carrying out correction treatment;
the data set acquisition module is used for calibrating a waveform area in the corrected paper electrocardiogram sample image to obtain a waveform detection data set; manufacturing a waveform label according to the calibrated waveform area to obtain a waveform segmentation data set;
a waveform detection construction module: the method comprises the steps of constructing an initial deep neural network for waveform detection, and training and optimizing the initial deep neural network based on a waveform detection data set to obtain a waveform detection deep neural network;
a waveform segmentation construction module: the method comprises the steps of constructing an initial deep neural network for waveform segmentation, and training and optimizing the initial deep neural network based on a waveform segmentation data set to obtain a waveform segmentation deep neural network;
a cascade module: the method is used for cascading the waveform detection deep neural network and the waveform segmentation deep neural network to obtain the electrocardiogram segmentation model.
14. A paper electrocardiogram segmentation model construction system based on a cascade deep neural network is characterized by comprising the following steps:
the image acquisition device is used for acquiring a paper electrocardiogram sample image;
a memory for storing a program;
a processor for receiving the paper electrocardiogram sample image, and executing the program to implement the operations of the method according to any one of claims 1 to 12.
15. A paper electrocardiogram segmentation method based on a cascade deep neural network is characterized by comprising the following steps:
acquiring a paper electrocardiogram image to be segmented;
inputting a paper electrocardiogram image to be segmented into an electrocardiogram processing model to obtain a waveform segmentation result;
the electrocardiogram processing model is the electrocardiogram segmentation model obtained by the method for constructing the paper electrocardiogram segmentation model based on the cascaded deep neural network according to any one of claims 1 to 12.
16. A paper electrocardiogram segmentation device based on a cascaded deep neural network is characterized by comprising:
the image data acquisition unit is used for acquiring a paper electrocardiogram image;
the segmentation unit is used for inputting the paper electrocardiogram image into the electrocardiogram processing model to obtain a waveform segmentation result;
the electrocardiogram processing model is the electrocardiogram segmentation model obtained by the method for constructing the paper electrocardiogram segmentation model based on the cascaded deep neural network according to any one of claims 1 to 12.
17. A paper electrocardiogram segmentation system based on a cascaded deep neural network is characterized by comprising:
the image acquisition device is used for acquiring a paper electrocardiogram image;
a memory for storing a program;
a processor for receiving the paper electrocardiogram sample image, and for executing the program to implement the operations of the method of claim 15.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111545765.XA CN114240881A (en) | 2021-12-16 | 2021-12-16 | Method, device and system for constructing and segmenting paper electrocardiogram segmentation model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111545765.XA CN114240881A (en) | 2021-12-16 | 2021-12-16 | Method, device and system for constructing and segmenting paper electrocardiogram segmentation model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114240881A true CN114240881A (en) | 2022-03-25 |
Family
ID=80757269
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111545765.XA Pending CN114240881A (en) | 2021-12-16 | 2021-12-16 | Method, device and system for constructing and segmenting paper electrocardiogram segmentation model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114240881A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115736939A (en) * | 2022-11-24 | 2023-03-07 | 北京哈特瑞姆医疗技术服务有限公司 | Atrial fibrillation disease probability generation method and device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107578416A (en) * | 2017-09-11 | 2018-01-12 | 武汉大学 | It is a kind of by slightly to heart left ventricle's full-automatic partition method of smart cascade deep network |
CN111507998A (en) * | 2020-04-20 | 2020-08-07 | 南京航空航天大学 | Depth cascade-based multi-scale excitation mechanism tunnel surface defect segmentation method |
CN111598089A (en) * | 2020-05-16 | 2020-08-28 | 湖南大学 | License plate correction and recognition method based on deep learning |
-
2021
- 2021-12-16 CN CN202111545765.XA patent/CN114240881A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107578416A (en) * | 2017-09-11 | 2018-01-12 | 武汉大学 | It is a kind of by slightly to heart left ventricle's full-automatic partition method of smart cascade deep network |
CN111507998A (en) * | 2020-04-20 | 2020-08-07 | 南京航空航天大学 | Depth cascade-based multi-scale excitation mechanism tunnel surface defect segmentation method |
CN111598089A (en) * | 2020-05-16 | 2020-08-28 | 湖南大学 | License plate correction and recognition method based on deep learning |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115736939A (en) * | 2022-11-24 | 2023-03-07 | 北京哈特瑞姆医疗技术服务有限公司 | Atrial fibrillation disease probability generation method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11551333B2 (en) | Image reconstruction method and device | |
CN110415230B (en) | CT slice image semantic segmentation system and method based on deep learning | |
CN113450328B (en) | Medical image key point detection method and system based on improved neural network | |
WO2021057423A1 (en) | Image processing method, image processing apparatus, and storage medium | |
CN111382616B (en) | Video classification method and device, storage medium and computer equipment | |
CN113298023B (en) | Insect dynamic behavior identification method based on deep learning and image technology | |
WO2021027152A1 (en) | Image synthesis method based on conditional generative adversarial network, and related device | |
CN114240881A (en) | Method, device and system for constructing and segmenting paper electrocardiogram segmentation model | |
JP4564096B2 (en) | Classification of compound motion including interaction with objects | |
CN114648049A (en) | Method, device and system for constructing and classifying electrocardio image classification model | |
CN114119968B (en) | Paper electrocardiogram signal region extraction method and system based on deep neural network | |
CN116012568A (en) | System for acquiring cardiac rhythm information through photographing electrocardiogram | |
CN107784664B (en) | K-sparse-based rapid robust target tracking method | |
WO2019223066A1 (en) | Global enhancement method, device and equipment for iris image, and storage medium | |
WO2021115130A1 (en) | Intelligent detection method and apparatus for cerebral hemorrhage spots, electronic device and storage medium | |
CN111862123B (en) | Deep learning-based CT abdominal artery blood vessel hierarchical recognition method | |
CN111862259B (en) | Medical perfusion image processing method and medical imaging device | |
CN108875789B (en) | Sugarcane bud feature recognition device based on deep learning | |
CN108876767B (en) | Sugarcane festival characteristic quick identification device | |
CN115880358A (en) | Construction method of positioning model, positioning method of image mark points and electronic equipment | |
CN111145221A (en) | Target tracking algorithm based on multi-layer depth feature extraction | |
CN114937030A (en) | Phenotypic parameter calculation method for intelligent agricultural planting of lettuce | |
CN112926603B (en) | Music score recognition method, device, equipment and storage medium | |
CN110432874B (en) | Pulse wave processing method and device | |
CN115578400A (en) | Image processing method, and training method and device of image segmentation network |
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 |