A three-dimensional ultrasound video stitching method and system based on adversarial generative model
By optimizing 3D ultrasound video stitching using an adversarial generative model, the image stitching artifact problem in patients with coronary heart disease and heart failure was solved, and the image quality was improved, especially the stitching effect under the condition of inconsistent cardiac cycles.
Patent Information
- Application Number
- CN202410850412.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-06-28
AI Technical Summary
In existing three-dimensional echocardiography examinations, due to irregular cardiac cycles and inconsistent cardiac motions, patients with coronary heart disease complicated by heart failure and arrhythmia may experience splicing artifacts in narrow-angle splicing mode, which affects image quality.
A three-dimensional ultrasound video stitching method based on an adversarial generative model is adopted. By constructing a generator and a spatiotemporal discriminator, smooth operation of images in the temporal and spatial domains is achieved. Combined with global homography transformation and motion compensation distortion, the image alignment process is optimized.
It effectively reduces image stitching artifacts and improves the quality of 3D echocardiography, especially the image stitching effect under inconsistent cardiac cycles.
Smart Images

Figure CN118396850B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of video image stitching, and in particular to a three-dimensional ultrasound video stitching method and system based on an adversarial generation model. Background Art
[0002] At present, echocardiography has become the main means of clinical evaluation of cardiac structure and function due to its simple operation, non-invasiveness and high repeatability. Echocardiography can be divided into two types: two-dimensional echocardiography (2DE) and three-dimensional echocardiography (3DE).
[0003] 3DE can obtain complete voxel information within a three-dimensional sector, and can display the heart morphology and structure in a three-dimensional and intuitive manner. However, due to the physical characteristics of ultrasound, 3DE still has certain limitations in clinical applications. 3DE has two acquisition methods: the first is full-volume imaging, in which the sector-shaped scanning angle uses the maximum acquisition image width to directly scan and obtain real-time 3DE, but this method results in a low temporal resolution of the image; the second acquisition method uses narrow-angle three-dimensional images of multiple cardiac cycles for stitching, and obtains high-quality spatial domain and temporal resolution through narrow-angle imaging. However, narrow-angle three-dimensional images need to be assisted by breathing and ECG gating when stitching. For patients with coronary heart disease combined with arrhythmias, heart failure, or patients who cannot hold their breath, the scanned images will have stitching artifacts, which makes it difficult to apply to real clinical scenarios. Summary of the invention
[0004] The present invention aims to solve the problem of irregular cardiac cycle, inconsistent heart movement, heart enlargement, difficulty in coordinating breathing, etc. in patients with coronary heart disease combined with heart failure, arrhythmia and other diseases, which leads to the problem of stitching artifacts when three-dimensional ultrasound acquisition is performed using narrow-angle stitching. By constructing an adversarial generative network to improve the quality of the stitched image, the stitching artifacts are effectively reduced.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] A three-dimensional ultrasound video stitching method based on an adversarial generative model comprises the following steps:
[0007] A plurality of three-dimensional ultrasound images scanned at preset angles are formed into an aligned panoramic video after performing pre-warping in the time domain and the space domain;
[0008] Inputting the panoramic video into a generative adversarial model to obtain a three-dimensional ultrasound stitching video that is consistent in time and space domains;
[0009] Among them, the adversarial generation model at least includes:
[0010] A generator configured to perform smoothing operations in the time domain and the space domain on the input panoramic video to form an initial stitched video;
[0011] The spatiotemporal discriminator is configured to evaluate the smoothed initial spliced video, output a three-dimensional ultrasound spliced video based on the evaluation result, and feed the evaluation result back to the generator to train the generator.
[0012] Furthermore, the aligned panoramic video is represented by taking images with the same scanning time as the same video frame in the time domain, and completing preliminary geometric alignment of at least two images in the same video frame in the spatial domain.
[0013] Furthermore, the step of performing preliminary geometric alignment on at least two images belonging to the same video frame in the spatial domain is:
[0014] Acquire feature points in multiple images based on scale-invariant feature transformation, and select feature points suitable for matching to obtain global homography transformation parameters using a random sample consensus algorithm, wherein the global homography transformation parameters are used to pre-distort each image and feature points in the image;
[0015] The pre-distorted image is divided into multiple grids, and the feature points on the image are preliminarily geometrically aligned according to the grid positions under constraints.
[0016] Furthermore, the global homography transformation includes the spatial domain homography transformation and the temporal domain homography transformation, and the pre-distortion of each image and the feature points in the image is expressed as:
[0017] ;
[0018] ;
[0019] in, represents the pre-distorted image in the video frame, i represents the image number, t represents the video frame number, Expressed as a global homography transformation in the spatial domain, Expressed as a global homography transformation in the time domain, Represented as the image before pre-warping in the video frame, It represents the pre-distorted feature point in the image, k represents the feature point number, Represented as feature points in the image before pre-warping.
[0020] Furthermore, the constraints are expressed as a linear combination of penalty terms in the time and space domains.
[0021] Furthermore, the generator is configured to generate an output frame through an input frame, and recursively use the previously generated output frame, and estimate the motion change of features in the previous and next frames, and perform motion compensation warping on the output frame when recursively using it.
[0022] Furthermore, the spatiotemporal discriminator includes:
[0023] an image discriminator configured to perform frame-by-frame assessment of image content with reference to a multi-slice two-dimensional echocardiogram under a resolution constraint;
[0024] The video discriminator is configured to concatenate a plurality of adjacent frames along a channel dimension to form a stitching unit, and evaluate the stitching correctness of the stitching unit under the reference of the real full volume scan panoramic video.
[0025] Further, the video discriminator is configured to receive the video frame generated by the generator and the corresponding video frame after motion compensation warping for evaluation.
[0026] The present invention also proposes a three-dimensional ultrasound video stitching system based on an adversarial generative model, comprising at least one processor and at least one memory, wherein the memory stores a computer program. When the program is executed by the processor, the processor is able to execute the above-mentioned three-dimensional ultrasound video stitching method based on the adversarial generative model.
[0027] Compared with the prior art, the present invention has at least the following beneficial effects:
[0028] (1) A video stitching method based on a generative adversarial model is proposed. When aligning images of different cardiac cycles, the consistency of the warped alignment in the temporal and spatial domains is maintained, thereby optimizing image stitching artifacts and improving the quality of the output 3DE.
[0029] (2) The real full-volume scanned panoramic video is introduced into the video discriminator to constrain the image's spatiotemporal warping and alignment. The multi-slice 2DE is introduced into the image discriminator to constrain the image resolution. The dual discriminator ensures the high quality of the generator's output video. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 is a flow chart of a video splicing method provided by an embodiment of the present invention;
[0032] Figure 2 is a structural diagram of a frame recursive generator provided by an embodiment of the present invention;
[0033] Figure 3 It is a schematic diagram of the structure of the space-time identifier provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] It should be noted that in the present invention, descriptions such as "first", "second", "one", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0035] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0036] The following are specific embodiments of the present invention, and the technical solutions of the present invention are further described in conjunction with the accompanying drawings, but the present invention is not limited to these embodiments.
[0037] In this embodiment, if Figure 1 As shown, a three-dimensional ultrasound video stitching method based on an adversarial generative model is provided, which includes the steps of:
[0038] S1, forming an aligned panoramic video by performing pre-warping in the time domain and the space domain on a plurality of three-dimensional ultrasound images scanned at preset angles;
[0039] S2. Input the panoramic video into an adversarial generative model to obtain a three-dimensional ultrasound stitching video that is consistent in the time domain and the spatial domain.
[0040] In a three-dimensional echocardiography (3DE) examination of a patient, narrow-angle three-dimensional images of multiple cardiac cycles are stitched together to form a three-dimensional echocardiography video of the patient. During the stitching process, the multiple narrow-angle three-dimensional images obtained are first aligned based on time domain pre-warping and space domain pre-warping to form a panoramic video. At this time, on the one hand, images with the same scanning time are used as the same video frame in the time domain, and on the other hand, at least two images in the same video frame are preliminarily geometrically aligned in the space domain.
[0041] Geometric alignment is the process of transforming the spatial domain position of feature points from one coordinate system to another. This includes transformations such as rotation, translation, scaling, and distortion, so that two images or data sets are aligned in the spatial domain.
[0042] Specifically, the steps for preliminary geometric alignment are:
[0043] T1. Acquire feature points in multiple images based on scale-invariant feature transformation, and select feature points suitable for matching to obtain global homography transformation parameters using a random sample consensus algorithm, wherein the global homography transformation parameters are used to pre-distort each image and feature points in the image;
[0044] T2. Divide the pre-distorted image into multiple grids, and achieve preliminary geometric alignment of feature points on the image according to the grid positions under constraints.
[0045] First, the scale-invariant feature transform (SIFT) is used to find extreme points in the spatial domain scale and extract feature points in the image. Then, the feature points suitable for matching are used to calculate the Random Sample Consensus (RANSAC) algorithm. The Random Sample Consensus algorithm can calculate the mathematical model parameters of the data based on a set of sample data sets containing abnormal data, thereby obtaining the spatial domain homography transformation parameters required for geometric alignment.
[0046] The spatial domain homography transformation can describe the position mapping relationship between the object in the world coordinate system and the pixel coordinate system.
[0047] In addition, in order to make the transformation smooth in the time domain, while adopting the spatial domain homography transformation, the time domain homography transformation is also used to act on each frame to transform the global homography.
[0048] Therefore, pre-distortion of each image and feature points in the image by spatial domain homography transformation and temporal domain homography transformation can be expressed as:
[0049] ;
[0050] ;
[0051] in, represents the pre-distorted image in the video frame, i represents the image number, t represents the video frame number, Expressed as a global homography transformation in the spatial domain, Expressed as a global homography transformation in the time domain, Represented as the image before pre-warping in the video frame, It represents the pre-distorted feature point in the image, k represents the feature point number, Represented as feature points in the image before pre-warping.
[0052] After the global homography transformation, the disparity problem between video frames needs to be solved.
[0053] Specifically, the image of each video frame is first divided into an M1×M2 grid, and the position of each grid is optimized so that the matching feature points can be better aligned, and the feature points on the image are preliminarily geometrically aligned according to the grid position through constraints.
[0054] The constraints used are linear combinations of penalty terms in the temporal and spatial domains, which are expressed as:
[0055] ;
[0056] Among them, the first three terms on the right side of the equation represent the loss of spatial domain consistency, E ds represents local arrangement, E gs Represents global arrangement, E ss represents the grid smoothing term, and the last three terms represent the loss terms in the time domain corresponding to the first three terms, ω n , n=1,2,…5 are weight coefficients.
[0057] Local alignment adjusts the local homography based on the matched feature points to avoid parallax. Global alignment is used to adjust areas without many matching feature points so that the local adjustment of these areas is more stable. Mesh smoothing is used to avoid extreme distortion.
[0058] After completing the preliminary geometric calibration, a GAN-based generative adversarial learning algorithm is needed to solve the problem of insufficient smoothness when the spatial and temporal domains are distorted. For this purpose, a generator and a spatiotemporal discriminator are introduced.
[0059] Therefore, the adversarial generation model at least includes:
[0060] A generator configured to perform smoothing operations in the temporal and spatial domains on the input panoramic video to form an initial stitched video;
[0061] The spatiotemporal discriminator is configured to evaluate the smoothed initial spliced video, output a three-dimensional ultrasound spliced video based on the evaluation result, and feed the evaluation result back to the generator to train the generator.
[0062] The generator uses a frame recursive generator, such as Figure 2As shown in , it generates an output frame from an input frame and recursively uses the previously generated output frame. The generator warps the output frame and then loops it back to the input to align it with the current input frame, which allows the network to more easily reuse previously generated details. The input video contains multiple frames, which are represented as , t is the time of each frame. Then in the generated video, each frame is represented as , t is the time of each frame.
[0063] At the same time, the motion changes of features in the previous and next frames are estimated, and the output frame is warped by motion compensation W when used recursively.
[0064] In the spatiotemporal discriminator stage, two independent discriminators are used: image discriminator and video discriminator. Their specific structures are as follows: Figure 3 As shown. Among them:
[0065] an image discriminator configured to perform frame-by-frame assessment of image content with reference to a multi-slice two-dimensional echocardiogram under a resolution constraint;
[0066] The video discriminator is configured to concatenate a plurality of adjacent frames along a channel dimension to form a stitching unit, and evaluate the stitching correctness of the stitching unit under the reference of the real full volume scan panoramic video.
[0067] The image discriminator evaluates the image content and structure frame by frame and applies resolution constraints based on multi-slice two-dimensional echocardiograms (2DE), using a ResNet-based architecture to improve the quality of individual images.
[0068] The video discriminator uses a triplet discriminator that receives three consecutive frames at once. The video discriminator concatenates multiple adjacent frames along the channel dimension, and the triplet of frames forms a basic splicing unit, which can provide the network with gradient information about the authenticity of the spatial domain structure as well as short-term temporal information.
[0069] The video discriminator architecture mainly receives two types of triplets, namely the video frames generated by the generator (g t-1 , g t , g t+1 ) and the corresponding video frame after motion compensation distortion (Wg t-1 , g t , Wg t+1 ). The corresponding video frame after motion compensation warping is obtained by warping the latter frame backward and the former frame forward.
[0070] The original frame contains complete spatiotemporal information, while the distorted frame is easier to obtain spatial domain information by aligning the content. The multi-frame concatenation mode allows the discriminator to understand the spatiotemporal data distribution, which can effectively reduce the spatiotemporal feature extraction problems encountered by the GAN network.
[0071] At the same time, a real full-volume scanned panoramic video is introduced as a reference in the video discriminator to evaluate the spatiotemporal warp alignment of images.
[0072] The discriminator outputs the evaluation result (real or fake), and in this way provides a learning signal to the generator, thereby adjusting the generation process of the video frame. After the evaluation result meets the requirements, the generator can output high-quality 3DE.
[0073] This embodiment introduces a real full-volume scan panoramic video into the video discriminator to constrain the image's spatiotemporal warping alignment, and introduces multi-slice 2DE into the image discriminator to constrain the image resolution. The dual discriminator ensures the high quality of the generator's output video, thereby reducing image stitching artifacts when aligning images of different cardiac cycles.
[0074] This embodiment also provides a three-dimensional ultrasound video stitching system based on an adversarial generative model, including at least one processor and at least one memory, wherein the memory stores a computer program. When the program is executed by the processor, the processor is able to execute the above-mentioned three-dimensional ultrasound video stitching method based on the adversarial generative model.
[0075] The video stitching system provided in this embodiment is based on a generative adversarial network to solve the problem of inconsistent alignment between the time domain and the spatial domain generated during the dynamic ultrasound stitching process of different cardiac cycles, thereby effectively improving the quality of 3DE.
[0076] The specific embodiments described herein are merely examples of the spirit of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in similar ways, but they will not deviate from the spirit of the present invention or exceed the scope defined by the appended claims.
Claims
1. A 3D ultrasound video stitching method based on adversarial generative model, It is characterized in that Includes steps: A plurality of three-dimensional ultrasound images scanned at preset angles are pre-distorted in the time domain and the space domain to form an aligned panoramic video; the aligned panoramic video is represented by taking images at the same scanning time as the same video frame in the time domain, and completing preliminary geometric alignment of at least two images in the same video frame in the space domain; Inputting the panoramic video into a generative adversarial model to obtain a three-dimensional ultrasound stitching video that is consistent in time and space domains; The steps of performing preliminary geometric alignment of at least two images belonging to the same video frame in the spatial domain are as follows: Acquire feature points in multiple images based on scale-invariant feature transformation, and select feature points suitable for matching to obtain global homography transformation parameters using a random sample consensus algorithm, wherein the global homography transformation parameters are used to pre-distort each image and feature points in the image; The pre-distorted image is divided into multiple grids, and the feature points on the image are preliminarily geometrically aligned according to the grid positions under constraints; The global homography transformation includes spatial homography transformation and temporal homography transformation. The pre-distortion of each image and the feature points in the image is expressed as: ; ; in, represents the pre-distorted image in the video frame, i represents the image number, t represents the video frame number, Expressed as a global homography transformation in space, Expressed as a global homography transformation in the time domain, Represented as the image before pre-warping in the video frame, It represents the pre-distorted feature point in the image, k represents the feature point number, Represented as feature points in the image before pre-distortion; The adversarial generation model at least includes: A generator configured to perform smoothing operations in the time domain and the space domain on the input panoramic video to form an initial stitched video; a spatiotemporal discriminator configured to evaluate the smoothed initial spliced video, output a three-dimensional ultrasound spliced video based on the evaluation result, and feed the evaluation result back to the generator to train the generator; The spatiotemporal discriminator comprises: an image discriminator configured to perform frame-by-frame assessment of image content with reference to a multi-slice two-dimensional echocardiogram under a resolution constraint; The video discriminator is configured to concatenate a plurality of adjacent frames along a channel dimension to form a stitching unit, and evaluate the stitching correctness of the stitching unit under the reference of the real full volume scan panoramic video.
2. The three-dimensional ultrasound video stitching method based on the adversarial generative model according to claim 1, It is characterized in that The constraints are expressed as a linear combination of penalty terms in the time domain and the spatial domain.
3. The three-dimensional ultrasound video stitching method based on the adversarial generative model according to claim 1, It is characterized in that The generator is configured to generate an output frame through an input frame, and recursively use the previously generated output frame, and estimate the motion change of features in the previous and next frames, and perform motion compensation warping on the output frame when recursively using it.
4. The three-dimensional ultrasound video stitching method based on the adversarial generative model according to claim 1, It is characterized in that The video discriminator is configured to receive the video frames generated by the generator and the corresponding video frames after motion compensation warping for evaluation.
5. A three-dimensional ultrasound video stitching system based on an adversarial generative model, comprising at least one processor and at least one memory, It is characterized in that The memory stores a computer program, and when the program is executed by the processor, the processor is enabled to execute the three-dimensional ultrasound video stitching method based on the adversarial generative model as described in any one of claims 1 to 4.
