A biological tissue parameter inference method and related device
By combining a generative adversarial network model with an external signal to optimize the loss function, the problem of discontinuity in the time dimension of skeletal muscle structural parameters is solved, and high-precision and stable biological tissue parameter inference is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN UNIV
- Filing Date
- 2023-12-29
- Publication Date
- 2026-08-04
AI Technical Summary
Existing technologies do not consider the temporal correlation between frames when calculating the structural parameters of biological tissues, resulting in images that are not smooth enough in terms of temporal changes, which affects the accuracy of biological tissue parameter inference.
A generative adversarial network model is adopted. By training the generator network and the discriminator network, combined with external signals such as electromyography and kinematic signals, the loss function is optimized to improve the smoothness of the image in the temporal dimension and generate more continuous skeletal muscle structural parameters.
It improves the accuracy and stability of biological tissue parameter inference, and the generated skeletal muscle structure parameters are smoother in the time dimension, overcoming the drawbacks of traditional methods and achieving efficient image processing and analysis.
Smart Images

Figure CN117788332B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing and analysis technology, and in particular to a method, system, terminal, and computer-readable storage medium for inferring biological tissue parameters. Background Technology
[0002] In existing biological tissues, taking skeletal muscle as an example, the main structural parameters of skeletal muscle include the penultimate angle, muscle length, and muscle thickness. The main methods for calculating these structural parameters include edge detection algorithms, threshold segmentation, Hough transform and other image processing methods, as well as deep learning-based methods.
[0003] While edge detection algorithms and thresholding methods are computationally efficient and easy to implement, they are sensitive to noise and lighting conditions and lack adaptability to complex backgrounds. Hough transform is suitable for detecting simple geometries, but it is computationally intensive and has limited adaptability to complex shapes. Deep learning-based methods, while powerful in feature extraction, rely on large amounts of labeled data and significant computational resources, and their black-box nature limits interpretability. These methods primarily focus on the accuracy of skeletal muscle structural parameters calculation in each frame of ultrasound image. However, skeletal muscle is only partially visible in ultrasound images, leading to numerical discontinuities in the calculation of skeletal muscle structural parameters and resulting in decreased accuracy in biological tissue parameter inference.
[0004] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0005] The main objective of this invention is to provide a method, system, terminal, and computer-readable storage medium for inferring biological tissue parameters. This invention aims to solve the problem in the prior art that, when calculating the structural parameters of biological tissues, the correlation between frames in the time dimension is not taken into account, resulting in images that are not smooth enough in terms of time changes, which leads to a decrease in the accuracy of biological tissue parameter inference.
[0006] To achieve the above objectives, the present invention provides a method for inferring biological tissue parameters, the method comprising the following steps:
[0007] Acquire ultrasound images of biological tissues, create labels for the ultrasound images of the biological tissues to obtain labeled images, and use the ultrasound images and the labeled images as a dataset;
[0008] The generative adversarial network model is trained based on the dataset, and a first total loss function is calculated. When the first total loss function reaches a first convergence condition, a first change gradient and a second change gradient are calculated.
[0009] The external loss function is calculated based on the first change gradient and the second change gradient. The external loss function is added to the first total loss function to obtain the second total loss function. The generative adversarial network model is then trained until the second total loss function reaches the second convergence condition, at which point the target network model is obtained.
[0010] Select a target biological tissue, acquire a target ultrasound image of the target biological tissue, input the target ultrasound image into the target network model, and output the structural parameters of the target biological tissue.
[0011] Acquire ultrasound images of biological tissues, create labels for the ultrasound images of the biological tissues to obtain labeled images, and use the ultrasound images and the labeled images as a dataset;
[0012] The generative adversarial network model is trained based on the dataset, and a first total loss function is calculated. When the first total loss function reaches a first convergence condition, a first change gradient and a second change gradient are calculated.
[0013] The external loss function is calculated based on the first change gradient and the second change gradient. The external loss function is added to the first total loss function to obtain the second total loss function. The generative adversarial network model is then trained until the second total loss function reaches the second convergence condition, at which point the target network model is obtained.
[0014] Select a target biological tissue, acquire an ultrasound image of the target biological tissue to be processed, input the ultrasound image to be processed into the target network model, output the target ultrasound image of the target biological tissue, and obtain the target biological tissue parameters smoothed in the time dimension based on the target ultrasound image.
[0015] Optionally, the biological tissue parameter inference method, wherein the step of creating labels for the ultrasound images of the biological tissue to obtain label images, and using the ultrasound images and the label images as a dataset, specifically includes:
[0016] Labels are drawn for ultrasound images of several biological tissues to obtain label images corresponding to ultrasound images of several biological tissues;
[0017] The ultrasound images and corresponding labeled images of each biological tissue are merged to obtain several pairs of images, which are then used as a dataset.
[0018] The dataset is divided into a training set and a test set according to a preset ratio. The training set is used to train the generative adversarial network model, and the test set is used to detect the accuracy of the prediction results of the generative adversarial network model.
[0019] Optionally, in the biological tissue parameter inference method, the generative adversarial network model includes a generator network and a discriminator network;
[0020] The generator network is composed of a UNet network with skip connections, and the discriminator network is composed of a PatchGAN network.
[0021] Optionally, the biological tissue parameter inference method, wherein training the generative adversarial network model based on the dataset and calculating the first total loss function specifically includes:
[0022] Randomly select pairs of images from the dataset, use the ultrasound image in the pair as the input image and the label image as the real image, input the ultrasound image into the generative adversarial network model for calculation, and obtain the generated image generated by the generator network and the output image generated by the discriminator network.
[0023] Calculate the adversarial loss function and the L1 loss function based on the input image, the real image, the generated image, and the output image:
[0024]
[0025] in, Let G represent the adversarial loss function, D represent the generator network, x represent the input image, y represent the output image, z represent random noise, D(·) represent the probability, and E represent the expectation of the probability.
[0026]
[0027] in, Let ||·||1 represent the L1 loss function, and let ||·||1 represent the L1 norm.
[0028] Using a pre-trained feature extraction network as a feature extractor, the generated image and the real image are respectively input into the feature extraction network to calculate the feature loss function:
[0029]
[0030] Among them, L perceptual (g) represents the feature loss function, φ represents the feature extraction network, and G(x) i ) represents the generated image, y i Represents the actual image, ||·|| 2 denoted as squared Euclidean distance, and N represents the number of samples in the dataset.
[0031] The adversarial loss function, the L1 loss function, and the feature loss function are fused to obtain the first total loss function:
[0032]
[0033] Where λ, μ, and v are the weights of different loss functions, respectively.
[0034] Optionally, in the biological tissue parameter inference method, the step of calculating the first gradient and the second gradient when the first total loss function reaches the first convergence condition specifically includes:
[0035] When the first total loss function reaches the preset first convergence condition, the first change gradient of the biological tissue parameters in consecutive frames is calculated.
[0036] The exogenous signal of the biological tissue in the corresponding time series is obtained, and the second change gradient of the exogenous signal in consecutive frames is calculated.
[0037] Optionally, the biological tissue parameter inference method, wherein calculating the exogenous loss function based on the first and second gradient changes, and adding the exogenous loss function to the first total loss function to obtain the second total loss function, specifically includes:
[0038] The external loss function is calculated based on the first gradient change and the second gradient change: L es =Δθ - Δd;
[0039] Among them, L es Let represent the external loss function, Δθ represent the first gradient change, and Δd represent the second gradient change;
[0040] The external loss function is added to the first total loss function to obtain the second total loss function:
[0041] Optionally, the biological tissue parameter inference method, wherein the step of continuing to train the generative adversarial network model until the second total loss function reaches the second convergence condition to obtain the target network model, specifically includes:
[0042] Continue training the generative adversarial network model and calculate the second total loss function;
[0043] If the second total loss function meets the second convergence condition, then the optimal parameters of the generator network are calculated:
[0044] in, Indicates that The generator network parameters when the expectation of G is minimized and the expectation of D is maximized.
[0045] The generative adversarial network model is optimized based on the optimal parameters of the generator network to obtain the target network model.
[0046] Furthermore, to achieve the above objectives, the present invention also provides a biological tissue parameter inference system, wherein the biological tissue parameter inference system comprises:
[0047] The training data acquisition module is used to acquire ultrasound images of biological tissues, create labels for the ultrasound images of the biological tissues to obtain labeled images, and use the ultrasound images and the labeled images as a dataset.
[0048] The first model training module is used to train the generative adversarial network model according to the dataset and calculate the first total loss function. When the first total loss function reaches the first convergence condition, the first change gradient and the second change gradient are calculated.
[0049] The second model training module is used to calculate the external loss function based on the first change gradient and the second change gradient, add the external loss function to the first total loss function to obtain the second total loss function, and continue to train the generative adversarial network model until the second total loss function reaches the second convergence condition to obtain the target network model.
[0050] The target model application module is used to select a target biological tissue, acquire a target ultrasound image of the target biological tissue, input the ultrasound image of the target biological tissue into the target network model, and output the structural parameters of the target biological tissue.
[0051] In addition, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a biological tissue parameter reasoning program stored in the memory and executable on the processor, wherein when the biological tissue parameter reasoning program is executed by the processor, it implements the steps of the biological tissue parameter reasoning method as described above.
[0052] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a biological tissue parameter inference program, which, when executed by a processor, implements the steps of the biological tissue parameter inference method as described above.
[0053] In this invention, ultrasound images of biological tissues are collected as a dataset. A generative adversarial network (GAN) model is trained based on this dataset, and a first total loss function is calculated. When the first total loss function reaches a first convergence condition, a first gradient and a second gradient are calculated. An exogenous loss function is calculated based on the first and second gradients and added to the first total loss function to obtain a second total loss function. The GAN model is then trained again until the second total loss function reaches a second convergence condition, resulting in a target network model. This target network model is used to output the structural parameters of the target biological tissue. This invention introduces exogenous signals to guide the generative network generation, making the changes in skeletal muscle structural parameters in the generated images smoother over time, effectively improving the accuracy of biological tissue parameter inference. Attached Figure Description
[0054] Figure 1 This is a flowchart of a preferred embodiment of the biological tissue parameter reasoning method of the present invention;
[0055] Figure 2 This is an architecture diagram of the generative adversarial network model in the biological tissue parameter reasoning method of this invention;
[0056] Figure 3 This is a schematic diagram of a preferred embodiment of the biological tissue parameter reasoning system of the present invention;
[0057] Figure 4 This is a schematic diagram of the operating environment of a preferred embodiment of the terminal of the present invention. Detailed Implementation
[0058] This application provides a method and related equipment for inferring biological tissue parameters. To make the purpose, technical solution, and effects of this application clearer and more explicit, the following detailed description is provided with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining this application and are not intended to limit this application.
[0059] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0060] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0061] The biological tissue parameter inference method described in the preferred embodiment of the present invention, such as... Figure 1 As shown, the biological tissue parameter inference method includes the following steps:
[0062] Step S100: Acquire ultrasound images of biological tissues, create labels for the ultrasound images of biological tissues to obtain label images, and use the ultrasound images and the label images as a dataset.
[0063] In this embodiment, ultrasound images of several biological tissues are acquired for training, and labels are created for the ultrasound images of the biological tissues to obtain labeled images; the process of creating labels for the ultrasound images of the biological tissues, using the ultrasound images and the labeled images as a dataset, specifically includes:
[0064] Labels are drawn for ultrasound images of several biological tissues to obtain label images corresponding to ultrasound images of several biological tissues;
[0065] The ultrasound images and corresponding labeled images of each biological tissue are merged to obtain several pairs of images, which are then used as a dataset.
[0066] The dataset is divided into a training set and a test set according to a preset ratio. The training set is used to train the generative adversarial network model, and the test set is used to detect the accuracy of the prediction results of the generative adversarial network model.
[0067] It is understood that the labels drawn for the ultrasound images of the biological tissue are drawn manually. The labels are used to display specific structural parameters of the biological tissue, such as texture direction, segmentation regions, and other features. The original image (ultrasound image of the biological tissue) and the label image are merged into a pair of images. Specifically, the ultrasound image and the corresponding label image of each biological tissue are merged to obtain several pairs of images, and these pairs of images are used as a dataset.
[0068] Furthermore, the dataset is divided into a training set and a test set according to a preset ratio (e.g., the ratio of training set to test set is 8:2). The training set is used to train the generative adversarial network model and optimize the model's parameters, while the test set is used to detect the accuracy of the prediction results of the generative adversarial network model and evaluate the model's performance.
[0069] Step S200: Train the generative adversarial network model according to the dataset and calculate the first total loss function. When the first total loss function reaches the first convergence condition, calculate the first change gradient and the second change gradient.
[0070] like Figure 2 As shown, in this embodiment, the generative adversarial network model includes a generator network and a discriminator network; training a generative adversarial network (GAN) is a game-theoretic process in which the discriminator and the generator compete against each other. The discriminator aims to maximize its ability to distinguish between real and fake data, while the generator aims to maximize the realism of the generated fake data. There is an adversarial relationship between the loss functions of the discriminator and the generator. Optimizing the discriminator's loss leads to better classification of real and fake data, making it more difficult to train the generator. Conversely, optimizing the generator leads to the generation of more realistic fake data, thus increasing the difficulty for the discriminator. The ultimate goal of GAN is to reach an equilibrium state where the data generated by the generator is realistic enough that the discriminator cannot reliably distinguish between real and fake data. This is the convergence condition of GAN, where the performance of the generator is maximized, while the performance of the discriminator is minimized. This equilibrium state corresponds to the distribution of data generated by the generator matching the real data distribution.
[0071] Specifically, the generator network consists of a U-Net network with skip connections, and the discriminator network consists of a PatchGAN network. The generator network is a U-Net network with skip connections, and the discriminator network is a 70x70 PatchGAN network. The PatchGAN discriminator works by classifying individual patches in an image as real or fake, rather than classifying the entire image as "real or fake." This enforces more constraints, thus encouraging sharp high-frequency details. Furthermore, PatchGAN has fewer parameters and runs faster than classifying the entire image.
[0072] It should be noted that this invention mainly uses generative adversarial network models as examples, but is not limited to them. Other generative networks can achieve the same effect as this invention. Similarly, in addition to the example combination of U-Net generator network and PatchGAN discriminator, other types of generators and discriminators combined with GANs can also achieve the same effect. However, the accuracy of the results and the complexity of the algorithms obtained by different neural network models will vary.
[0073] Further, the step of training the generative adversarial network model based on the dataset and calculating the first total loss function specifically includes:
[0074] Randomly select pairs of images from the dataset, use the ultrasound image in the pair as the input image and the label image as the real image, input the ultrasound image into the generative adversarial network model for calculation, and obtain the generated image generated by the generator network and the output image generated by the discriminator network.
[0075] Calculate the adversarial loss function and the L1 loss function based on the input image, the real image, the generated image, and the output image:
[0076]
[0077] in, Let G denote the adversarial loss function, G denote the generator network, D denote the discriminator network, x denote the input image, y denote the output image, z denote random noise, D(·) denote the probability, and E denote the expectation of the probability; E x,y E represents the expected (average) probability that the discriminator D classifies an input image x and its corresponding output image y as real images. x,z This represents the expected (average) probability that the discriminator D determines the image generated by the generator G to be a fake image, given an input image x and random noise z.
[0078] Understandable It is used to train the PatchGAN network to ensure that the generator (G) can generate realistic images under given conditions, while making it difficult for the discriminator (D) to distinguish these generated images from real images. The adversarial loss function reflects the core idea of generative adversarial networks: a good generator should be able to generate images that are enough to confuse the discriminator, while a good discriminator should be able to accurately distinguish between real and fake images.
[0079]
[0080] in, Let ||·||1 represent the L1 loss function, and let ||·||1 represent the L1 norm (Manhattan distance).
[0081] Furthermore, a pre-trained feature extraction network is used as the feature extractor. This pre-trained network can utilize a pre-trained VGG16 network (a popular convolutional neural network). The generated and real images are input into the VGG16 network respectively to calculate the feature loss function: the outputs (high-level feature representations of the images) of these two sets of images at one (or more) layer of the VGG16 network are extracted, and element-wise comparisons are performed to calculate the difference between the two sets of features, i.e., the feature loss function.
[0082] The generated image and the real image are respectively input into the feature extraction network to calculate the feature loss function:
[0083]
[0084] Among them, L perceptual (G) represents the feature loss function, φ represents the feature extraction network, G(x) i ) represents the generated image, y i Represents the actual image, ||·|| 2 The mean squared Euclidean distance (MSD) is represented by N, which represents the number of samples in the dataset.
[0085] The adversarial loss function, the L1 loss function, and the feature loss function are fused to obtain the first total loss function:
[0086]
[0087] Where λ, μ, and ν are the weights of different loss functions, respectively.
[0088] It is understood that the adversarial loss function, the L1 loss function, and the feature loss function work together during the training of the generative adversarial network to generate high-quality images. The adversarial loss function provides the basic framework and realism of the generated images, the L1 loss function ensures pixel-level accuracy, and the feature loss function ensures the similarity of images on high-level features (such as texture and style). Combining these three losses can effectively improve the overall quality and realism of the generated images.
[0089] Furthermore, this application uses exogenous signals to guide the model training process. When the first total loss function reaches the preset first convergence condition, relevant exogenous signals of biological tissues are introduced (exogenous signals include, but are not limited to, signals related to various biological tissues). Taking skeletal muscle as an example, this application introduces exogenous signals related to skeletal muscle, including but not limited to electromyography signals, force signals (such as torque), kinematic signals (such as joint angles, displacements, and velocities), etc., to guide the model training process. One or more key features of continuous and smooth exogenous signals are incorporated into the total loss function. These exogenous signal features are selected and converted into quantified loss indicators to guide the training process of the generative neural network.
[0090] First, the generative network generates images without the guidance of external signals after pre-training. The biological tissue parameters of the generated images are calculated (taking the feather angle of muscle as an example). The first gradient of the feather angle between consecutive frames is calculated, and the second gradient of the feather angle between consecutive frames of the time series corresponding to the external signal is calculated.
[0091] In other words, when the first total loss function reaches the preset first convergence condition, the first gradient of biological tissue parameters in consecutive frames is calculated; the exogenous signal of the biological tissue in the corresponding time series is obtained, and the second gradient of the exogenous signal in consecutive frames is calculated.
[0092] Step S300: Calculate the external loss function based on the first change gradient and the second change gradient, add the external loss function to the first total loss function to obtain the second total loss function, and continue training the generative adversarial network model until the second total loss function reaches the second convergence condition to obtain the target network model.
[0093] Specifically, the external loss function is calculated based on the first gradient change and the second gradient change: L es =Δθ - Δd; where, L es Let represent the external loss function, Δθ represent the first gradient change, and Δd represent the second gradient change;
[0094] Furthermore, the external loss function is added to the total loss function to obtain a second total loss function. The generative adversarial network model is then trained based on this second total loss function. Here, weights can be assigned to each loss function according to the actual task, and the previously pre-trained generative network continues to be trained. The generator and discriminator networks are trained alternately until convergence. Alternating training includes alternately optimizing the discriminator to improve its ability to distinguish between real and generated images, and optimizing the generator to improve its ability to generate realistic images, until the overall network performance reaches a predetermined standard.
[0095] Specifically, the external loss function is added to the first total loss function to obtain the second total loss function:
[0096] Continue training the generative adversarial network model and calculate the second total loss function; if the second total loss function reaches the second convergence condition, then calculate the optimal parameters of the generator network: in, Indicates that The generator network parameters are determined when the expectation of G is minimized and the expectation of D is maximized. The generative adversarial network model is then optimized based on these optimal parameters to obtain the target network model.
[0097] As can be seen, this application combines exogenous signal guidance to achieve more stable biological tissue parameter calculation and inference. By introducing relatively smooth exogenous signals such as electromyography, torque and kinematics into the parameter inference calculation process, it helps to stabilize the parameter calculation and inference results (ensuring the smoothness of the entire movement), and realizes efficient and stable biological tissue parameter inference calculation.
[0098] Furthermore, the obtained target network model is evaluated in the following four ways:
[0099] (1) Visual evaluation: The quality of the generated images is evaluated by experts or experienced observers, particularly the accuracy and continuity of muscle structures. A standardized visual evaluation process can be set up to allow evaluators to score the generated image sequences.
[0100] (2) Quantitative Comparison: Quantitative metrics are used to compare the similarity between the generated image and the labeled image. Metrics such as mean squared error (MSE), structural similarity index (SSIM), or peak signal-to-noise ratio (PSNR) can be used. These metrics can help quantify the differences between the generated image and the target image.
[0101] (3) Temporal continuity analysis: To assess the continuity and smoothness in the temporal dimension, the differences between adjacent frames can be calculated (e.g., using inter-frame differencing). If the generated image sequence is smooth in the temporal dimension, then the differences between adjacent frames should be small.
[0102] (4). Structural feature analysis: Image processing algorithms can be developed or used to extract and quantify structural parameters, and then the consistency of the generated image and the label image in terms of structural parameters can be compared.
[0103] Step S400: Select the target biological tissue, acquire the ultrasound image of the target biological tissue to be processed, input the ultrasound image to be processed into the target network model, output the target ultrasound image of the target biological tissue, and obtain the target biological tissue parameters smoothed in the time dimension based on the target ultrasound image.
[0104] Specifically, a target biological tissue for which structural parameters are to be obtained is selected, and a target ultrasound image of the target biological tissue is acquired through an imaging device. The target ultrasound image is then input into the target network model for calculation, thereby obtaining the target ultrasound image of the target biological tissue. The structural parameters of the target ultrasound image will be smoother in the time dimension than the structural parameters of the original ultrasound image to be processed. Thus, the target biological tissue parameters that are smooth in the time dimension can be obtained from the target ultrasound image.
[0105] It should be noted that, in addition to target ultrasound images acquired through imaging equipment, the method of this application is also applicable to various types of medical image data, including but not limited to MRI (Magnetic Resonance Imaging), CT scans, X-rays, and ultrasound images. Non-traditional medical image data, such as physiological data collected from wearable devices, may also be considered.
[0106] Understandably, this application has low requirements for the image quality of tissue images. Even when some images are unclear, the model can still achieve relatively accurate tissue parameter calculation and inference, overcoming the irregularity of aponeurosis displacement (i.e., fluctuations caused by noise) caused by non-temporal Hough transform methods and the drift problem of temporal methods.
[0107] As can be seen, this invention addresses the instability of skeletal muscle structural parameters in the temporal dimension under ultrasound images of biological tissues (taking skeletal muscle as an example). By introducing this method, the generated skeletal muscle structural parameters become smoother in the temporal dimension, better reflecting the continuous changes in skeletal muscle structure. This method uses a generative network, maintaining high accuracy and robustness, overcoming the drawbacks of traditional temporal and non-temporal methods. Simultaneously, this invention enhances the analytical capabilities in the temporal dimension: this technique achieves continuity and smoothness of the image sequence in the temporal dimension while preserving structural details.
[0108] Furthermore, this invention improves image processing efficiency: by automatically generating these high-quality images using a GAN network, the time and effort required for manual image processing and adjustment can be significantly reduced, thereby improving overall work efficiency.
[0109] This invention also improves the flexibility of image generation: since GAN networks can accept various types of input data and generate realistic outputs, this method provides greater flexibility when processing different medical image data (such as MRI, CT scans, etc.).
[0110] Furthermore, such as Figure 3 As shown, based on the above-described biological tissue parameter reasoning method, the present invention also provides a biological tissue parameter reasoning system, wherein the biological tissue parameter reasoning system includes:
[0111] The training data acquisition module 51 is used to acquire ultrasound images of biological tissues, create labels for the ultrasound images of biological tissues to obtain labeled images, and use the ultrasound images and the labeled images as a dataset.
[0112] The first model training module 52 is used to train the generative adversarial network model according to the dataset and calculate the first total loss function. When the first total loss function reaches the first convergence condition, the first change gradient and the second change gradient are calculated.
[0113] The second model training module 53 is used to calculate the external loss function based on the first change gradient and the second change gradient, add the external loss function to the first total loss function to obtain the second total loss function, and continue to train the generative adversarial network model until the second total loss function reaches the second convergence condition to obtain the target network model.
[0114] The target model application module 54 is used to select a target biological tissue, acquire the ultrasound image to be processed of the target biological tissue, input the ultrasound image to be processed into the target network model, output the target ultrasound image of the target biological tissue, and obtain the target biological tissue parameters smoothed in the time dimension based on the target ultrasound image.
[0115] Furthermore, such as Figure 4 As shown, based on the above-mentioned biological tissue parameter reasoning method and system, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 4 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0116] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a biological tissue parameter inference program 40, which can be executed by the processor 10 to implement the biological tissue parameter inference method of this application.
[0117] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the biological tissue parameter inference method.
[0118] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The components 10-30 of the terminal communicate with each other via a system bus.
[0119] In one embodiment, when the processor 10 executes the biological tissue parameter inference program 40 in the memory 20, the following steps are performed:
[0120] Acquire ultrasound images of biological tissues, create labels for the ultrasound images of the biological tissues to obtain labeled images, and use the ultrasound images and the labeled images as a dataset;
[0121] The generative adversarial network model is trained based on the dataset, and a first total loss function is calculated. When the first total loss function reaches a first convergence condition, a first change gradient and a second change gradient are calculated.
[0122] The external loss function is calculated based on the first change gradient and the second change gradient. The external loss function is added to the first total loss function to obtain the second total loss function. The generative adversarial network model is then trained until the second total loss function reaches the second convergence condition, at which point the target network model is obtained.
[0123] Select a target biological tissue, acquire an ultrasound image of the target biological tissue to be processed, input the ultrasound image to be processed into the target network model, output the target ultrasound image of the target biological tissue, and obtain the target biological tissue parameters smoothed in the time dimension based on the target ultrasound image.
[0124] Specifically, the step of creating labels for the ultrasound images of the biological tissue to obtain labeled images, and using the ultrasound images and the labeled images as a dataset, includes:
[0125] Labels are drawn for ultrasound images of several biological tissues to obtain label images corresponding to ultrasound images of several biological tissues;
[0126] The ultrasound images and corresponding labeled images of each biological tissue are merged to obtain several pairs of images, which are then used as a dataset.
[0127] The dataset is divided into a training set and a test set according to a preset ratio. The training set is used to train the generative adversarial network model, and the test set is used to detect the accuracy of the prediction results of the generative adversarial network model.
[0128] The generative adversarial network model includes a generator network and a discriminator network.
[0129] The generator network is composed of a UNet network with skip connections, and the discriminator network is composed of a PatchGAN network.
[0130] The step of training the generative adversarial network model based on the dataset and calculating the first total loss function specifically includes:
[0131] Randomly select pairs of images from the dataset, use the ultrasound image in the pair as the input image and the label image as the real image, input the ultrasound image into the generative adversarial network model for calculation, and obtain the generated image generated by the generator network and the output image generated by the discriminator network.
[0132] Calculate the adversarial loss function and the L1 loss function based on the input image, the real image, the generated image, and the output image:
[0133]
[0134] in, Let G represent the adversarial loss function, D represent the generator network, x represent the input image, y represent the output image, z represent random noise, D(·) represent the probability, and E represent the expectation of the probability.
[0135]
[0136] in, Let ||·||1 represent the L1 loss function, and let ||·||1 represent the L1 norm.
[0137] Using a pre-trained feature extraction network as a feature extractor, the generated image and the real image are respectively input into the feature extraction network to calculate the feature loss function:
[0138]
[0139] Among them, L perceptual (G) represents the feature loss function, φ represents the feature extraction network, G(x) i ) represents the generated image, y i Represents the actual image, ||·|| 2 denoted as squared Euclidean distance, and N represents the number of samples in the dataset.
[0140] The adversarial loss function, the L1 loss function, and the feature loss function are fused to obtain the first total loss function:
[0141]
[0142] Where λ, μ, and v are the weights of different loss functions, respectively.
[0143] Specifically, when the first total loss function reaches the first convergence condition, the calculation of the first gradient and the second gradient includes:
[0144] When the first total loss function reaches the preset first convergence condition, the first change gradient of the biological tissue parameters in consecutive frames is calculated.
[0145] The exogenous signal of the biological tissue in the corresponding time series is obtained, and the second change gradient of the exogenous signal in consecutive frames is calculated.
[0146] Specifically, the step of calculating the external loss function based on the first gradient change and the second gradient change, and adding the external loss function to the first total loss function to obtain the second total loss function, includes:
[0147] The external loss function is calculated based on the first gradient change and the second gradient change: L es =Δθ - Δd;
[0148] Among them, L es Let represent the external loss function, Δθ represent the first gradient change, and Δd represent the second gradient change;
[0149] The external loss function is added to the first total loss function to obtain the second total loss function:
[0150] The step of continuing to train the generative adversarial network model until the second total loss function reaches the second convergence condition to obtain the target network model specifically includes:
[0151] Continue training the generative adversarial network model and calculate the second total loss function;
[0152] If the second total loss function meets the second convergence condition, then the optimal parameters of the generator network are calculated:
[0153] in, Indicates that The generator network parameters when the expectation of G is minimized and the expectation of D is maximized.
[0154] The generative adversarial network model is optimized based on the optimal parameters of the generator network to obtain the target network model.
[0155] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a biological tissue parameter inference program, which, when executed by a processor, implements the steps of the biological tissue parameter inference method as described above.
[0156] In summary, this invention provides a method and related equipment for inferring biological tissue parameters. The method includes: acquiring ultrasound images of biological tissues as a dataset; training a generative adversarial network (GAN) model based on the dataset and calculating a first total loss function; when the first total loss function reaches a first convergence condition, calculating a first gradient and a second gradient; calculating an exogenous loss function based on the first and second gradients, adding the exogenous loss function to the first total loss function to obtain a second total loss function, and continuing to train the GAN model until the second total loss function reaches a second convergence condition to obtain a target network model; the target network model is used to output biological tissue images that are smoother in the time dimension. This invention, by introducing exogenous signals to guide the generative network generation, makes the changes in skeletal muscle structural parameters of the generated images smoother in time, which can effectively improve the accuracy of biological tissue parameter inference.
[0157] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.
[0158] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0159] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A method for inferring biological tissue parameters, characterized in that, The biological tissue parameter inference method includes: Acquire ultrasound images of biological tissues, create labels for the ultrasound images of the biological tissues to obtain labeled images, and use the ultrasound images and the labeled images as a dataset; The generative adversarial network model is trained based on the dataset, and a first total loss function is calculated. When the first total loss function reaches a first convergence condition, a first change gradient and a second change gradient are calculated. The external loss function is calculated based on the first change gradient and the second change gradient. The external loss function is added to the first total loss function to obtain the second total loss function. The generative adversarial network model is then trained until the second total loss function reaches the second convergence condition, at which point the target network model is obtained. Select a target biological tissue, acquire an ultrasound image of the target biological tissue to be processed, input the ultrasound image to be processed into the target network model, output the target ultrasound image of the target biological tissue, and obtain the target biological tissue parameters smoothed in the time dimension based on the target ultrasound image; The step of training the generative adversarial network model based on the dataset and calculating the first total loss function specifically includes: Randomly select pairs of images from the dataset, use the ultrasound image in the pair as the input image and the label image as the real image, input the ultrasound image into the generative adversarial network model for calculation, and obtain the generated image generated by the generator network and the output image generated by the discriminator network. Calculate the adversarial loss function and the L1 loss function based on the input image, the real image, the generated image, and the output image: ; in, Represents the adversarial loss function. Represents a generator network. This represents the discriminator network. Indicates the input image. Indicates the output image. Indicates random noise. Represents probability. This represents the expected value of the probability. This indicates that the generator network processes the input image. and random noise The output; ; in, Describes the L1 loss function. Represents the L1 norm; Using a pre-trained feature extraction network as a feature extractor, the generated image and the real image are respectively input into the feature extraction network to calculate the feature loss function: ; in, Represents the feature loss function, This refers to the feature extraction network. This refers to the generated image. This represents the actual image. represents the squared Euclidean distance, and N represents the number of samples in the dataset; The adversarial loss function, the L1 loss function, and the feature loss function are fused to obtain the first total loss function: ; in, These are the weights for different loss functions; When the first total loss function reaches the first convergence condition, the first gradient and the second gradient are calculated, specifically including: When the first total loss function reaches the preset first convergence condition, the first change gradient of the biological tissue parameters in consecutive frames is calculated. The exogenous signal of the biological tissue in the corresponding time series is obtained, and the second change gradient of the exogenous signal in consecutive frames is calculated. The step of calculating the external loss function based on the first gradient change and the second gradient change, and adding the external loss function to the first total loss function to obtain the second total loss function, specifically includes: The external loss function is calculated based on the first gradient change and the second gradient change: ; in, Represents the external loss function. This represents the first gradient change. This represents the second gradient of change; The external loss function is added to the first total loss function to obtain the second total loss function: 。 2. The biological tissue parameter inference method according to claim 1, characterized in that, The process of creating labels for the ultrasound images of the biological tissue to obtain labeled images, and using the ultrasound images and the labeled images as a dataset, specifically includes: Labels are drawn for ultrasound images of several biological tissues to obtain label images corresponding to ultrasound images of several biological tissues; The ultrasound image and the corresponding labeled image of each biological tissue were merged to obtain several pairs of images, and these pairs of images were used as a dataset. The dataset is divided into a training set and a test set according to a preset ratio. The training set is used to train the generative adversarial network model, and the test set is used to detect the accuracy of the prediction results of the generative adversarial network model.
3. The biological tissue parameter inference method according to claim 2, characterized in that, The generative adversarial network model includes a generator network and a discriminator network; The generator network is composed of a UNet network with skip connections, and the discriminator network is composed of a PatchGAN network.
4. The biological tissue parameter inference method according to claim 1, characterized in that, The process of continuing to train the generative adversarial network model until the second total loss function reaches the second convergence condition yields the target network model, specifically including: Continue training the generative adversarial network model and calculate the second total loss function; If the second total loss function meets the second convergence condition, then the optimal parameters of the generator network are calculated: ; in, Indicates that middle The minimum expectation, The generator network parameters that maximize the expected value; The generative adversarial network model is optimized based on the optimal parameters of the generator network to obtain the target network model.
5. A biological tissue parameter inference system, characterized in that, The biological tissue parameter reasoning system is used to implement the biological tissue parameter reasoning method according to any one of claims 1-4, and the biological tissue parameter reasoning system includes: The training data acquisition module is used to acquire ultrasound images of biological tissues, create labels for the ultrasound images of the biological tissues to obtain labeled images, and use the ultrasound images and the labeled images as a dataset. The first model training module is used to train the generative adversarial network model according to the dataset and calculate the first total loss function. When the first total loss function reaches the first convergence condition, the first change gradient and the second change gradient are calculated. The second model training module is used to calculate the external loss function based on the first change gradient and the second change gradient, add the external loss function to the first total loss function to obtain the second total loss function, and continue to train the generative adversarial network model until the second total loss function reaches the second convergence condition to obtain the target network model. The target model application module is used to select a target biological tissue, acquire the ultrasound image of the target biological tissue to be processed, input the ultrasound image to be processed into the target network model, output the target ultrasound image of the target biological tissue, and obtain the target biological tissue parameters smoothed in the time dimension based on the target ultrasound image.
6. A terminal, characterized in that, The terminal includes: a memory, a processor, and a biological tissue parameter reasoning program stored in the memory and executable on the processor, wherein when the biological tissue parameter reasoning program is executed by the processor, it implements the steps of the biological tissue parameter reasoning method as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a biological tissue parameter inference program, which, when executed by a processor, implements the steps of the biological tissue parameter inference method as described in any one of claims 1-4.