[go: up one dir, main page]

CN110136067A - A real-time image generation method for super-resolution B-ultrasound images - Google Patents

A real-time image generation method for super-resolution B-ultrasound images Download PDF

Info

Publication number
CN110136067A
CN110136067A CN201910443786.7A CN201910443786A CN110136067A CN 110136067 A CN110136067 A CN 110136067A CN 201910443786 A CN201910443786 A CN 201910443786A CN 110136067 A CN110136067 A CN 110136067A
Authority
CN
China
Prior art keywords
network
resolution
super
loss
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910443786.7A
Other languages
Chinese (zh)
Other versions
CN110136067B (en
Inventor
陈涛
黄艳峰
刘冠秀
张丽
刘骥宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Noble Medical Imaging Diagnosis Center Co ltd
Original Assignee
Shangqiu Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shangqiu Normal University filed Critical Shangqiu Normal University
Priority to CN201910443786.7A priority Critical patent/CN110136067B/en
Publication of CN110136067A publication Critical patent/CN110136067A/en
Application granted granted Critical
Publication of CN110136067B publication Critical patent/CN110136067B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4053Scaling of whole images or parts thereof, e.g. expanding or contracting based on super-resolution, i.e. the output image resolution being higher than the sensor resolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10132Ultrasound image

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Image Analysis (AREA)
  • Ultra Sonic Daignosis Equipment (AREA)

Abstract

本发明公开了一种针对超分辨率B超影像的实时影像生成方法,针对B超实时影像生成过程中清晰度有待提高的问题。步骤如下:建立基于MSE的loss函数;准备两种loss用于不同阶段:使用交叉熵loss对黑白影像的灰度进行二分类,初始化网络内部特征和注意力参数,使用MSE作为后阶段细化结果的loss函数;根据深度卷积神经网络核心block构建该神经网络;使用block结构进行堆叠得到深度卷积网络,生成静态图;使用Adam优化器对步骤b中交叉熵loss初始化,待loss下降速率降低为接近平坦时,终止训练,更改loss为MSE loss,细化产生足够的推理结果提高PSNR;将权重导出,使用静态图,集成并运行在医疗设备中。本发明可以单帧输入单帧输出,得到优于手工设计图像增强算法的结果。

The invention discloses a real-time image generation method for super-resolution B-ultrasound images, aiming at the problem that the definition needs to be improved in the process of B-ultrasound real-time image generation. The steps are as follows: establish a loss function based on MSE; prepare two kinds of losses for different stages: use cross entropy loss to classify the gray level of black and white images, initialize the internal features and attention parameters of the network, and use MSE as the refinement result of the later stage build the neural network according to the core block of the deep convolutional neural network; use the block structure to stack to obtain the deep convolutional network to generate a static image; use the Adam optimizer to initialize the cross entropy loss in step b, and wait for the loss rate to decrease. When it is close to flat, the training is terminated, the loss is changed to MSE loss, and the refinement produces enough inference results to improve PSNR; the weights are exported, using static graphs, integrated and run in medical equipment. The invention can input a single frame and output a single frame, and obtain a result better than that of a hand-designed image enhancement algorithm.

Description

一种针对超分辨率B超影像的实时影像生成方法A real-time image generation method for super-resolution B-ultrasound images

技术领域technical field

本发明涉及医疗设备的图像处理方法,特别是涉及一种针对超分辨率B超影像的实时影像生成方法。The invention relates to an image processing method for medical equipment, in particular to a real-time image generation method for super-resolution B-ultrasound images.

背景技术Background technique

B超影像是一种信噪比较低的图像信号,为了实现更高的信噪比,更锐利,更多信息量的图像,除了 提高设备本身采样率之外,还可以通过图像处理手段进行性能的提升。超分辨率能够显著降低设备的A/D 电路性能及精度需求,从而依赖图像处理弥补硬件的不足。典型的超分辨率手段是基于整合时域信息,即 将连续变化B-Mode影像视为视频流,通过多帧合成技术获得更清晰的图像。基于此方法会直接造成影像 结果有较大的延迟,因为最新帧需要前若干帧提供信息。多帧方法一方面导致计算量较大,无法在效果和 计算负担中取得平衡;另一方面多帧合成技术需要图像序列近乎静止才能整合背景和前景数据,这变相地 提高了设备帧率需求,失去了技术的实用性。B-mode ultrasound image is an image signal with a low signal-to-noise ratio. In order to achieve a higher signal-to-noise ratio, sharper, and more informative images, in addition to increasing the sampling rate of the device itself, it can also be processed by image processing methods. Performance improvements. Super-resolution can significantly reduce the device's A/D circuit performance and accuracy requirements, thereby relying on image processing to make up for hardware deficiencies. Typical super-resolution methods are based on integrating temporal information, that is, treating continuously changing B-Mode images as video streams, and obtaining clearer images through multi-frame synthesis technology. Based on this method, it will directly cause a large delay in the image results, because the latest frame needs to provide information from the previous frames. On the one hand, the multi-frame method leads to a large amount of calculation, and it is impossible to achieve a balance between the effect and the computational burden; on the other hand, the multi-frame synthesis technology requires the image sequence to be almost static to integrate the background and foreground data, which disguisedly increases the frame rate requirements of the device. The usefulness of the technology is lost.

Mode影像的超分辨率技术矛盾主要归于:难以获得多张静止图像,多帧的实时性和设备性能呈正相 关;多帧超分辨率的延迟较大,不适合观察。本发明提出一种实时的单帧超分辨率系统的实施方法,对解 决上述矛盾具有很强的现实意义。The technical contradiction of super-resolution of Mode images is mainly due to: it is difficult to obtain multiple still images, and the real-time performance of multiple frames is positively correlated with the performance of the device; the delay of multi-frame super-resolution is large, which is not suitable for observation. The present invention proposes a real-time single-frame super-resolution system implementation method, which has strong practical significance for solving the above-mentioned contradictions.

发明内容SUMMARY OF THE INVENTION

本发明克服了现有技术中B超实时影像生成过程中清晰度有待提高的问题,提供一种实时的单帧超 分辨率的针对超分辨率B超影像的实时影像生成方法。The invention overcomes the problem that the clarity needs to be improved in the B-ultrasound real-time image generation process in the prior art, and provides a real-time single-frame super-resolution real-time image generation method for super-resolution B-mode ultrasound images.

本发明的技术解决方案是,提供一种具有以下步骤的针对超分辨率B超影像的实时影像生成方法:利 用单帧生成超分辨率B-Mode图像的深度神经网络结构及其训练方法,包含以下步骤:The technical solution of the present invention is to provide a real-time image generation method for super-resolution B-mode images with the following steps: using a single frame to generate a deep neural network structure and a training method for super-resolution B-Mode images, comprising: The following steps:

步骤a、使用B超设备显示器的单帧数据作为原始数据的输入,同时使用多帧超分辨率增强的图像, 两者成为一对,重复本步骤,得到用于训练本发明的神经网络的数据集;Step a, use the single-frame data of the B-ultrasound equipment display as the input of the original data, use the image of multi-frame super-resolution enhancement simultaneously, the two become a pair, repeat this step, and obtain the data for training the neural network of the present invention set;

步骤b、准备两种loss用于不同阶段:使用交叉熵loss对黑白影像的灰度进行二分类,初始化网络 内部特征和注意力参数,使用MSE作为后阶段细化结果的loss函数;Step b. Prepare two kinds of losses for different stages: use cross-entropy loss to classify the grayscale of black and white images, initialize the internal features and attention parameters of the network, and use MSE as the loss function of the refinement result in the later stage;

步骤c、建立深度卷积网络的block结构,产生block的静态图,构建网络整体;Step c, establish the block structure of the deep convolutional network, generate the static map of the block, and construct the whole network;

步骤d、使用block结构进行堆叠得到深度卷积网络,生成整个网络的静态图;Step d. Use the block structure to stack to obtain a deep convolutional network, and generate a static image of the entire network;

步骤e、使用Adam优化器对步骤b中交叉熵loss初始化,待loss下降速率降低为接近平坦时,终止 训练,更改loss为MSE loss,进行后续的超分辨率细化,直至产生足够的推理结果提高PSNR;Step e. Use the Adam optimizer to initialize the cross-entropy loss in step b. When the loss decline rate is reduced to nearly flat, terminate the training, change the loss to MSE loss, and perform subsequent super-resolution refinement until sufficient inference results are generated. Improve PSNR;

步骤f、将上述网络权重导出,使用上述网络的静态图,集成并运行在医疗设备中,只进行前向传播。Step f, derive the above network weights, use the static graph of the above network, integrate and run in the medical equipment, and only perform forward propagation.

所述步骤a在运行和采集样本过程中,直接使用B超设备的显示器输出图像作为原始图像的数据, 同时使用高分辨率的模式或使用基于多帧超分辨率的图像增强软件得到图像的增强结果,两者构成用于的 神经网络的数据集。In the process of running and collecting samples in the step a, directly use the display output image of the B-ultrasound device as the data of the original image, and simultaneously use the high-resolution mode or use the image enhancement software based on multi-frame super-resolution to obtain the enhancement of the image. As a result, both constitute the dataset for the neural network used.

所述步骤b中建立的loss函数对网络前向传播得到的二维矩阵进行计算,得到loss值作为优化器 的反向传播,使用平均方差和交叉熵的评估方法,使用Adam优化器时先使用交叉熵loss对网络参数初始 化,区分亮度和隐含的空间特征,再采用MSE loss进行图像细节生成的训练;The loss function established in the step b calculates the two-dimensional matrix obtained by the forward propagation of the network, and obtains the loss value as the back propagation of the optimizer. The cross entropy loss initializes the network parameters, distinguishes brightness and implicit spatial features, and then uses MSE loss to train image detail generation;

两种loss的公式如下:为MSE loss,其中,(i,j)是像素的 行列位置,为交叉熵loss,将像素视为一维序列,p为真值,p为输入的 超分辨率图像,q为推理结果。The formulas of the two losses are as follows: is the MSE loss, where (i, j) is the row and column position of the pixel, For the cross-entropy loss, the pixels are regarded as a one-dimensional sequence, p is the true value, p is the input super-resolution image, and q is the inference result.

所述步骤c中选用Block内部结构为神经网络中逐层的连接进行配置,网络Block分为常规特征提 取、下采样和上采样三种,该配置生成网络的静态图,然后将block按照堆叠方式进行配置,构成整个网 络的静态图。In the step c, the internal structure of the block is selected to configure the layer-by-layer connection in the neural network. The network block is divided into three types: conventional feature extraction, downsampling and upsampling. This configuration generates a static map of the network, and then the blocks are stacked in a stacking manner Configure it to form a static map of the entire network.

所述步骤d中深度卷积神经网络核心block为单入单出的端到端深度卷积神经网络的模块封装,为 深度卷积神经网络的子网络,其输入输出的数据是N*C*H*W的四维张量,其中N为输入的三维张量C*H*W 的个数,构成的网络是定义网络的静态图。In the step d, the core block of the deep convolutional neural network is a single-input single-output end-to-end deep convolutional neural network module package, which is a sub-network of the deep convolutional neural network, and the input and output data is N*C* A four-dimensional tensor of H*W, where N is the number of input three-dimensional tensors C*H*W, and the formed network is a static graph that defines the network.

所述步骤e中使用两种loss函数和基于梯度下降搜索的优化器,根据不同的阶段,先使用交叉熵 loss,再使用MSE loss,优化器进行迭代次数有限的计算,终止条件为loss下降至0.05—0.04,其中步 骤a-e得到提高输入图像PSNR的深度卷积神经网络的权重。In the step e, two kinds of loss functions and an optimizer based on gradient descent search are used. According to different stages, the cross entropy loss is used first, and then the MSE loss is used. 0.05—0.04, where steps a-e get the weights of the deep convolutional neural network that improves the PSNR of the input image.

所述步骤f中经过训练的深度神经网络存储所有神经网络参数,将其导出,并结合步骤d所构建的 静态图,运行在计算设备中,同时计算设备按照步骤a的方法将显示器输出的图像作为网络的输入,进而 在一台机器中集成边缘计算的单元,直接依靠单帧数据得到PSNR更高的图像,即超分辨率图像。The deep neural network trained in the step f stores all the neural network parameters, exports them, and combines the static graph constructed in step d to run in the computing device, and the computing device converts the image output from the display according to the method in step a. As the input of the network, the edge computing unit is integrated in a machine, and the image with higher PSNR, that is, the super-resolution image, is directly obtained by relying on the single frame data.

与现有技术相比,本发明针对超分辨率B超影像的实时影像生成方法具有以下优点:本发明提供了 一种针对B超影像超分辨率的的实时超分辨率影像生成方法,基于该方法的计算模组可以作为超声波成像 设备的组件,适用于信号质量较低的便携式设备以提高信噪比或用于普通设备的性能提升。本发明基于机 器学习,需要事先准备样本及其标注,提出一种便捷的方式直接获取标注数据,简化了数据准备流程。提 出的深度卷积神经网络用于快速生成超分辨率的B-Mode图像,生成了较原图有更高PSNR的图像。Compared with the prior art, the present invention has the following advantages for the real-time image generation method for super-resolution B-ultrasound images: the present invention provides a real-time super-resolution image generation method for B-ultrasound image super-resolution, based on the The computing module of the method can be used as a component of an ultrasonic imaging device, and is suitable for portable devices with low signal quality to improve the signal-to-noise ratio or to improve the performance of common devices. Based on machine learning, the present invention needs to prepare samples and their labels in advance, and proposes a convenient way to directly obtain label data, which simplifies the data preparation process. The proposed deep convolutional neural network is used to quickly generate super-resolution B-Mode images, generating images with higher PSNR than the original.

本发明中深卷积度神经网络的良好性能在于可以单帧输入单帧输出,得到优于手工设计图像增强算 法的结果。由于深度神经网络的计算量较固定且卷积指令并行化能够达到十分高的效率。因此能实现本地 计算,并形成一个软硬件系统。The good performance of the deep convolutional neural network in the present invention is that it can input a single frame and output a single frame, and obtain a result that is better than a hand-designed image enhancement algorithm. Because the computational complexity of deep neural networks is relatively fixed and the parallelization of convolution instructions can achieve very high efficiency. Therefore, local computing can be realized and a software and hardware system can be formed.

附图说明Description of drawings

图1是本发明针对超分辨率B超影像的实时影像生成方法与传统时域超分辨率方法的区别示意图;Fig. 1 is the difference schematic diagram of the present invention for the real-time image generation method of super-resolution B ultrasound image and traditional time-domain super-resolution method;

图2是本发明针对超分辨率B超影像的实时影像生成方法和B超机输出影像的关系示意图;Fig. 2 is the relational schematic diagram of the present invention for the real-time image generation method of super-resolution B-ultrasound image and the output image of B-ultrasound machine;

图3是本发明针对超分辨率B超影像的实时影像生成方法的对输入的图像进行前向传播计算的示意 图;Fig. 3 is the schematic diagram that the present invention carries out forward propagation calculation to the inputted image of the real-time image generation method for super-resolution B ultrasound images;

图4是本发明针对超分辨率B超影像的实时影像生成方法深度卷积神经网络Block中常规特征提取 Block440的内部实现过程示意图;4 is a schematic diagram of the internal implementation process of the conventional feature extraction Block440 in the deep convolutional neural network Block of the real-time image generation method for super-resolution B-ultrasound images of the present invention;

图5是本发明针对超分辨率B超影像的实时影像生成方法深度卷积神经网络Block中下采样Block441 的内部实现过程示意图;5 is a schematic diagram of the internal implementation process of downsampling Block441 in the deep convolutional neural network Block of the real-time image generation method for super-resolution B-ultrasound images of the present invention;

图6是本发明针对超分辨率B超影像的实时影像生成方法深度卷积神经网络Block中上采样Block442 的内部实现过程示意图;6 is a schematic diagram of the internal implementation process of upsampling Block442 in the deep convolutional neural network Block of the real-time image generation method for super-resolution B-mode ultrasound images of the present invention;

图7是本发明针对超分辨率B超影像的实时影像生成方法中实时超分辨率深度卷积神经网络400的 内部实现过程示意图;Fig. 7 is the internal realization process schematic diagram of real-time super-resolution deep convolutional neural network 400 in the real-time image generation method for super-resolution B-mode ultrasound images of the present invention;

图8是本发明针对超分辨率B超影像的实时影像生成方法中原始输入图像得到超分辨率图像的流程 示意图。8 is a schematic flow chart of the present invention for obtaining a super-resolution image from an original input image in a real-time image generation method for super-resolution B-mode ultrasound images.

具体实施方式Detailed ways

下面结合附图和具体实施方式对本发明针对超分辨率B超影像的实时影像生成方法作进一步说明: 利用单帧生成超分辨率B-Mode图像的深度神经网络结构及其训练方法,包含以下步骤:The real-time image generation method for super-resolution B-mode images of the present invention will be further described below in conjunction with the accompanying drawings and specific embodiments: A deep neural network structure and training method for generating super-resolution B-mode images using a single frame, including the following steps :

步骤a、使用B超设备显示器的单帧数据作为原始数据的输入,同时使用多帧超分辨率增强的图像, 两者成为一对,重复本步骤,得到用于训练本发明的神经网络的数据集;Step a, use the single-frame data of the B-ultrasound equipment display as the input of the original data, use the image of multi-frame super-resolution enhancement simultaneously, the two become a pair, repeat this step, and obtain the data for training the neural network of the present invention set;

步骤b、准备两种loss用于不同阶段:使用交叉熵loss对黑白影像的灰度进行二分类,初始化网络 内部特征和注意力参数,使用MSE作为后阶段细化结果的loss函数;Step b. Prepare two kinds of losses for different stages: use cross-entropy loss to classify the grayscale of black and white images, initialize the internal features and attention parameters of the network, and use MSE as the loss function of the refinement result in the later stage;

步骤c、建立深度卷积网络的block结构,产生block的静态图,构建网络整体;Step c, establish the block structure of the deep convolutional network, generate the static map of the block, and construct the whole network;

步骤d、使用block结构进行堆叠得到深度卷积网络,生成整个网络的静态图;Step d. Use the block structure to stack to obtain a deep convolutional network, and generate a static image of the entire network;

步骤e、使用Adam优化器对步骤b中交叉熵loss初始化,待loss下降速率降低为接近平坦时,终止 训练,更改loss为MSE loss,进行后续的超分辨率细化,直至产生足够的推理结果提高PSNR;Step e. Use the Adam optimizer to initialize the cross-entropy loss in step b. When the loss decline rate is reduced to nearly flat, terminate the training, change the loss to MSE loss, and perform subsequent super-resolution refinement until sufficient inference results are generated. Improve PSNR;

步骤f、将上述网络权重导出,使用上述网络的静态图,集成并运行在医疗设备中,只进行前向传播。Step f, derive the above network weights, use the static graph of the above network, integrate and run in the medical equipment, and only perform forward propagation.

所述步骤a在运行和采集样本过程中,直接使用B超设备的显示器输出图像作为原始图像的数据, 同时使用高分辨率的模式或使用基于多帧超分辨率的图像增强软件得到图像的增强结果,两者构成用于的 神经网络的数据集。In the process of running and collecting samples in the step a, directly use the display output image of the B-ultrasound device as the data of the original image, and simultaneously use the high-resolution mode or use the image enhancement software based on multi-frame super-resolution to obtain the enhancement of the image. As a result, both constitute the dataset for the neural network used.

所述步骤b中建立的loss函数对网络前向传播得到的二维矩阵进行计算,得到loss值作为优化器 的反向传播,使用平均方差和交叉熵的评估方法,使用Adam优化器时先使用交叉熵loss对网络参数初始 化,区分亮度和隐含的空间特征,再采用MSE loss进行图像细节生成的训练;The loss function established in the step b calculates the two-dimensional matrix obtained by the forward propagation of the network, and obtains the loss value as the back propagation of the optimizer. The cross entropy loss initializes the network parameters, distinguishes brightness and implicit spatial features, and then uses MSE loss to train image detail generation;

两种loss的公式如下:为MSE loss,其中,(i,j)是像素的 行列位置,为交叉熵loss,将像素视为一维序列,p为真值,p为输入的 超分辨率图像,q为推理结果。The formulas of the two losses are as follows: is the MSE loss, where (i, j) is the row and column position of the pixel, For the cross-entropy loss, the pixels are regarded as a one-dimensional sequence, p is the true value, p is the input super-resolution image, and q is the inference result.

所述步骤c中选用Block内部结构为神经网络中逐层的连接进行配置,网络Block分为常规特征提 取、下采样和上采样三种,该配置生成网络的静态图,然后将block按照堆叠方式进行配置,构成整个网 络的静态图。In the step c, the internal structure of the block is selected to configure the layer-by-layer connection in the neural network. The network block is divided into three types: conventional feature extraction, downsampling and upsampling. This configuration generates a static map of the network, and then the blocks are stacked in a stacking manner Configure it to form a static map of the entire network.

所述步骤d中深度卷积神经网络核心block为单入单出的端到端深度卷积神经网络的模块封装,为 深度卷积神经网络的子网络,其输入输出的数据是N*C*H*W的四维张量,其中N为输入的三维张量C*H*W 的个数,构成的网络是定义网络的静态图。In the step d, the core block of the deep convolutional neural network is a single-input single-output end-to-end deep convolutional neural network module package, which is a sub-network of the deep convolutional neural network, and the input and output data is N*C* A four-dimensional tensor of H*W, where N is the number of input three-dimensional tensors C*H*W, and the formed network is a static graph that defines the network.

所述步骤e中使用两种loss函数和基于梯度下降搜索的优化器,根据不同的阶段,先使用交叉熵 loss,再使用MSE loss,优化器进行迭代次数有限的计算,终止条件为loss下降至0.05—0.04,其中步 骤a-e得到提高输入图像PSNR的深度卷积神经网络的权重。In the step e, two kinds of loss functions and an optimizer based on gradient descent search are used. According to different stages, the cross entropy loss is used first, and then the MSE loss is used. 0.05—0.04, where steps a-e get the weights of the deep convolutional neural network that improves the PSNR of the input image.

所述步骤f中经过训练的深度神经网络存储所有神经网络参数,将其导出,并结合步骤d所构建的 静态图,运行在计算设备中,同时计算设备按照步骤a的方法将显示器输出的图像作为网络的输入,进而 在一台机器中集成边缘计算的单元,直接依靠单帧数据得到PSNR更高的图像,即超分辨率图像。The deep neural network trained in the step f stores all the neural network parameters, exports them, and combines the static graph constructed in step d to run in the computing device, and the computing device converts the image output from the display according to the method in step a. As the input of the network, the edge computing unit is integrated in a machine, and the image with higher PSNR, that is, the super-resolution image, is directly obtained by relying on the single frame data.

本实施例的具体实现过程如下,提供一种用于B超影像超分辨率的深度神经网络边缘计算系统,是 一种用于本地实时处理B-Mode影像的计算模块,使用了深度卷积神经网络克服传统超分辨率或建模方法 依赖时域信息的缺点,与传统时域超分辨率方法的区别如图1所示。The specific implementation process of this embodiment is as follows, providing a deep neural network edge computing system for B-ultrasound image super-resolution, which is a computing module for local real-time processing of B-Mode images, using a deep convolutional neural network The network overcomes the shortcomings of traditional super-resolution or modeling methods that rely on temporal information, and the difference from traditional temporal super-resolution methods is shown in Figure 1.

基于此,针对现存设备更换成本高、后处理流程繁琐的问题,同时提出了一种实时的影像后处理系 统和训练方法。为实现该系统,详细的实施方案如下:为了与时域超分辨率方法区分开来,图1直观地呈 现了两者的不同之处。原始影像101经过n个帧F0~Fn的信息收集后,经过时域方法的处理得到超分辨率 图像102,为了得到与最新帧Fn相关的最新的时域超分辨率图像102耗时为:客观存在的F0~Fn的帧采集时 间:T(F0~Fn),和后处理时间TpBased on this, a real-time image post-processing system and training method are proposed to solve the problems of high replacement cost of existing equipment and cumbersome post-processing procedures. To realize the system, the detailed implementation is as follows: In order to distinguish from the temporal super-resolution method, Fig. 1 visually presents the difference between the two. After the original image 101 is collected from n frames F 0 -F n , the super-resolution image 102 is obtained by processing the time-domain method. In order to obtain the latest time-domain super-resolution image 102 related to the latest frame F n , it takes time. are: the frame acquisition time of objectively existing F 0 -F n : T(F 0 -F n ), and the post-processing time T p .

本发明中的超分辨率时间由于不依赖先前的帧信息,因此耗时为:客观存在的F0帧采集时间:T(F0), 和后处理时间Tp。超分辨率图像102和103的区别在于使用了多帧还是单帧。Since the super-resolution time in the present invention does not depend on the previous frame information, the time consumption is: the objectively existing F 0 frame acquisition time: T(F 0 ), and the post-processing time T p . The difference between super-resolution images 102 and 103 is whether multiple or single frames are used.

为了更方便地将本系统附加在已有B超机上工作,可采用直接对B超机输出的影像进行后处理。如 图2所示,获得输入图像101的方法有很多等效替代形式,在此只列出了一种无需改造原有硬件即可获取 图像的推荐实施例。In order to more conveniently attach the system to the existing B-ultrasound machine, the images output by the B-ultrasound machine can be directly post-processed. As shown in Fig. 2, there are many equivalent alternatives for the method of obtaining the input image 101, and only a recommended embodiment for obtaining the image without modifying the original hardware is listed here.

系统硬件由信号采集模块202,计算单元301,影像输出单元构成,信号采集模块202可以用于直接 采集显示器输出的图像信号201。一种推荐的实施例为:使用一种HDMI信号采模块连接至B超机的显示器 接口,得到B超机的输出画面,然后进行感兴趣区域裁剪,如图2中201~202所示。将得到的图像101传 输至计算单元301,最终得到超分辨率的图像信号103。The system hardware consists of a signal acquisition module 202, a calculation unit 301, and an image output unit. The signal acquisition module 202 can be used to directly acquire the image signal 201 output by the display. A recommended embodiment is: use an HDMI signal acquisition module to connect to the display interface of the ultrasound machine, obtain the output picture of the ultrasound machine, and then cut the region of interest, as shown in 201 to 202 in Figure 2. The obtained image 101 is transmitted to the computing unit 301, and finally a super-resolution image signal 103 is obtained.

其中计算单元是一种计算机,用于装载深度神经网络中间表达数据,如权重302和网络结构303,并 对输入的图像101进行前向传播的计算,最终得到超分辨率图像103,如图3所示。计算单元作为硬件系 统的一种实现,其使用本发明的深度卷积神经网络完成超分辨率计算,以下将着重阐述其内部深度卷积神 经网络的Graph450,Block440~442及其训练数据的准备方法。深度卷积神经网络的内部实现如图4-图7 所示。The computing unit is a kind of computer, which is used to load the intermediate expression data of the deep neural network, such as the weight 302 and the network structure 303, and perform forward propagation calculation on the input image 101, and finally obtain the super-resolution image 103, as shown in FIG. 3 shown. As a realization of the hardware system, the computing unit uses the deep convolutional neural network of the present invention to complete super-resolution calculation. The following will focus on explaining the Graph450, Block440-442 of its internal deep convolutional neural network, and the preparation method of its training data. . The internal implementation of the deep convolutional neural network is shown in Figures 4-7.

计算单元内的深度卷积神经网络实现分为Block的设计(440,441,442)和Graph的配置450。The deep convolutional neural network implementation in the computing unit is divided into the design of Block (440, 441, 442) and the configuration of Graph 450.

Block如图4-图7所示,其自身为一种单入单出的端到端结构,Block是作为深度神经网络的一种端 到端深度卷积神经网络的模块封装,是一种子网络,在block中使用通道注意力旁路提高网络效率。其输 入输出的数据是一种N*C*H*W的四维张量,N为输入的三维张量C*H*W个数,对于推理过程,N在网 络任意处严格为1,对于训练过程,N为非0的正整数,且N在网络任意处严格等于训练的批量(Batch) 大小。C表示Block输入/输出的通道数,C为非0正整数,根据Blcok的属性,输入和输出的通道数C不 一定相等。H及W定义了二维张量的高和宽,即行列个数。As shown in Figure 4-7, Block itself is an end-to-end structure with a single input and a single output. Block is a module encapsulation of an end-to-end deep convolutional neural network as a deep neural network, and is a sub-network , using channel attention bypass in the block to improve network efficiency. The input and output data is a N*C*H*W four-dimensional tensor, and N is the number of input three-dimensional tensors C*H*W. For the inference process, N is strictly 1 anywhere in the network. For training process, N is a non-zero positive integer, and N is strictly equal to the training batch size anywhere in the network. C represents the number of input/output channels of the block, and C is a non-zero positive integer. According to the properties of Blcok, the number of input and output channels C is not necessarily equal. H and W define the height and width of the two-dimensional tensor, that is, the number of rows and columns.

为了简明地描述发明中的深度卷积神经网络内部的结构及工作原理,同时考虑到N描述的是该网络 的任务批量大小,N可为任意的非零自然数,因此以下关于张量的描述皆不考虑N的数量。In order to briefly describe the internal structure and working principle of the deep convolutional neural network in the invention, and considering that N describes the task batch size of the network, N can be any non-zero natural number, so the following descriptions about tensors are all The number of N is not considered.

网络Block分为常规特征提取440、下采样441和上采样442三种。其中常规特征提取的Block使用 了基于特征全局强度的通道注意力机制,即对每个通道求得均值,输入至小型的全连接网络中进行权重增 益的识别,网络通道强度的分布模式代表了输入任务的不同,注意力机制能够提高不同任务下的网络资源 利用率和表达能力。激活函数为sigmoid:因此,通道的强度在无法收敛的情况下不影 响网络性能,在收敛的情况下能极大提高通道利用率,即在单层中不但能够根据金字塔特征提高表现能力, 还能够根据识别输入的特征强度的通道分布显式地令优化器将不同通道资源分配到不同任务中。The network block is divided into three types: conventional feature extraction 440 , down-sampling 441 and up-sampling 442 . Among them, the block of conventional feature extraction uses the channel attention mechanism based on the global strength of the feature, that is, the average value of each channel is obtained, and the weight gain is identified in a small fully connected network. The distribution pattern of the network channel strength represents the input Different tasks, attention mechanism can improve the utilization of network resources and expressive ability under different tasks. The activation function is sigmoid: Therefore, the strength of the channel does not affect the network performance in the case of failure to converge, and the channel utilization can be greatly improved in the case of convergence, that is, in a single layer, not only can the performance be improved according to the pyramid features, but also can be identified according to the input features. The channel distribution of intensity explicitly causes the optimizer to allocate different channel resources to different tasks.

为了方便描述,先对Block440~442中401~410这些关键操作进行解释:为了方便下面的描述并避免 重复描述,首先要说明的是,K为卷积核边长,以下的卷积核形状均为正方形,允许边长为1,即1*1卷 积。In order to facilitate the description, the key operations 401 to 410 in Block 440 to 442 are explained first: In order to facilitate the following description and avoid repeated descriptions, it should be noted first that K is the edge length of the convolution kernel, and the following convolution kernel shapes are all It is a square, allowing the side length to be 1, that is, 1*1 convolution.

所有卷积操作的Padding参数以卷积后不改变H和W为准,说明如下,这样,每个边的 Sizepadding=(K-1)。卷积操作是滑动窗口进行的,这里Padding的作用是保证卷积计算后张量大小 不会“缩小一圈”。The Padding parameters of all convolution operations are based on the fact that H and W are not changed after convolution, as described below. In this way, Size padding = (K-1) for each edge. The convolution operation is performed by a sliding window, and the function of Padding here is to ensure that the size of the tensor will not "shrink a circle" after the convolution calculation.

Padding操作一般是进行补0填充,但也可以拷贝相邻边的数据,甚至以最外边为对称轴进行镜像填 充,由于其多变性,本实施例中在此不做填充形式的要求。The Padding operation is generally to fill with 0s, but the data of adjacent sides can also be copied, and even the outermost edge is used as the symmetry axis to perform mirror padding. Due to its variability, this embodiment does not require a padding form.

401是Block的输入张量,张量406是张量401经过操作405后所得到的张量进行点乘计算404所得 到的。401 is the input tensor of Block, and tensor 406 is obtained by performing dot multiplication calculation 404 on the tensor obtained by tensor 401 after operation 405.

Block中402操作是一种全局平均池化操作(Global Average Pooling),将C*H*W的张量按通道取 全局平均(GAP)。The 402 operation in the block is a global average pooling operation (Global Average Pooling), which takes the C*H*W tensors by channel to take the global average (GAP).

对第通道进行GAP的求和公式为:输出张量408和412的异同在于,408是网络 的中间变量,412可以是网络的中间变量,也可以是网络的最终输出。408和412的形状都是需要根据Blcok 中张量实际大小进行设置的。right The summation formula for channel GAP is: The difference between the output tensors 408 and 412 is that 408 is an intermediate variable of the network, and 412 can be an intermediate variable of the network or the final output of the network. The shapes of 408 and 412 need to be set according to the actual size of the tensor in Blcok.

下面将对不同的Blcok进行解释:如图4中Block440所示,440为一组(Block)卷积神经网络,用 途是多尺度深度提取特征,其规模和配置为:输入和输出张量大小相同,为C*H*W。The different Blcoks will be explained below: as shown in Block 440 in Figure 4, 440 is a group of (Block) convolutional neural networks, which are used for multi-scale depth extraction of features, and their scale and configuration are: the input and output tensors are the same size , which is C*H*W.

输入张量401通过两个路径计算得到张量406。使用操作402、403得到一组大小为C的标量,通过 404对406进行按通道C的点乘。406通过411,412,413,414操作得到四个张量。四个张量通过407以 通道维度合并为输出张量408。The input tensor 401 is computed through two paths to obtain a tensor 406. A set of scalars of size C is obtained using operations 402, 403, and 404 is used to perform a channel-C dot product on 406. 406 obtains four tensors through 411, 412, 413, and 414 operations. The four tensors are merged into an output tensor 408 in the channel dimension via 407 .

需要详细解释的是,405是1*1卷积,用于将401内部C个二维张量通过线性组合得到C/4个同大小 的二维张量,形成大小为的张量406。It needs to be explained in detail that 405 is a 1*1 convolution, which is used to linearly combine C two-dimensional tensors inside 401 to obtain C/4 two-dimensional tensors of the same size, forming a size of tensor 406.

上面已经提到,对于较为浅层的网络,为了增强Block的表达能力,使用一种显式表达方式402,403 和404使Blcok能够根据不同通道的特征强度在前向传播过程中动态调节特征强度,即:对输入的特征401 的各通道响应强度进行识别,对406按通道进行动态的权重补偿和抑制。子网络403的规模设置如下,子 网络403是一组三层全连接网络,第一层和第三层大小为C,第二次是隐含层,大小为C*4。As mentioned above, for relatively shallow networks, in order to enhance the expression ability of Block, an explicit expression 402, 403 and 404 is used to enable Blcok to dynamically adjust the feature strength in the forward propagation process according to the feature strength of different channels. , that is: identify the response intensity of each channel of the input feature 401 , and perform dynamic weight compensation and suppression for 406 by channel. The scale of the sub-network 403 is set as follows, the sub-network 403 is a group of three-layer fully connected networks, the size of the first layer and the third layer is C, and the second is the hidden layer, and the size is C*4.

411、412、413、414操作是广义的分组卷积操作,推荐的组(Group)大小为是深度可分离卷积, 特殊情况下也可为是典型的分组卷积。卷积操作的卷积核参数可训练,图4-图7中各卷积操作都为可 训练的操作,以下不再赘述。其配置如下:411的卷积核(Kernel)大小K为7,即7*7大小的二维矩阵, 下文不再赘述,输出通道个数与输入通道个数相同,推荐的组(Group)大小为C/4。Operations 411, 412, 413, and 414 are generalized grouping convolution operations. The recommended group size is is a depthwise separable convolution, or in special cases is a typical grouped convolution. The convolution kernel parameters of the convolution operation can be trained. Each convolution operation in Figure 4-Figure 7 is a trainable operation, which will not be repeated below. Its configuration is as follows: the size K of the convolution kernel (Kernel) of 411 is 7, that is, a two-dimensional matrix of size 7*7, which will not be repeated below, the number of output channels is the same as the number of input channels, and the recommended group size is C/4.

412的卷积核(Kernel)大小K为3,输出通道个数与输入通道个数相同,推荐的组(Group)大小 为操作为扩张卷积,也称带孔卷积,其等效于一种筛状的采样结构,所采样的像素为3*3个。R为扩 张率,对于小分辨率的输入,R为1,即滑窗采样时不跳过像素。该参数可以根据实际情况确定,如R=2, 则412的卷积核等效于大小7*7的窗口,但仍采样3*3个像素,采样时跳过1个像素。若卷积核中的参与 采样像素值为1,跳过的值为0,则R=2时二维的表示为:The size of the convolution kernel (Kernel) of 412 is 3, and the number of output channels is the same as the number of input channels. The recommended group size is The operation is dilated convolution, also known as hole convolution, which is equivalent to a sieve-like sampling structure, and the number of pixels sampled is 3*3. R is the dilation rate. For small resolution input, R is 1, that is, no pixels are skipped during sliding window sampling. This parameter can be determined according to the actual situation. For example, if R=2, the convolution kernel of 412 is equivalent to a window with a size of 7*7, but 3*3 pixels are still sampled, and 1 pixel is skipped during sampling. If the value of participating sampling pixels in the convolution kernel is 1 and the value of skipping is 0, the two-dimensional representation when R=2 is:

413的卷积核(Kernel)大小K为5,输出通道个数与输入通道个数相同,操作为分组卷积,推荐的 组(Group)大小为414的卷积核(Kernel)大小K为3,输出通道个数与输入通道个数相同,操作为 分组卷积,推荐的组(Group)大小为 The convolution kernel size K of 413 is 5, the number of output channels is the same as the number of input channels, and the operation is grouped convolution. The recommended group size is The convolution kernel size K of 414 is 3, the number of output channels is the same as the number of input channels, and the operation is grouped convolution. The recommended group size is

通过411,412,413,414操作,一共得到了4个大小为的张量。Through 411, 412, 413, 414 operations, a total of 4 sizes are obtained tensor.

在此定义407操作,合并(concatenate)是指多个张量在某一维度上按顺序排列,并作为新的张量 的操作。在此,该维度是通道维度。为了方便理解,一种形象的表示为:以411为例,得到的是个H*W 的二维张量,把二维张量垒起来,即为411输出的大小为C*H*W的张量。407的操作是在411的基础上, 将412的张量继续“垒”到411上。所“垒”的维度就是通道维度。以此类推,407将411,412,413, 414的张量按通道合并成大小为C*H*W的张量408。Here, the operation 407 is defined, and concatenate refers to the operation of arranging multiple tensors in order in a certain dimension and using them as a new tensor. Here, the dimension is the channel dimension. In order to facilitate understanding, an image is expressed as: taking 411 as an example, what is obtained is A two-dimensional tensor of H*W, and the two-dimensional tensors are stacked, that is, a tensor of size C*H*W output by 411. The operation of 407 is to continue to "base" the tensor of 412 to 411 on the basis of 411. The dimension of the "base" is the channel dimension. And so on, 407 merges the tensors of 411, 412, 413, 414 into a tensor 408 of size C*H*W by channel.

407的操作在以下均为相同逻辑,在图4-图7的表示上也相同,故不再赘述。为了避免重复表述, 以下用到的401,407,408概念请参阅上述信息。The operation of 407 has the same logic in the following, and is also the same in the representation of FIG. 4 to FIG. 7 , so it will not be repeated. In order to avoid repetition, please refer to the above information for the concepts of 401, 407, and 408 used below.

Block440是穿插于网络中的特征提取结构,能够有效提高网络表达能力,是本发明的重要思想,同 样地,该思想也体现在Block441中。Block440 is a feature extraction structure interspersed in the network, which can effectively improve the network expression ability and is an important idea of the present invention. Similarly, this idea is also embodied in Block441.

如图5中Block441所示:441为一组(Block)卷积神经网络,用途是下采样并提取特征,其规模和 配置为:输入张量401大小为C*H*W;输出张量408大小为 As shown in Block 441 in Figure 5: 441 is a group of (Block) convolutional neural networks, the purpose is to downsample and extract features, and its scale and configuration are: the input tensor 401 has a size of C*H*W; the output tensor 408 size is

401通过一个路径409计算。409所得到的张量分别通过415,416,417,418操作得到四个张量。401 is computed through a path 409. The tensors obtained by 409 are obtained through 415, 416, 417, and 418 operations to obtain four tensors.

四个张量通过407以通道维度合并为输出张量408。409的操作是卷积核(Kernel)大小K为3,输 出通道个数与输入通道个数相同,步长(Stride)为2,操作为常规卷积,组(Group)大小为1,即不再 分组计算。409通过滑动3*3的卷积核来提取特征,因为步长(Stride)为2,由于步长不连续,跳跃了 Stride-1个像素,滑窗是在HW维度进行的,因此所以得到的张量大小为409所得的张量分别通 过以下操作得到四个张量:415、416、417、418操作是广义的分组卷积操作,推荐的组(Group)大小为 C,是深度可分离卷积,特殊情况下也可为是典型的分组卷积。The four tensors are merged into the output tensor 408 with the channel dimension through 407. The operation of 409 is that the convolution kernel (Kernel) size K is 3, the number of output channels is the same as the number of input channels, the stride (Stride) is 2, The operation is conventional convolution, and the group size is 1, that is, no grouping is calculated. 409 extracts features by sliding a 3*3 convolution kernel, because the stride is 2, and because the stride is discontinuous, the stride is skipped by 1 pixel, and the sliding window is performed in the HW dimension, so the obtained Tensor size is The tensors obtained by 409 obtain four tensors through the following operations: Operations 415, 416, 417, and 418 are generalized grouping convolution operations. The recommended group size is C, which is a depthwise separable convolution. Special cases below can also be is a typical grouped convolution.

415的卷积核(Kernel)大小K为7,输出通道个数与输入通道个数相同,推荐的组(Group)大小 为C。The convolution kernel size K of 415 is 7, the number of output channels is the same as the number of input channels, and the recommended group size is C.

416的卷积核(Kernel)大小K为3,输出通道个数与输入通道个数相同,推荐的组(Group)大小 为操作为扩张卷积。扩张卷积的定义请参见对412的相关描述。The size of the convolution kernel (Kernel) of 416 is 3, and the number of output channels is the same as the number of input channels. The recommended group size is The operation is dilated convolution. For the definition of dilated convolution, please refer to the relevant description of 412.

441是下采样的过程,如果输入到441的张量401(H,W)过大,建议R=2或R=3,则416的卷积核 等效于大小7*7或15*15的窗口,但仍采样3*3个像素,采样时跳过1或3个像素。441 is the process of downsampling. If the tensor 401 (H, W) input to 441 is too large, it is recommended that R=2 or R=3, then the convolution kernel of 416 is equivalent to a size of 7*7 or 15*15 window, but still sample 3*3 pixels, skip 1 or 3 pixels when sampling.

若卷积核中的参与采样像素值为1,跳过的值为0,则R=2时二维的表示为:If the participating sampling pixel value in the convolution kernel is 1 and the skip value is 0, the two-dimensional representation when R=2 is:

R=2或R=3时,能够获得较大或极大的窗口(7*7或15*15),即感受野,方便高效捕捉大范围内的空 域特征。442是在网络的前段,大感受野在网络的前段较为重要。442还包含了415,417,418这种小感 受野的卷积,结合416的大感受野信息,张量410能够在442中同时感知多尺度的特征,这种特征对后面 的深度特征提取较为重要,通过441和440的这种多尺度设计,能够有效地降低网络深度。When R=2 or R=3, a larger or extremely large window (7*7 or 15*15) can be obtained, that is, the receptive field, which is convenient and efficient to capture airspace features in a large range. 442 is in the front part of the network, and the large receptive field is more important in the front part of the network. 442 also includes the convolution of small receptive fields such as 415, 417, and 418. Combined with the large receptive field information of 416, tensor 410 can perceive multi-scale features in 442 at the same time. Importantly, through this multi-scale design of 441 and 440, the network depth can be effectively reduced.

440和441的多尺度的设计能够扩展网络的表达能力,同时采用粒度很细的分组卷积或深度可分离卷 积,这种设计能在提高计算效率的同时还能保证精度和网络的表达能力。The multi-scale design of 440 and 441 can expand the expressive ability of the network, and at the same time use very fine-grained grouped convolution or depthwise separable convolution, this design can improve the computational efficiency while ensuring the accuracy and the expressive ability of the network. .

442是朴素上采样网络,得益于前段的丰富特征和420的多尺度表达能力,442只需要上采样即可在 网络后段得到较丰富的信息。若要提高PSNR或用于其他用途,可以替换成基于反卷积的结构,442仅作为 一种完整网络的实施例,网络后段上采样可以是多样化的,上采样的方法不在本发明保护范围内。442 is a naive upsampling network. Benefiting from the rich features in the front section and the multi-scale expression ability of 420, 442 only needs upsampling to get richer information in the back section of the network. If you want to improve PSNR or use it for other purposes, you can replace it with a structure based on deconvolution. 442 is only an example of a complete network. The upsampling in the back section of the network can be diversified, and the upsampling method is not protected by the present invention. within the range.

如图6中Block442所示:442为一组(Block)卷积神经网络,用途是上采样并合并特征,其规模和 配置为:输入张量401大小为C*H*W;输出张量412大小为 As shown in Block 442 in Figure 6: 442 is a group of (Block) convolutional neural networks, the purpose is to upsample and merge features, and its scale and configuration are: the input tensor 401 has a size of C*H*W; the output tensor 412 size is

401通过一个路径410计算。401 is computed through a path 410.

410是一种朴素的Bicubic上采样和1*1卷积合并的操作,同时在上采样前结合了1*1卷积来对输入 张量401进行线性组合,得到的张量412。410 is a simple operation of Bicubic upsampling and 1*1 convolution merging. At the same time, 1*1 convolution is combined before upsampling to linearly combine the input tensor 401 to obtain tensor 412.

412在最终输出是的通道数为1,为了克服412的上采样模糊,可以在网络输出结果上进行简单的边 缘增强算法提高PSNR,由于边缘增强算法过于多样,边缘增强算法不在本发明保护范围内。The number of channels in the final output of 412 is 1. In order to overcome the upsampling blur of 412, a simple edge enhancement algorithm can be performed on the network output result to improve PSNR. Because the edge enhancement algorithm is too diverse, the edge enhancement algorithm is not within the protection scope of the present invention. .

如图7中CNN400所示,网络的总体结构是沙漏型的,方向自左到右,输入的图像是单通道的。其中 每个Block中所示的参数含义如下:以第一个441C4为例,441是图5中所示Block441的结构,C4是输 出通道数为4。以中间440C256*20为例,440是图4中所示Block440的结构,C256是输出通道数为256, *20是表示该结构串联20个。以此类推,网络末端442C1是图6中所示Block442的结构,C1是输出的单 通道图像。As shown in CNN400 in Figure 7, the overall structure of the network is hourglass-shaped, the direction is from left to right, and the input image is single-channel. The meaning of the parameters shown in each Block is as follows: Take the first 441C4 as an example, 441 is the structure of Block441 shown in Figure 5, and C4 is the number of output channels is 4. Take the middle 440C256*20 as an example, 440 is the structure of Block440 shown in Figure 4, C256 is the number of output channels is 256, *20 means that the structure is connected in series with 20. By analogy, the network end 442C1 is the structure of Block 442 shown in Figure 6, and C1 is the output single-channel image.

为了训练上述网络,需要提供得到训练数据的方法、Loss函数和优化器的细节。In order to train the above network, the method of obtaining the training data, the Loss function and the details of the optimizer need to be provided.

如图8所示,原始样本集501即为采集的原始输入101的集合,超分辨率样本502即为时域方法离 线得到的超分辨率图像102的集合。参见图1中对时域方法示意,101和102是成对出现的,准备多张101 重复时域方法即可整理得到原始样本集501和超分辨率样本502。参见图8和图4-图7,图8中CNN是指 图7中CNN400,即整个神经网络。参见图8,CNN载入原始样本集501中的数据,Loss函数503计算了神 经网络400进行前向传播后的结果和超分辨率样本502中对应的数据。As shown in FIG. 8 , the original sample set 501 is the set of collected original inputs 101, and the super-resolution sample 502 is the set of super-resolution images 102 obtained offline by the time domain method. Referring to the schematic diagram of the time domain method in FIG. 1 , 101 and 102 appear in pairs, and the original sample set 501 and the super-resolution sample 502 can be obtained by preparing multiple sheets of 101 and repeating the time domain method. Referring to Figure 8 and Figure 4 to Figure 7, the CNN in Figure 8 refers to the CNN400 in Figure 7, that is, the entire neural network. Referring to Fig. 8, CNN loads the data in the original sample set 501, and the Loss function 503 calculates the result of the forward propagation of the neural network 400 and the corresponding data in the super-resolution sample 502.

为了方便Loss函数的表示,将原始样本集501中选中某张图像,传入神经网络400,进行前向传播 后得到的图像称为X,并将超分辨率样本502中,与501相对应的图像称为Y。In order to facilitate the representation of the Loss function, an image in the original sample set 501 is selected, passed to the neural network 400, and the image obtained after forward propagation is called X, and in the super-resolution sample 502, the image corresponding to 501 The image is called Y.

Loss函数使用MSE(均方误差):其中,(i,j)是像素的行列 位置。The Loss function uses MSE (Mean Squared Error): where (i, j) is the row and column position of the pixel.

Loss函数一般要使用正则项防止过拟合,在此不采用Loss内的正则项,而采用Dropout方式防止过 拟合。这是考虑到网络的特殊性而设计的。The Loss function generally uses a regular term to prevent over-fitting. Here, the regular term in Loss is not used, but the Dropout method is used to prevent over-fitting. This is designed in consideration of the particularity of the network.

Dropout是对神经网络400中全部可训练的神经元使用的,细则如下:全局Dropout概率 pglobal=10%,其中,图4中403的Dropout概率p403=[0%,10%],训练时手动地根据训练过程逐渐 降低,直至floor(C*4*p403)=0。其中floor(x)是对x向下取整的操作。Dropout is used for all trainable neurons in the neural network 400. The details are as follows: the global dropout probability p global = 10%, where the dropout probability p 403 of 403 in Figure 4 = [0%, 10%], when training Manually decrease gradually according to the training process until floor(C*4*p 403 )=0. where floor(x) is an operation that rounds down x.

得益于全自动优化器的广泛使用,使用Adam方法的优化器可以避免手动调节学习率,缓解学习速率 过大导致的训练失败和学习速率过低导致的收敛时间过长的问题。本发明中采用的优化器504是Adam优 化器,一种推荐的参数为:初始化学习率为0.003,梯度更新参数beta1,2=(0.9,0.99)。Thanks to the extensive use of fully automatic optimizers, the optimizer using Adam's method can avoid manual adjustment of the learning rate, and alleviate the problems of training failure caused by too large a learning rate and too long convergence time caused by a too low learning rate. The optimizer 504 used in the present invention is the Adam optimizer, and a recommended parameter is: the initial learning rate is 0.003, and the gradient update parameter beta 1,2 =(0.9, 0.99).

训练后的CNN权重302可以通过任意能够解析并实例化CNN结构303的深度学习框架载入,并运行 在图3所示的301计算单元中,最终通过图2所示的关系形成端到端的实时超分辨率系统。The trained CNN weights 302 can be loaded by any deep learning framework that can parse and instantiate the CNN structure 303, and run in the computing unit 301 shown in Figure 3, and finally form an end-to-end real-time through the relationship shown in Figure 2. super-resolution system.

综上:本发明中提出了一种系统总架构,基于此得到一种端到端的用于超分辨率的软硬件系统。本 发明中提出了深度卷积神经网络400,用于快速生成超分辨率的B-Mode图像。本发明中提出了一种便捷的 方式直接获取标注数据502,简化了数据准备流程。To sum up: the present invention proposes an overall system architecture, based on which an end-to-end software and hardware system for super-resolution is obtained. In the present invention, a deep convolutional neural network 400 is proposed for rapidly generating super-resolution B-Mode images. The present invention proposes a convenient way to directly obtain the labeling data 502, which simplifies the data preparation process.

本发明所提供的一种针对B超影像超分辨率的实时超分辨率深度卷积神经网络400有极强的现实意 义。进一步地,结合本发明提供的训练方法、系统架构,基于本发明的计算模组可以作为超声波成像设备 的组件,适用于信号质量较低的便携式设备以提高信噪比或用于普通设备的性能提升。The real-time super-resolution deep convolutional neural network 400 for B-ultrasound image super-resolution provided by the present invention has extremely strong practical significance. Further, in combination with the training method and system architecture provided by the present invention, the computing module based on the present invention can be used as a component of an ultrasonic imaging device, and is suitable for portable devices with low signal quality to improve the signal-to-noise ratio or for the performance of common devices. promote.

虽然已经对本发明实施例进行了尽可能详尽、准确的陈述,但围绕本发明思想所改动的任何等效变 换、等效替换等和本发明类似的实施方法,均在本发明的保护范围内。Although the embodiments of the present invention have been described as detailed and accurate as possible, any equivalent transformations, equivalent replacements, etc. and similar implementation methods of the present invention modified around the idea of the present invention are all within the protection scope of the present invention.

Claims (7)

1. a kind of real-time imaging generation method for super-resolution B ultrasound image, it is characterised in that: generate super-resolution using single frames The deep neural network structure and its training method of rate B-Mode image comprising the steps of:
Step a, use the frame data of B ultrasound device display as the input of initial data, while using multiframe super-resolution The image of enhancing, the two become a pair, repeat this step, obtain the data set for training neural network of the invention;
Step b, prepare two kinds of loss and be used for different phase: carrying out two classification using gray scale of the cross entropy loss to black-and-white image, It initializes network internal feature and pays attention to force parameter, use MSE as the loss function of refinement of rear stage result;
Step c, the block structure for establishing depth convolutional network, generates the static map of block, and building network is whole;
Step d, it is stacked to obtain depth convolutional network using block structure, generates the static map of whole network;
Step e, cross entropy loss in step b is initialized using Adam optimizer, is reduced to loss fall off rate close to flat When smooth, training is terminated, change loss is MSE loss, subsequent super-resolution refinement is carried out, until generating enough reasoning knots Fruit improves PSNR;
Step f, above-mentioned network weight is exported, it is integrated and operate in Medical Devices using the static map of above-mentioned network, only into Row propagated forward.
2. the real-time imaging generation method according to claim 1 for super-resolution B ultrasound image, it is characterised in that: institute Step a is stated during operation and collecting sample, the display of B ultrasound equipment is directly used to export number of the image as original image According to, while the enhancing knot of image is obtained using high-resolution mode or using the image enhancement software based on multiframe super-resolution Fruit, the two constitute the data set for the neural network being used for.
3. the real-time imaging generation method according to claim 1 for super-resolution B ultrasound image, it is characterised in that: institute It states the two-dimensional matrix that the loss function established in step b obtains network propagated forward to calculate, obtains loss value as excellent The backpropagation for changing device first uses cross entropy when using Adam optimizer using the appraisal procedure of average variance and cross entropy Loss initializes network parameter, distinguishes brightness and implicit space characteristics, then carry out image detail generation using MSE loss Training;
The formula of two kinds of loss is as follows:For MSE loss, wherein (i, j) is The column locations of pixel,For cross entropy loss, pixel is considered as one-dimensional sequence, p is true value, p For the super-resolution image of input, q is the reasoning results.
4. the real-time imaging generation method according to claim 1 for super-resolution B ultrasound image, it is characterised in that: institute Stating and selecting Block internal structure in step c is that connection layer-by-layer in neural network is configured, and network B lock points are conventional special Sign is extracted, down-sampling and three kinds of up-sampling, the configuration generate the static map of network, then carry out block according to stack manner Configuration, constitutes the static map of whole network.
5. according to the real-time imaging generation method described in claim 1 for super-resolution B ultrasound image, it is characterised in that: described Depth convolutional neural networks core block is the module encapsulation of the end-to-end depth convolutional neural networks of single-input single-output in step d, Data for the sub-network of depth convolutional neural networks, input and output are the four dimensional tensors of N*C*H*W, and wherein N is input The number of three-dimensional tensor C*H*W, the network of composition are the static maps for defining network.
6. the real-time imaging generation method according to claim 1 for super-resolution B ultrasound image, it is characterised in that: institute It states using two kinds of loss functions and the optimizer based on gradient descent search in step e, according to the different stages, first using intersection Entropy loss reuses MSE loss, and optimizer is iterated the limited calculating of number, and termination condition is that loss drops to 0.05- 0.04, wherein step a-e is improved the weight of the depth convolutional neural networks of input picture PSNR.
7. the real-time imaging generation method according to claim 1 for super-resolution B ultrasound image, it is characterised in that: institute It states trained deep neural network in step f and stores all neural network parameters, exported, and combine step d institute structure The static map built is operated in and is calculated in equipment, at the same calculate image that equipment exports display according to the method for step a as It is higher directly to obtain PSNR by frame data for the input of network, and then the unit that integrated edge calculates in a machine Image, i.e. super-resolution image.
CN201910443786.7A 2019-05-27 2019-05-27 Real-time image generation method for super-resolution B-mode ultrasound image Active CN110136067B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910443786.7A CN110136067B (en) 2019-05-27 2019-05-27 Real-time image generation method for super-resolution B-mode ultrasound image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910443786.7A CN110136067B (en) 2019-05-27 2019-05-27 Real-time image generation method for super-resolution B-mode ultrasound image

Publications (2)

Publication Number Publication Date
CN110136067A true CN110136067A (en) 2019-08-16
CN110136067B CN110136067B (en) 2022-09-06

Family

ID=67581737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910443786.7A Active CN110136067B (en) 2019-05-27 2019-05-27 Real-time image generation method for super-resolution B-mode ultrasound image

Country Status (1)

Country Link
CN (1) CN110136067B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111260560A (en) * 2020-02-18 2020-06-09 中山大学 Multi-frame video super-resolution method fused with attention mechanism
CN112259119A (en) * 2020-10-19 2021-01-22 成都明杰科技有限公司 Music source separation method based on stacked hourglass network
CN112767252A (en) * 2021-01-26 2021-05-07 电子科技大学 Image super-resolution reconstruction method based on convolutional neural network
CN115601242A (en) * 2022-12-13 2023-01-13 电子科技大学(Cn) A lightweight image super-resolution reconstruction method suitable for hardware deployment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180075581A1 (en) * 2016-09-15 2018-03-15 Twitter, Inc. Super resolution using a generative adversarial network
CN108603922A (en) * 2015-11-29 2018-09-28 阿特瑞斯公司 Automatic cardiac volume is divided
CN109447940A (en) * 2018-08-28 2019-03-08 天津医科大学肿瘤医院 Convolutional neural networks training method, ultrasound image recognition positioning method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108603922A (en) * 2015-11-29 2018-09-28 阿特瑞斯公司 Automatic cardiac volume is divided
US20180075581A1 (en) * 2016-09-15 2018-03-15 Twitter, Inc. Super resolution using a generative adversarial network
CN109447940A (en) * 2018-08-28 2019-03-08 天津医科大学肿瘤医院 Convolutional neural networks training method, ultrasound image recognition positioning method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
卢亮等: "基于频域约束的IBP超分辨率图像复原方法", 《科学技术与工程》 *
吴清江等: "基于卷积神经网络的有限视角CT重建", 《电脑知识与技术》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111260560A (en) * 2020-02-18 2020-06-09 中山大学 Multi-frame video super-resolution method fused with attention mechanism
CN112259119A (en) * 2020-10-19 2021-01-22 成都明杰科技有限公司 Music source separation method based on stacked hourglass network
CN112767252A (en) * 2021-01-26 2021-05-07 电子科技大学 Image super-resolution reconstruction method based on convolutional neural network
CN112767252B (en) * 2021-01-26 2022-08-02 电子科技大学 An image super-resolution reconstruction method based on convolutional neural network
CN115601242A (en) * 2022-12-13 2023-01-13 电子科技大学(Cn) A lightweight image super-resolution reconstruction method suitable for hardware deployment

Also Published As

Publication number Publication date
CN110136067B (en) 2022-09-06

Similar Documents

Publication Publication Date Title
US11145061B2 (en) Image segmentation method, apparatus, and computer program to identify objects in images
Marin et al. Efficient segmentation: Learning downsampling near semantic boundaries
CN113362223B (en) Image Super-Resolution Reconstruction Method Based on Attention Mechanism and Two-Channel Network
CN110111366B (en) End-to-end optical flow estimation method based on multistage loss
CN110136067B (en) Real-time image generation method for super-resolution B-mode ultrasound image
Sun et al. Hybrid pixel-unshuffled network for lightweight image super-resolution
WO2021018163A1 (en) Neural network search method and apparatus
CN111915660B (en) Binocular disparity matching method and system based on shared features and attention up-sampling
US20220215227A1 (en) Neural Architecture Search Method, Image Processing Method And Apparatus, And Storage Medium
CN109191382A (en) Image processing method, device, electronic equipment and computer readable storage medium
CN107122826A (en) Processing method and system and storage medium for convolutional neural networks
CN111144329A (en) A lightweight and fast crowd counting method based on multi-label
CN114067153A (en) Image classification method and system based on parallel dual-attention lightweight residual network
CN112001843B (en) A deep learning-based infrared image super-resolution reconstruction method
CN112862689A (en) Image super-resolution reconstruction method and system
US20230153946A1 (en) System and Method for Image Super-Resolution
CN114581560A (en) Multi-scale neural network infrared image colorization method based on attention mechanism
Yang et al. Lightweight group convolutional network for single image super-resolution
CN111986085A (en) Image super-resolution method based on depth feedback attention network system
CN114898284B (en) Crowd counting method based on feature pyramid local difference attention mechanism
CN108765282A (en) Real-time super-resolution method and system based on FPGA
CN110866938A (en) Full-automatic video moving object segmentation method
CN116665300A (en) Skeleton Action Recognition Method Based on Spatiotemporal Adaptive Feature Fusion Graph Convolutional Network
CN112767252A (en) Image super-resolution reconstruction method based on convolutional neural network
CN110503149A (en) Method and system for classifying local features in image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20240709

Address after: No.18 hall, No.117 Liuhua Road, Yuexiu District, Guangzhou, Guangdong 510000

Patentee after: Guangdong noble medical imaging diagnosis center Co.,Ltd.

Country or region after: China

Address before: No.55 Pingyuan Middle Road, Liangyuan District, Shangqiu City, Henan Province

Patentee before: SHANGQIU NORMAL University

Country or region before: China