WO2023123930A1 - Image processing method, system, device and readable storage medium - Google Patents

Image processing method, system, device and readable storage medium Download PDF

Info

Publication number
WO2023123930A1
WO2023123930A1 PCT/CN2022/101151 CN2022101151W WO2023123930A1 WO 2023123930 A1 WO2023123930 A1 WO 2023123930A1 CN 2022101151 W CN2022101151 W CN 2022101151W WO 2023123930 A1 WO2023123930 A1 WO 2023123930A1
Authority
WO
WIPO (PCT)
Prior art keywords
network model
short
term memory
memory network
long
Prior art date
Application number
PCT/CN2022/101151
Other languages
French (fr)
Chinese (zh)
Inventor
尹文枫
董刚
赵雅倩
梁玲燕
晁银银
Original Assignee
浪潮电子信息产业股份有限公司
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 浪潮电子信息产业股份有限公司 filed Critical 浪潮电子信息产业股份有限公司
Publication of WO2023123930A1 publication Critical patent/WO2023123930A1/en

Links

Images

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/044Recurrent networks, e.g. Hopfield 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
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/002Image coding using neural networks

Definitions

  • the present application relates to the field of image processing, in particular to an image processing method, system, device and readable storage medium.
  • the over-parameterized dividend has greatly improved the accuracy of the neural network, making deep learning widely used in machine vision fields such as multi-target tracking and image segmentation, and has developed a demand for deployment on various embedded devices or mobile platforms, but these
  • the computing and storage resources of the platform have an upper limit, which cannot support the storage and operation of neural networks with huge parameters.
  • Neural network compression technology can effectively reduce the amount of parameters and the amount of calculation during inference, and solve the deployment problem of deep learning in resource-constrained environments.
  • the pruning algorithm for Convolutional Neural Networks (CNN) has been widely used in industry, showing a variety of development trends, such as structured and unstructured pruning algorithms, inference-time pruning or training-based pruning, static pruning or dynamic pruning. Unlike CNN pruning methods, pruning methods for Recurrent Neural Networks (RNNs) have not been fully studied.
  • the present application provides an image processing method, the method comprising:
  • Image processing is performed on the input image by using the compressed long-short-term memory network model.
  • the compressed long-short-term memory network model before using the compressed long-short-term memory network model to perform image processing on the input image, it also includes:
  • the parameters of the compressed long-short-term memory network model are optimized by using the optimal weight matrix.
  • the output feature map of the weight matrix of the preset long-short-term memory network model is calculated according to the weight group, including:
  • W hl is the output weight matrix of the first layer of the preset long short-term memory network model, are the output weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively
  • W xl is the input weight matrix of the l-th layer of the preset long-short-term memory network model, are the input weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively
  • FM hl is the output feature map of the output weight matrix of the l-th layer of the preset long-short-term memory network model
  • y fh , y ih , y uh , y oh are the output feature maps of the output weight matrix of the forget gate, input gate, update gate and output gate of the preset long short-term memory network model, respectively, is the output value of the preset long-short-term memory network model at the last time step t-1
  • FM xl is
  • the compressed output feature map of the weight matrix of the compressed long-short-term memory network model is calculated according to the weight group, including:
  • the transpose matrix of is the input weight matrix after W xl compression
  • the transpose matrix of is the output value of layer l of the preset long-short-term memory network model at the last time step t-1
  • T is the total number of time steps of the input data x.
  • the optimal weight matrix of the compressed long-short-term memory network model is determined according to the output feature map and the compressed output feature map by the least squares method, including:
  • FM x(l+1) is the output feature map of the input weight matrix of the l+1th layer of the preset long-short-term memory network model
  • W x(l+1) is the first-th layer of the preset long-short-term memory network model
  • the input weight matrix of the l+1 layer is the compressed input weight matrix of W x(l+1)
  • the transpose matrix of is the input value of layer l+1 of the preset long-short-term memory network model at time step t.
  • the optimal weight matrix after optimizing the parameters of the compressed long-short-term memory network model using the optimal weight matrix, it also includes:
  • an image processing system which includes:
  • the grouping module is used to group the weight matrix of the preset long short-term memory network model according to the inherent structured sparsity to obtain the corresponding weight group;
  • the compression module is used to separately calculate the Pearson correlation coefficient of each weight group and other weight groups, and use the Pearson correlation coefficient as the sampling probability of the weight group being sampled, and randomly select the sampling probability according to the preset compression rate
  • the corresponding weight group is compressed to obtain the compressed long-short-term memory network model
  • the image processing module is used for performing image processing on the input image by using the compressed long-short-term memory network model.
  • an image processing device which includes:
  • One or more processors configured to implement the steps of the image processing method provided in any of the foregoing embodiments when executing the computer-readable instructions.
  • the present application also provides a readable storage medium, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the implementation as provided in any of the above-mentioned embodiments can be realized.
  • the steps of the image processing method are described in detail below.
  • FIG. 1 is a flowchart of an image processing method provided by one or more embodiments of the present application
  • FIG. 2 is a flowchart of another image processing method provided by one or more embodiments of the present application.
  • FIG. 3 is a structural diagram of an image processing system provided by one or more embodiments of the present application.
  • Fig. 4 is a structural diagram of an image processing device provided by one or more embodiments of the present application.
  • the core of the present application is to provide an image processing method, system, device and readable storage medium for realizing the compression of the cyclic neural network.
  • RNN pruning algorithms include amplitude-based weight pruning, or structured pruning based on Least absolute shrinkage and selection operator (LASSO) regression.
  • LASSO Least absolute shrinkage and selection operator
  • the latter uses LASSO regression regularization to achieve structured pruning of different granularities, such as block structure weight pruning based on group LASSO regularization, weight pruning based on Intrinsic Structured Sparsity (ISS) or based on Neuron pruning with LASSO regularization.
  • ISS-based pruning constructs a specific weight grouping. It is assumed that a certain layer of long short-term memory network model (Long Short-Term Memory, LSTM) has K hidden states.
  • Long Short-Term Memory Long Short-Term Memory
  • the kth hidden state (hidden state ) is identified as a useless state and needs to be pruned
  • the kth cell state (cell state) and the kth output gate that generate the kth hidden state can be deleted together. That is, the ISS group consisting of the column associated with the kth unit state in the weight matrix of the current time step, the column corresponding to the kth hidden state of the current time step, and the row corresponding to the kth hidden state of the previous time step Weights can be removed.
  • this method does not compress and prune the rows associated with the input in the weight matrix, and cannot prune the neurons of the LSTM.
  • neuron pruning based on LASSO regularization introduces two gating variables for the input and hidden states and constructs corresponding LASSO regularization constraints, and learns the value of the gating variable as the mask of the compressed weight matrix during training. Code, and then achieve neuron-level pruning.
  • the structured pruning methods based on LASSO regression all belong to pruning during training, rely on the training process to learn the compression mask, and cannot achieve flexible compression according to a given compression rate; therefore, this application provides an image processing method for Solve the above problems.
  • FIG. 1 is a flowchart of an image processing method provided by an embodiment of the present application.
  • the purpose of grouping the weight matrix is to randomly select the corresponding weight group through the sampling probability according to the preset compression rate for compression, so as to achieve pruning during reasoning of the long-short-term memory network model, and then can not rely on
  • the training directly obtains the new weights of the compressed network weight matrix by minimizing the reconstruction error of the weight matrix output, and realizes the compression of the recurrent neural network.
  • Pearson Correlation Coefficient (Pearson Correlation Coefficient) mentioned here is used to measure whether two data sets are on a line, to measure the linear relationship between fixed-distance variables, and to reflect the degree of linear correlation between two variables X and Y , the value of the Pearson correlation coefficient is between -1 and 1, and the larger the absolute value, the stronger the correlation.
  • the target weight group calculates the Pearson correlation coefficients between the target weight group and other weight groups, and use the Pearson correlation coefficient as the sampling probability of the target weight group being sampled.
  • the application randomly selects the corresponding weight group through the sampling probability to compress, and obtains the compressed long-short-term memory network model.
  • the sampled weight group can be set to 0, and the long-short time Compression of memory network models.
  • S103 Perform image processing on the input image by using the compressed long-short-term memory network model.
  • FIG. 2 is a flowchart of another image processing method provided by the embodiment of the present application.
  • S201 Calculate the output feature map of the weight matrix of the preset long-short-term memory network model according to the weight group.
  • the output feature map of the weight matrix of the preset long-short-term memory network model is calculated according to the weight group, which can be specifically implemented by performing the following steps:
  • W hl is the output weight matrix of the first layer of the preset long short-term memory network model, are the output weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively
  • W xl is the input weight matrix of the l-th layer of the preset long-short-term memory network model, are the input weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively
  • FM hl is the output feature map of the output weight matrix of the l-th layer of the preset long-short-term memory network model
  • y fh , y ih , y uh , y oh are the output feature maps of the output weight matrix of the forget gate, input gate, update gate and output gate of the preset long short-term memory network model, respectively, is the output value of the preset long-short-term memory network model at the last time step t-1
  • FM xl is
  • S202 Calculate the compressed output feature map of the weight matrix of the compressed long-short-term memory network model according to the weight group.
  • the compressed output feature map of the weight matrix of the compressed long-short-term memory network model is calculated according to the weight group, which can be specifically implemented by performing the following steps:
  • the transpose matrix of is the input weight matrix after W xl compression
  • the transpose matrix of is the output value of layer l of the preset long-short-term memory network model at the last time step t-1
  • T is the total number of time steps of the input data x.
  • S203 Determine the optimal weight matrix of the compressed long-short-term memory network model according to the output feature map and the compressed output feature map by least square method.
  • the optimal weight matrix of the compressed long-short-term memory network model is determined according to the output feature map and the compressed output feature map by the least square method, which can be specifically implemented by performing the following steps:
  • the determination of the optimal input weight matrix of the l+1th layer can also be realized by performing the following steps:
  • FM x(l+1) is the output feature map of the input weight matrix of the l+1th layer of the preset long-short-term memory network model
  • W x(l+1) is the first-th layer of the preset long-short-term memory network model
  • the input weight matrix of the l+1 layer is the compressed input weight matrix of W x(l+1)
  • the transpose matrix of is the input value of layer l+1 of the preset long-short-term memory network model at time step t.
  • the following steps can also be performed:
  • This application compresses the neurons of each hidden layer in the preset long-short-term memory network model by compressing the output weights and input weights of the neurons step by step, and the random compression process is performed layer by layer.
  • an image processing method provided by this application randomly selects the corresponding weight value group for compression according to the sampling probability determined by the Pearson correlation coefficient according to the preset compression rate, so that the application can compress according to the user-specified Compared with neuron pruning, the new weights of the compressed network weight matrix are obtained by minimizing the reconstruction error output by the weight matrix without relying on training, and then the compression of the recurrent neural network is realized.
  • FIG. 3 is a structural diagram of an image processing system provided by an embodiment of the present application.
  • the system can include:
  • the grouping module 100 is used to group the weight matrix of the preset long short-term memory network model according to the inherent structured sparsity to obtain the corresponding weight group;
  • the compression module 200 is used to separately calculate the Pearson correlation coefficient of each weight group and other weight groups, and use the Pearson correlation coefficient as the sampling probability of the weight group being sampled, and randomly pass the sampling probability according to the preset compression rate. Select the corresponding weight group for compression to obtain the compressed long-short-term memory network model;
  • the image processing module 300 is configured to use the compressed long-short-term memory network model to perform image processing on the input image.
  • the system may also include:
  • the first calculation module is used to calculate the output feature map of the weight matrix of the preset long short-term memory network model according to the weight group;
  • the second calculation module is used to calculate the compressed output feature map of the weight matrix of the compressed long short-term memory network model according to the weight group;
  • a determination module is used to determine the optimal weight matrix of the compressed long-short-term memory network model according to the output feature map and the compressed output feature map by the least squares method;
  • the optimization module is used to optimize the parameters of the compressed long-short-term memory network model by using the optimal weight matrix.
  • the first calculation module may include:
  • W hl is the output weight matrix of the first layer of the preset long short-term memory network model, are the output weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively
  • W xl is the input weight matrix of the l-th layer of the preset long-short-term memory network model, are the input weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively
  • FM hl is the output feature map of the output weight matrix of the l-th layer of the preset long-short-term memory network model
  • y fh , y ih , y uh , y oh are the output feature maps of the output weight matrix of the forget gate, input gate, update gate and output gate of the preset long short-term memory network model, respectively, is the output value of the preset long-short-term memory network model at the last time step t-1
  • FM xl is
  • the second calculation module may include:
  • the acquisition sub-module is used to obtain the output value of the l-th layer of the preset long-short-term memory network model at the previous time step t-1 and will output the value As the input value of the compressed long-short-term memory network model;
  • the first determined sub-module is used to As the compressed output feature map of the output weight matrix of the compressed long short-term memory network model, and The compressed output feature map as the input weight matrix of the compressed long short-term memory network model;
  • the transpose matrix of is the input weight matrix after W xl compression
  • the transpose matrix of is the output value of layer l of the preset long-short-term memory network model at the last time step t-1
  • T is the total number of time steps of the input data x.
  • the determining module may include:
  • the recording sub-module is used to record the number of the compressed weight group in the preset long short-term memory network model as a set ⁇ ;
  • the first extraction sub-module is used to extract the local data of the output feature map of the output weight matrix of the preset long short-term memory network model at the previous time step t-1 according to the set ⁇ and the output feature map local data of the input weight matrix
  • the second determination sub-module is used to determine according to the formula Determine the optimal output weight matrix of layer l of the compressed long-short-term memory network model
  • the third determination sub-module is used to determine according to the formula Determine the optimal input weight matrix of layer l of the compressed long short-term memory network model
  • the determining module may also include:
  • the second extraction sub-module is used to extract the weight of the corresponding row of the input weight matrix W x (l+1) of the l+1 layer of the preset long-short-term memory network model according to the set ⁇
  • the fourth determination sub-module is used to determine according to the formula Determine the optimal input weight matrix of the l+1 layer of the compressed long short-term memory network model
  • FM x(l+1) is the output feature map of the input weight matrix of the l+1th layer of the preset long-short-term memory network model
  • W x(l+1) is the first-th layer of the preset long-short-term memory network model
  • the input weight matrix of the l+1 layer is the compressed input weight matrix of W x(l+1)
  • the transpose matrix of is the input value of layer l+1 of the preset long-short-term memory network model at time step t.
  • the system may also include:
  • the retraining module is configured to perform a preset number of retrainings on the compressed long short-term memory network model in response to parameter optimization of all layers of the compressed long short-term memory network model.
  • FIG. 4 is a structural diagram of an image processing device provided by an embodiment of the present application.
  • the image processing device 400 may have relatively large differences due to different configurations or performances, and may include one or more than one processor (central processing units, CPU) 422 and memory 432, and one or more than one storage application program 442 or data 444 Storage medium 430 (such as one or more mass storage devices).
  • the memory 432 and the storage medium 430 may be temporary storage or persistent storage.
  • the program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the device.
  • the processor 422 may be configured to communicate with the storage medium 430 , and execute a series of instruction operations in the storage medium 430 on the image processing device 400 .
  • the image processing device 400 may also include one or more power sources 424, one or more wired or wireless network interfaces 450, one or more input and output interfaces 458, and/or, one or more operating systems 441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • the steps in the image processing method described above in FIG. 1 to FIG. 2 are realized by the image processing device based on the structure shown in FIG. 4 .
  • the embodiment of the present application also discloses a non-volatile computer-readable storage medium, in which computer-readable instructions are stored, and when the computer-readable instructions are loaded and executed by one or more processors, The steps in the image processing method disclosed in any of the foregoing embodiments are implemented.
  • the disclosed devices, devices and methods can be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of modules is only a logical function division. In actual implementation, there may be other division methods.
  • multiple modules or components can be combined or integrated. to another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.
  • a module described as a separate component may or may not be physically separated, and a component shown as a module may or may not be a physical module, that is, it may be located in one place, or may also be distributed to multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
  • the integrated modules are realized in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a function calling device, or a network device, etc.) execute all or part of the steps of the methods in various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Abstract

Disclosed is an image processing method. The method comprises: carrying out grouping on a weight matrix of a preset long short-term memory network model on the basis of inherent structured sparsity, obtaining corresponding weight groups; calculating the respective Pearson correlation coefficients of each weight group and the other weight groups, taking the Pearson correlation coefficient to serve as a sampling probability of a weight group being sampled, and on the basis of a preset compression ratio, by means of a sampling probability, randomly selecting a corresponding weight group to carry out compression, obtaining a compressed long short-term memory network model; performing image processing on the input image using the compressed long short-term memory network model.

Description

一种图像处理方法、系统、设备及可读存储介质Image processing method, system, device and readable storage medium
相关申请的交叉引用Cross References to Related Applications
本申请要求于2021年12月30日提交中国专利局,申请号为202111666557.5,申请名称为“一种图像处理方法、系统、设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202111666557.5 and the application name "An image processing method, system, device, and readable storage medium" submitted to the China Patent Office on December 30, 2021, and its entire content Incorporated in this application by reference.
技术领域technical field
本申请涉及图像处理领域,特别涉及一种图像处理方法、系统、设备及可读存储介质。The present application relates to the field of image processing, in particular to an image processing method, system, device and readable storage medium.
背景技术Background technique
过参数化的红利大幅度提高了神经网络的精度,使得深度学习在多目标跟踪和图像分割等机器视觉领域得到广泛应用,并发展出在各种嵌入式设备或移动平台部署的需求,但是这些平台的计算和存储资源存在上限,无法支持参数量巨大的神经网络的存储和运行。神经网络压缩技术能够有效减少参数量和推理时的计算量,解决深度学习在资源受限环境的部署难题。面向卷积神经网络(Convolutional Neural Networks,CNN)的剪枝算法得到广泛的工业应用,呈现出多种多样的发展趋势,例如结构化和非结构化的剪枝算法,推理时剪枝或基于训练的剪枝,静态剪枝或动态剪枝。与CNN剪枝方法不同,面向循环神经网络(Recurrent Neural Network,RNN)的剪枝方法尚未得到充分研究。The over-parameterized dividend has greatly improved the accuracy of the neural network, making deep learning widely used in machine vision fields such as multi-target tracking and image segmentation, and has developed a demand for deployment on various embedded devices or mobile platforms, but these The computing and storage resources of the platform have an upper limit, which cannot support the storage and operation of neural networks with huge parameters. Neural network compression technology can effectively reduce the amount of parameters and the amount of calculation during inference, and solve the deployment problem of deep learning in resource-constrained environments. The pruning algorithm for Convolutional Neural Networks (CNN) has been widely used in industry, showing a variety of development trends, such as structured and unstructured pruning algorithms, inference-time pruning or training-based pruning, static pruning or dynamic pruning. Unlike CNN pruning methods, pruning methods for Recurrent Neural Networks (RNNs) have not been fully studied.
发明人意识到,鉴于RNN与CNN在计算逻辑上存在差异,大部分CNN剪枝方法不能直接套用到RNN,增加了RNN剪枝算法的研究难度。The inventor realized that, in view of the difference in calculation logic between RNN and CNN, most CNN pruning methods cannot be directly applied to RNN, which increases the difficulty of researching RNN pruning algorithms.
发明内容Contents of the invention
为解决上述技术问题,本申请提供一种图像处理方法,该方法包括:In order to solve the above technical problems, the present application provides an image processing method, the method comprising:
依据固有结构化稀疏度对预设长短时记忆网络模型的权值矩阵进行分组,得到对应的权值组;Group the weight matrix of the preset long-short-term memory network model according to the inherent structural sparsity to obtain the corresponding weight group;
分别计算每个权值组与其他权值组的皮尔森相关系数,将皮尔森相关系数作为权值组被采样到的采样概率,并依据预设压缩率通过采样概率随机选择对应的权值组进行压缩,得到压缩后的长短时记忆网络模型;及Calculate the Pearson correlation coefficient of each weight group and other weight groups separately, use the Pearson correlation coefficient as the sampling probability of the weight group being sampled, and randomly select the corresponding weight group through the sampling probability according to the preset compression rate performing compression to obtain a compressed long-short-term memory network model; and
利用压缩后的长短时记忆网络模型对输入的图像进行图像处理。Image processing is performed on the input image by using the compressed long-short-term memory network model.
在一个实施例中,在利用压缩后的长短时记忆网络模型对输入的图像进行图像处理之前,还包括:In one embodiment, before using the compressed long-short-term memory network model to perform image processing on the input image, it also includes:
依据权值组计算预设长短时记忆网络模型的权值矩阵的输出特征图;Calculate the output feature map of the weight matrix of the preset long short-term memory network model according to the weight group;
依据权值组计算压缩后的长短时记忆网络模型的权值矩阵的压缩输出特征图;Calculate the compressed output feature map of the weight matrix of the compressed long-short-term memory network model according to the weight group;
通过最小二乘法依据输出特征图及压缩输出特征图确定压缩后的长短时记忆网络模型的最优权值矩阵;及determining the optimal weight matrix of the compressed long-short-term memory network model according to the output feature map and the compressed output feature map by the least squares method; and
利用最优权值矩阵对压缩后的长短时记忆网络模型进行参数优化。The parameters of the compressed long-short-term memory network model are optimized by using the optimal weight matrix.
在一个实施例中,依据权值组计算预设长短时记忆网络模型的权值矩阵的输出特征图,包括:In one embodiment, the output feature map of the weight matrix of the preset long-short-term memory network model is calculated according to the weight group, including:
计算预设长短时记忆网络模型的第l层在时间步t的遗忘门、输入门和输出门的激活函数的输入值以及在上一时间步t-1的输出值
Figure PCTCN2022101151-appb-000001
并确定对应的输出权值矩阵
Figure PCTCN2022101151-appb-000002
和输入权值矩阵
Figure PCTCN2022101151-appb-000003
Calculate the input value of the activation function of the forget gate, input gate and output gate of the l-th layer of the preset long-short-term memory network model at time step t, and the output value at the previous time step t-1
Figure PCTCN2022101151-appb-000001
And determine the corresponding output weight matrix
Figure PCTCN2022101151-appb-000002
and the input weight matrix
Figure PCTCN2022101151-appb-000003
and
根据公式
Figure PCTCN2022101151-appb-000004
Figure PCTCN2022101151-appb-000005
计算预设长短时记忆网络模型的权值矩阵的输出特征图;
According to the formula
Figure PCTCN2022101151-appb-000004
and
Figure PCTCN2022101151-appb-000005
Calculate the output feature map of the weight matrix of the preset long short-term memory network model;
其中,W hl为预设长短时记忆网络模型的第l层的输出权值矩阵,
Figure PCTCN2022101151-appb-000006
分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输出权值,W xl为预设长短时记忆网络模型的第 l层的输入权值矩阵,
Figure PCTCN2022101151-appb-000007
分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输入权值,FM hl为预设长短时记忆网络模型的第 l层的输出权值矩阵的输出特征图,y fh、y ih、y uh、y oh分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输出权值矩阵的输出特征图,
Figure PCTCN2022101151-appb-000008
为预设长短时记忆网络模型在上一时间步t-1的输出值,FM xl为预设长短时记忆网络模型的第l层的输入权值矩阵的输出特征图, y fx、y ix、y ux、y ox分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输入权值矩阵的输出特征图,
Figure PCTCN2022101151-appb-000009
为预设长短时记忆网络模型的第l层在时间步t的输入值。
Among them, W hl is the output weight matrix of the first layer of the preset long short-term memory network model,
Figure PCTCN2022101151-appb-000006
are the output weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively, W xl is the input weight matrix of the l-th layer of the preset long-short-term memory network model,
Figure PCTCN2022101151-appb-000007
are the input weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively, and FM hl is the output feature map of the output weight matrix of the l-th layer of the preset long-short-term memory network model, y fh , y ih , y uh , y oh are the output feature maps of the output weight matrix of the forget gate, input gate, update gate and output gate of the preset long short-term memory network model, respectively,
Figure PCTCN2022101151-appb-000008
is the output value of the preset long-short-term memory network model at the last time step t-1, FM xl is the output feature map of the input weight matrix of the l-th layer of the preset long-short-term memory network model, y fx , y ix , y ux , y ox are the output feature maps of the input weight matrix of the forget gate, input gate, update gate and output gate of the preset long short-term memory network model, respectively,
Figure PCTCN2022101151-appb-000009
is the input value of layer l of the preset long-short-term memory network model at time step t.
在一个实施例中,依据权值组计算压缩后的长短时记忆网络模型的权值矩阵的压缩输出特征图,包括:In one embodiment, the compressed output feature map of the weight matrix of the compressed long-short-term memory network model is calculated according to the weight group, including:
获取预设长短时记忆网络模型的第l层在上一时间步t-1的输出值
Figure PCTCN2022101151-appb-000010
并将输出值
Figure PCTCN2022101151-appb-000011
作为压缩后的长短时记忆网络模型的输入值;及
Obtain the output value of the l-th layer of the preset long-short-term memory network model at the previous time step t-1
Figure PCTCN2022101151-appb-000010
and will output the value
Figure PCTCN2022101151-appb-000011
as input to the compressed LSTM network model; and
Figure PCTCN2022101151-appb-000012
作为压缩后的长短时记忆网络模型的输出权值矩阵的压缩输出特征图,并将
Figure PCTCN2022101151-appb-000013
作为压缩后的长短时记忆网络模型的输入权值矩阵的压缩输出特征图;
Will
Figure PCTCN2022101151-appb-000012
As the compressed output feature map of the output weight matrix of the compressed long short-term memory network model, and
Figure PCTCN2022101151-appb-000013
The compressed output feature map as the input weight matrix of the compressed long short-term memory network model;
其中,
Figure PCTCN2022101151-appb-000014
为W hl压缩后的输出权值矩阵,
Figure PCTCN2022101151-appb-000015
Figure PCTCN2022101151-appb-000016
的转置矩阵,
Figure PCTCN2022101151-appb-000017
为W xl压缩后的输入权值矩阵,
Figure PCTCN2022101151-appb-000018
Figure PCTCN2022101151-appb-000019
的转置矩阵,
Figure PCTCN2022101151-appb-000020
为预设长短时记忆网络模型的第l层在上一时间步t-1的输出值,T为输入数据x的时间步总数。
in,
Figure PCTCN2022101151-appb-000014
is the output weight matrix after W hl compression,
Figure PCTCN2022101151-appb-000015
for
Figure PCTCN2022101151-appb-000016
The transpose matrix of
Figure PCTCN2022101151-appb-000017
is the input weight matrix after W xl compression,
Figure PCTCN2022101151-appb-000018
for
Figure PCTCN2022101151-appb-000019
The transpose matrix of
Figure PCTCN2022101151-appb-000020
is the output value of layer l of the preset long-short-term memory network model at the last time step t-1, and T is the total number of time steps of the input data x.
在一个实施例中,通过最小二乘法依据输出特征图及压缩输出特征图确定压缩后的长短时记忆网络模型的最优权值矩阵,包括:In one embodiment, the optimal weight matrix of the compressed long-short-term memory network model is determined according to the output feature map and the compressed output feature map by the least squares method, including:
将预设长短时记忆网络模型中被压缩的权值组的编号记录为集合θ;Record the number of the compressed weight group in the preset long-short-term memory network model as a set θ;
依据集合θ提取预设长短时记忆网络模型在上一时间步t-1的输出权值矩阵的输出特征图局部数据
Figure PCTCN2022101151-appb-000021
和输入权值矩阵的输出特征图局部数据
Figure PCTCN2022101151-appb-000022
According to the set θ, extract the local data of the output feature map of the output weight matrix of the preset long short-term memory network model at the previous time step t-1
Figure PCTCN2022101151-appb-000021
and the output feature map local data of the input weight matrix
Figure PCTCN2022101151-appb-000022
根据公式
Figure PCTCN2022101151-appb-000023
确定压缩后的长短时记忆网络模型的第l层的最优输出权值矩阵
Figure PCTCN2022101151-appb-000024
According to the formula
Figure PCTCN2022101151-appb-000023
Determine the optimal output weight matrix of layer l of the compressed long-short-term memory network model
Figure PCTCN2022101151-appb-000024
and
根据公式
Figure PCTCN2022101151-appb-000025
确定压缩后的长短时记忆网络模型的第l层的最优输入权值矩阵
Figure PCTCN2022101151-appb-000026
According to the formula
Figure PCTCN2022101151-appb-000025
Determine the optimal input weight matrix of layer l of the compressed long short-term memory network model
Figure PCTCN2022101151-appb-000026
其中,
Figure PCTCN2022101151-appb-000027
为F范数,
Figure PCTCN2022101151-appb-000028
为输出权值矩阵的输出特征图局部数据,
Figure PCTCN2022101151-appb-000029
为输入权值矩阵的输出特征图局部数据。
in,
Figure PCTCN2022101151-appb-000027
is the F norm,
Figure PCTCN2022101151-appb-000028
is the output feature map local data of the output weight matrix,
Figure PCTCN2022101151-appb-000029
is the output feature map local data of the input weight matrix.
在一个实施例中,还包括:In one embodiment, also includes:
依据集合θ提取预设长短时记忆网络模型的第l+1层的输入权值矩阵W x(l+1)对应行的权值
Figure PCTCN2022101151-appb-000030
According to the set θ, extract the weight of the corresponding row of the input weight matrix W x(l+1) of the l+1 layer of the preset long-short-term memory network model
Figure PCTCN2022101151-appb-000030
and
根据公式
Figure PCTCN2022101151-appb-000031
确定压缩后的长短时记忆网络模型的第l+1层的最优输入权值矩阵
Figure PCTCN2022101151-appb-000032
According to the formula
Figure PCTCN2022101151-appb-000031
Determine the optimal input weight matrix of the l+1 layer of the compressed long short-term memory network model
Figure PCTCN2022101151-appb-000032
其中,FM x(l+1)为预设长短时记忆网络模型的第l+1层的输入权值矩阵的输出特征图,W x(l+1)为预设长短时记忆网络模型的第l+1层的输入权值矩阵,
Figure PCTCN2022101151-appb-000033
为W x(l+1)压缩后的输入权值矩阵,
Figure PCTCN2022101151-appb-000034
Figure PCTCN2022101151-appb-000035
的转置矩阵,
Figure PCTCN2022101151-appb-000036
为预设长短时记忆网络模型的第l+1层在时间步t的输入值。
Among them, FM x(l+1) is the output feature map of the input weight matrix of the l+1th layer of the preset long-short-term memory network model, W x(l+1) is the first-th layer of the preset long-short-term memory network model The input weight matrix of the l+1 layer,
Figure PCTCN2022101151-appb-000033
is the compressed input weight matrix of W x(l+1) ,
Figure PCTCN2022101151-appb-000034
for
Figure PCTCN2022101151-appb-000035
The transpose matrix of
Figure PCTCN2022101151-appb-000036
is the input value of layer l+1 of the preset long-short-term memory network model at time step t.
在一个实施例中,在利用最优权值矩阵对压缩后的长短时记忆网络模型进行参数优化之后,还包括:In one embodiment, after optimizing the parameters of the compressed long-short-term memory network model using the optimal weight matrix, it also includes:
响应于压缩后的长短时记忆网络模型的所有层都完成参数优化,对压缩后的长短时记忆网络模型进行预设次数的重训练。In response to parameter optimization of all layers of the compressed long-short-term memory network model, retraining the compressed long-short-term memory network model for a preset number of times.
为解决上述技术问题,本申请还提供一种图像处理系统,该系统包括:In order to solve the above technical problems, the present application also provides an image processing system, which includes:
分组模块,用于依据固有结构化稀疏度对预设长短时记忆网络模型的权值矩阵进行分组,得到对应的权值组;The grouping module is used to group the weight matrix of the preset long short-term memory network model according to the inherent structured sparsity to obtain the corresponding weight group;
压缩模块,用于分别计算每个权值组与其他权值组的皮尔森相关系数,将皮尔森相关系数作为权值组被采样到的采样概率,并依据预设压缩率通过采样概率随机选择对应的权值组进行压缩,得到压缩后的长短时记忆网络模型;及The compression module is used to separately calculate the Pearson correlation coefficient of each weight group and other weight groups, and use the Pearson correlation coefficient as the sampling probability of the weight group being sampled, and randomly select the sampling probability according to the preset compression rate The corresponding weight group is compressed to obtain the compressed long-short-term memory network model; and
图像处理模块,用于利用压缩后的长短时记忆网络模型对输入的图像进行图像处理。The image processing module is used for performing image processing on the input image by using the compressed long-short-term memory network model.
为解决上述技术问题,本申请还提供一种图像处理设备,该图像处理设备包括:In order to solve the above technical problems, the present application also provides an image processing device, which includes:
存储器,用于存储计算机可读指令;及memory for storing computer readable instructions; and
一个或多个处理器,用于执行所述计算机可读指令时实现如上述任一实施例提供的图像处理方法的步骤。One or more processors, configured to implement the steps of the image processing method provided in any of the foregoing embodiments when executing the computer-readable instructions.
为解决上述技术问题,本申请还提供一种可读存储介质,所述可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如上述任一实施例提供的 图像处理方法的步骤。In order to solve the above-mentioned technical problems, the present application also provides a readable storage medium, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by a processor, the implementation as provided in any of the above-mentioned embodiments can be realized. The steps of the image processing method.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below. Other features and advantages of the application will be apparent from the description, drawings, and claims.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only It is an embodiment of the present application, and those skilled in the art can also obtain other drawings according to the provided drawings without creative work.
图1为本申请一个或多个实施例所提供的一种图像处理方法的流程图;FIG. 1 is a flowchart of an image processing method provided by one or more embodiments of the present application;
图2为本申请一个或多个实施例所提供的另一种图像处理方法的流程图;FIG. 2 is a flowchart of another image processing method provided by one or more embodiments of the present application;
图3为本申请一个或多个实施例所提供的一种图像处理系统的结构图;FIG. 3 is a structural diagram of an image processing system provided by one or more embodiments of the present application;
图4为本申请一个或多个实施例所提供的一种图像处理设备的结构图。Fig. 4 is a structural diagram of an image processing device provided by one or more embodiments of the present application.
具体实施方式Detailed ways
本申请的核心是提供一种图像处理方法、系统、设备及可读存储介质,用于实现循环神经网络的压缩。The core of the present application is to provide an image processing method, system, device and readable storage medium for realizing the compression of the cyclic neural network.
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the scope of protection of this application.
现有的RNN剪枝算法有基于幅度的权值剪枝,或基于最小绝对收缩和选择算子(Least absolute shrinkage and selection operator,LASSO)回归的结构化剪枝。后者利用LASSO回归正则化实现不同粒度的结构化剪枝,例如基于分组LASSO正则化的块结构权值剪枝、基于固有结构化稀疏度(Intrinsic Structured Sparsity,ISS)的权值剪枝或基于LASSO正则化的神经元剪枝。其中,基于ISS的剪枝构造了一种特定的权值分组,假设某一层长短时记忆网络模型(Long Short-Term Memory,LSTM)具有K个隐藏状态,当第k个隐藏状态(hidden state)被识别为无用状态需要被裁剪时,生成第k个隐藏状态的第k个单元状态(cell state)以及第k个输出门可以被一并删除。即当前时间步的权值矩阵中与第k个单元状态关联的列、与当前时间步第k个隐藏状态对应的列、与上一时间步第k个隐藏状态对应的行所组成的ISS分组权值均可以被移除。然而该方法未对权值矩阵 中与输入关联的行进行压缩剪枝,不能剪枝LSTM的神经元。基于LASSO正则化的神经元剪枝针对该缺陷,为输入和隐藏状态引入两个门控变量并构造相应的LASSO正则化约束项,在训练中学习门控变量的值作为压缩权值矩阵的掩码,进而实现神经元级剪枝。然而基于LASSO回归的结构化剪枝方法都属于训练时剪枝,依赖训练过程学习压缩掩码,不能依据给定的压缩率实现灵活的压缩;故本申请提供了一种图像处理方法,用于解决上述问题。Existing RNN pruning algorithms include amplitude-based weight pruning, or structured pruning based on Least absolute shrinkage and selection operator (LASSO) regression. The latter uses LASSO regression regularization to achieve structured pruning of different granularities, such as block structure weight pruning based on group LASSO regularization, weight pruning based on Intrinsic Structured Sparsity (ISS) or based on Neuron pruning with LASSO regularization. Among them, ISS-based pruning constructs a specific weight grouping. It is assumed that a certain layer of long short-term memory network model (Long Short-Term Memory, LSTM) has K hidden states. When the kth hidden state (hidden state ) is identified as a useless state and needs to be pruned, the kth cell state (cell state) and the kth output gate that generate the kth hidden state can be deleted together. That is, the ISS group consisting of the column associated with the kth unit state in the weight matrix of the current time step, the column corresponding to the kth hidden state of the current time step, and the row corresponding to the kth hidden state of the previous time step Weights can be removed. However, this method does not compress and prune the rows associated with the input in the weight matrix, and cannot prune the neurons of the LSTM. For this defect, neuron pruning based on LASSO regularization introduces two gating variables for the input and hidden states and constructs corresponding LASSO regularization constraints, and learns the value of the gating variable as the mask of the compressed weight matrix during training. Code, and then achieve neuron-level pruning. However, the structured pruning methods based on LASSO regression all belong to pruning during training, rely on the training process to learn the compression mask, and cannot achieve flexible compression according to a given compression rate; therefore, this application provides an image processing method for Solve the above problems.
请参考图1,图1为本申请实施例所提供的一种图像处理方法的流程图。Please refer to FIG. 1 , which is a flowchart of an image processing method provided by an embodiment of the present application.
其具体包括如下步骤:It specifically includes the following steps:
S101:依据固有结构化稀疏度对预设长短时记忆网络模型的权值矩阵进行分组,得到对应的权值组。S101: Group the weight matrixes of the preset long-short-term memory network model according to the inherent structured sparsity to obtain corresponding weight groups.
在本步骤中,权值矩阵进行分组的目的在于,依据预设压缩率通过采样概率随机选择对应的权值组进行压缩,以实现在长短时记忆网络模型进行推理时剪枝,进而可以不依赖训练直接通过最小化权值矩阵输出的重构误差,获得压缩后网络权值矩阵的新权值,实现了循环神经网络的压缩。In this step, the purpose of grouping the weight matrix is to randomly select the corresponding weight group through the sampling probability according to the preset compression rate for compression, so as to achieve pruning during reasoning of the long-short-term memory network model, and then can not rely on The training directly obtains the new weights of the compressed network weight matrix by minimizing the reconstruction error of the weight matrix output, and realizes the compression of the recurrent neural network.
S102:分别计算每个权值组与其他权值组的皮尔森相关系数,将皮尔森相关系数作为该权值组被采样到的采样概率,并依据预设压缩率通过采样概率随机选择对应的权值组进行压缩,得到压缩后的长短时记忆网络模型。S102: Calculate the Pearson correlation coefficient of each weight group and other weight groups respectively, use the Pearson correlation coefficient as the sampling probability of the weight group being sampled, and randomly select the corresponding weight group through the sampling probability according to the preset compression rate The weight group is compressed to obtain the compressed long-short-term memory network model.
这里提到的皮尔森相关系数(Pearson Correlation Coefficient)是用来衡量两个数据集合是否在一条线上面,来衡量定距变量间的线性关系,用来反映两个变量X和Y的线性相关程度,皮尔森相关系数值介于-1到1之间,绝对值越大表明相关性越强。The Pearson Correlation Coefficient (Pearson Correlation Coefficient) mentioned here is used to measure whether two data sets are on a line, to measure the linear relationship between fixed-distance variables, and to reflect the degree of linear correlation between two variables X and Y , the value of the Pearson correlation coefficient is between -1 and 1, and the larger the absolute value, the stronger the correlation.
以目标权值组为例,分别计算目标权值组与其他权值组的皮尔森相关系数,将皮尔森相关系数作为目标权值组被采样到的采样概率。本申请依据预设压缩率通过采样概率随机选择对应的权值组进行压缩,得到压缩后的长短时记忆网络模型,例如可以将被采样到的权值组设置为0,即可实现对长短时记忆网络模型的压缩。Taking the target weight group as an example, calculate the Pearson correlation coefficients between the target weight group and other weight groups, and use the Pearson correlation coefficient as the sampling probability of the target weight group being sampled. According to the preset compression rate, the application randomly selects the corresponding weight group through the sampling probability to compress, and obtains the compressed long-short-term memory network model. For example, the sampled weight group can be set to 0, and the long-short time Compression of memory network models.
S103:利用压缩后的长短时记忆网络模型对输入的图像进行图像处理。S103: Perform image processing on the input image by using the compressed long-short-term memory network model.
在上述实施例的基础上,在一个具体实施例中,在利用压缩后的长短时记忆网络模型对输入的图像进行图像处理之前,还可以执行图2所示的步骤实现对压缩后的长短时记忆网络模型的参数优化,下面请参考图2,图2为本申请实施例所提供的另一种图像处理方法的流程图。On the basis of the above-mentioned embodiments, in a specific embodiment, before using the compressed long-short-term memory network model to perform image processing on the input image, the steps shown in FIG. For parameter optimization of the memory network model, please refer to FIG. 2 below. FIG. 2 is a flowchart of another image processing method provided by the embodiment of the present application.
其具体包括如下步骤:It specifically includes the following steps:
S201:依据权值组计算预设长短时记忆网络模型的权值矩阵的输出特征图。S201: Calculate the output feature map of the weight matrix of the preset long-short-term memory network model according to the weight group.
在一个具体实施例中,依据权值组计算预设长短时记忆网络模型的权值矩阵的输出特征图,其具体可以通过执行如下步骤实现:In a specific embodiment, the output feature map of the weight matrix of the preset long-short-term memory network model is calculated according to the weight group, which can be specifically implemented by performing the following steps:
计算预设长短时记忆网络模型的第l层在时间步t的遗忘门、输入门和输出门的激活函数的输入值以及在上一时间步t-1的输出值
Figure PCTCN2022101151-appb-000037
并确定对应的输出权值矩阵
Figure PCTCN2022101151-appb-000038
和输入权值矩阵
Figure PCTCN2022101151-appb-000039
Calculate the input value of the activation function of the forget gate, input gate and output gate of the l-th layer of the preset long-short-term memory network model at time step t, and the output value at the previous time step t-1
Figure PCTCN2022101151-appb-000037
And determine the corresponding output weight matrix
Figure PCTCN2022101151-appb-000038
and the input weight matrix
Figure PCTCN2022101151-appb-000039
根据公式
Figure PCTCN2022101151-appb-000040
Figure PCTCN2022101151-appb-000041
计算预设长短时记忆网络模型的权值矩阵的输出特征图;
According to the formula
Figure PCTCN2022101151-appb-000040
and
Figure PCTCN2022101151-appb-000041
Calculate the output feature map of the weight matrix of the preset long short-term memory network model;
其中,W hl为预设长短时记忆网络模型的第l层的输出权值矩阵,
Figure PCTCN2022101151-appb-000042
分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输出权值,W xl为预设长短时记忆网络模型的第l层的输入权值矩阵,
Figure PCTCN2022101151-appb-000043
分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输入权值,FM hl为预设长短时记忆网络模型的第l层的输出权值矩阵的输出特征图,y fh、y ih、y uh、y oh分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输出权值矩阵的输出特征图,
Figure PCTCN2022101151-appb-000044
为预设长短时记忆网络模型在上一时间步t-1的输出值,FM xl为预设长短时记忆网络模型的第 l层的输入权值矩阵的输出特征图,y fx、y ix、y ux、y ox分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输入权值矩阵的输出特征图,
Figure PCTCN2022101151-appb-000045
为预设长短时记忆网络模型的第l层在时间步t的输入值。
Among them, W hl is the output weight matrix of the first layer of the preset long short-term memory network model,
Figure PCTCN2022101151-appb-000042
are the output weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively, W xl is the input weight matrix of the l-th layer of the preset long-short-term memory network model,
Figure PCTCN2022101151-appb-000043
are the input weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively, and FM hl is the output feature map of the output weight matrix of the l-th layer of the preset long-short-term memory network model, y fh , y ih , y uh , y oh are the output feature maps of the output weight matrix of the forget gate, input gate, update gate and output gate of the preset long short-term memory network model, respectively,
Figure PCTCN2022101151-appb-000044
is the output value of the preset long-short-term memory network model at the last time step t-1, FM xl is the output feature map of the input weight matrix of the l-th layer of the preset long-short-term memory network model, y fx , y ix , y ux , y ox are the output feature maps of the input weight matrix of the forget gate, input gate, update gate and output gate of the preset long short-term memory network model, respectively,
Figure PCTCN2022101151-appb-000045
is the input value of layer l of the preset long-short-term memory network model at time step t.
S202:依据权值组计算压缩后的长短时记忆网络模型的权值矩阵的压缩输出特征图。S202: Calculate the compressed output feature map of the weight matrix of the compressed long-short-term memory network model according to the weight group.
在一个具体实施例中,依据权值组计算压缩后的长短时记忆网络模型的权值矩阵的压缩输出特征图,其具体可以通过执行如下步骤实现:In a specific embodiment, the compressed output feature map of the weight matrix of the compressed long-short-term memory network model is calculated according to the weight group, which can be specifically implemented by performing the following steps:
获取预设长短时记忆网络模型的第l层在上一时间步t-1的输出值
Figure PCTCN2022101151-appb-000046
并将输出值
Figure PCTCN2022101151-appb-000047
作为压缩后的长短时记忆网络模型的输入值;
Obtain the output value of the l-th layer of the preset long-short-term memory network model at the previous time step t-1
Figure PCTCN2022101151-appb-000046
and will output the value
Figure PCTCN2022101151-appb-000047
As the input value of the compressed long-short-term memory network model;
Figure PCTCN2022101151-appb-000048
作为压缩后的长短时记忆网络模型的输出权值矩阵的压缩输出特征图,并将
Figure PCTCN2022101151-appb-000049
作为压缩后的长短时记忆网络模型的输入权值矩阵的压缩输出特征图;
Will
Figure PCTCN2022101151-appb-000048
As the compressed output feature map of the output weight matrix of the compressed long short-term memory network model, and
Figure PCTCN2022101151-appb-000049
The compressed output feature map as the input weight matrix of the compressed long short-term memory network model;
其中,
Figure PCTCN2022101151-appb-000050
为W hl压缩后的输出权值矩阵,
Figure PCTCN2022101151-appb-000051
Figure PCTCN2022101151-appb-000052
的转置矩阵,
Figure PCTCN2022101151-appb-000053
为W xl压缩后的输入权值矩阵,
Figure PCTCN2022101151-appb-000054
Figure PCTCN2022101151-appb-000055
的转置矩阵,
Figure PCTCN2022101151-appb-000056
为预设长短时记忆网络模型的第l层在上一时间步t-1的输出值,T为输入数据x的时间步总数。
in,
Figure PCTCN2022101151-appb-000050
is the output weight matrix after W hl compression,
Figure PCTCN2022101151-appb-000051
for
Figure PCTCN2022101151-appb-000052
The transpose matrix of
Figure PCTCN2022101151-appb-000053
is the input weight matrix after W xl compression,
Figure PCTCN2022101151-appb-000054
for
Figure PCTCN2022101151-appb-000055
The transpose matrix of
Figure PCTCN2022101151-appb-000056
is the output value of layer l of the preset long-short-term memory network model at the last time step t-1, and T is the total number of time steps of the input data x.
S203:通过最小二乘法依据输出特征图及压缩输出特征图确定压缩后的长短时记忆网络模型的最优权值矩阵。S203: Determine the optimal weight matrix of the compressed long-short-term memory network model according to the output feature map and the compressed output feature map by least square method.
在一个具体实施例中,通过最小二乘法依据输出特征图及压缩输出特征图确定压缩后的长短时记忆网络模型的最优权值矩阵,其具体可以通过执行如下步骤实现:In a specific embodiment, the optimal weight matrix of the compressed long-short-term memory network model is determined according to the output feature map and the compressed output feature map by the least square method, which can be specifically implemented by performing the following steps:
将预设长短时记忆网络模型中被压缩的权值组的编号记录为集合θ;Record the number of the compressed weight group in the preset long-short-term memory network model as a set θ;
依据集合θ提取预设长短时记忆网络模型在上一时间步t-1的输出权值矩阵的输出特征图局部数据
Figure PCTCN2022101151-appb-000057
和输入权值矩阵的输出特征图局部数据
Figure PCTCN2022101151-appb-000058
According to the set θ, extract the local data of the output feature map of the output weight matrix of the preset long short-term memory network model at the previous time step t-1
Figure PCTCN2022101151-appb-000057
and the output feature map local data of the input weight matrix
Figure PCTCN2022101151-appb-000058
根据公式
Figure PCTCN2022101151-appb-000059
确定压缩后的长短时记忆网络模型的第l层的最优输出权值矩阵
Figure PCTCN2022101151-appb-000060
According to the formula
Figure PCTCN2022101151-appb-000059
Determine the optimal output weight matrix of layer l of the compressed long-short-term memory network model
Figure PCTCN2022101151-appb-000060
根据公式
Figure PCTCN2022101151-appb-000061
确定压缩后的长短时记忆网络模型的第l层的最优输入权值矩阵
Figure PCTCN2022101151-appb-000062
According to the formula
Figure PCTCN2022101151-appb-000061
Determine the optimal input weight matrix of layer l of the compressed long short-term memory network model
Figure PCTCN2022101151-appb-000062
其中,
Figure PCTCN2022101151-appb-000063
为F范数,
Figure PCTCN2022101151-appb-000064
为输出权值矩阵的输出特征图局部数据,
Figure PCTCN2022101151-appb-000065
为输入权值矩阵的输出特征图局部数据。
in,
Figure PCTCN2022101151-appb-000063
is the F norm,
Figure PCTCN2022101151-appb-000064
is the output feature map local data of the output weight matrix,
Figure PCTCN2022101151-appb-000065
is the output feature map local data of the input weight matrix.
在上述实施例的基础上,还可以通过执行如下步骤实现对第l+1层的最优输入权值矩阵的确定:On the basis of the above-mentioned embodiments, the determination of the optimal input weight matrix of the l+1th layer can also be realized by performing the following steps:
依据集合θ提取预设长短时记忆网络模型的第l+1层的输入权值矩阵W x(l+1)对应行的权值
Figure PCTCN2022101151-appb-000066
According to the set θ, extract the weight of the corresponding row of the input weight matrix W x(l+1) of the l+1 layer of the preset long-short-term memory network model
Figure PCTCN2022101151-appb-000066
根据公式
Figure PCTCN2022101151-appb-000067
确定压缩后的长短时记忆网络模型的第l+1层的最优输入权值矩阵
Figure PCTCN2022101151-appb-000068
According to the formula
Figure PCTCN2022101151-appb-000067
Determine the optimal input weight matrix of the l+1 layer of the compressed long short-term memory network model
Figure PCTCN2022101151-appb-000068
其中,FM x(l+1)为预设长短时记忆网络模型的第l+1层的输入权值矩阵的输出特征图,W x(l+1)为预设长短时记忆网络模型的第l+1层的输入权值矩阵,
Figure PCTCN2022101151-appb-000069
为W x(l+1)压缩后的输入权值矩阵,
Figure PCTCN2022101151-appb-000070
Figure PCTCN2022101151-appb-000071
的转置矩阵,
Figure PCTCN2022101151-appb-000072
为预设长短时记忆网络模型的第l+1层在时间步t的输入值。
Among them, FM x(l+1) is the output feature map of the input weight matrix of the l+1th layer of the preset long-short-term memory network model, W x(l+1) is the first-th layer of the preset long-short-term memory network model The input weight matrix of the l+1 layer,
Figure PCTCN2022101151-appb-000069
is the compressed input weight matrix of W x(l+1) ,
Figure PCTCN2022101151-appb-000070
for
Figure PCTCN2022101151-appb-000071
The transpose matrix of
Figure PCTCN2022101151-appb-000072
is the input value of layer l+1 of the preset long-short-term memory network model at time step t.
S204:利用最优权值矩阵对压缩后的长短时记忆网络模型进行参数优化。S204: Using the optimal weight matrix to optimize parameters of the compressed long-short-term memory network model.
在一个具体实施例中,为进一步恢复压缩后长短时记忆网络模型的网络精度,在利用最优权值矩阵对压缩后的长短时记忆网络模型进行参数优化之后,还可以执行如下步骤:In a specific embodiment, in order to further restore the network accuracy of the compressed long-short-term memory network model, after using the optimal weight matrix to optimize the parameters of the compressed long-short-term memory network model, the following steps can also be performed:
响应于压缩后的长短时记忆网络模型的所有层都完成参数优化,对压缩后的长短时记忆网络模型进行预设次数的重训练。In response to parameter optimization of all layers of the compressed long-short-term memory network model, retraining the compressed long-short-term memory network model for a preset number of times.
本申请对预设长短时记忆网络模型中每个隐藏层的神经元进行压缩,通过分步压缩神经元的输出权值和输入权值来实现,其中的随机压缩流程是逐层执行的。This application compresses the neurons of each hidden layer in the preset long-short-term memory network model by compressing the output weights and input weights of the neurons step by step, and the random compression process is performed layer by layer.
基于上述技术方案,本申请所提供的一种图像处理方法,通过依据预设压缩率通过皮尔森相关系数确定的采样概率随机选择对应的权值组进行压缩,使得本申请能够根据用户指定的压缩比进行神经元剪枝,不依赖训练直接通过最小化权值矩阵输出的重构误差,获得压缩后网络权值矩阵的新权值,进而实现了循环神经网络的压缩。Based on the above technical solution, an image processing method provided by this application randomly selects the corresponding weight value group for compression according to the sampling probability determined by the Pearson correlation coefficient according to the preset compression rate, so that the application can compress according to the user-specified Compared with neuron pruning, the new weights of the compressed network weight matrix are obtained by minimizing the reconstruction error output by the weight matrix without relying on training, and then the compression of the recurrent neural network is realized.
请参考图3,图3为本申请实施例所提供的一种图像处理系统的结构图。Please refer to FIG. 3 , which is a structural diagram of an image processing system provided by an embodiment of the present application.
该系统可以包括:The system can include:
分组模块100,用于依据固有结构化稀疏度对预设长短时记忆网络模型的权值矩阵进行分组,得到对应的权值组;The grouping module 100 is used to group the weight matrix of the preset long short-term memory network model according to the inherent structured sparsity to obtain the corresponding weight group;
压缩模块200,用于分别计算每个权值组与其他权值组的皮尔森相关系数,将皮尔森相关系数作为权值组被采样到的采样概率,并依据预设压缩率通过采样概率随机选择对应的权值组进行压缩,得到压缩后的长短时记忆网络模型;The compression module 200 is used to separately calculate the Pearson correlation coefficient of each weight group and other weight groups, and use the Pearson correlation coefficient as the sampling probability of the weight group being sampled, and randomly pass the sampling probability according to the preset compression rate. Select the corresponding weight group for compression to obtain the compressed long-short-term memory network model;
图像处理模块300,用于利用压缩后的长短时记忆网络模型对输入的图像进行图像处理。The image processing module 300 is configured to use the compressed long-short-term memory network model to perform image processing on the input image.
在上述实施例的基础上,在一个具体实施例中,该系统还可以包括:On the basis of the foregoing embodiments, in a specific embodiment, the system may also include:
第一计算模块,用于依据权值组计算预设长短时记忆网络模型的权值矩阵的输出特征图;The first calculation module is used to calculate the output feature map of the weight matrix of the preset long short-term memory network model according to the weight group;
第二计算模块,用于依据权值组计算压缩后的长短时记忆网络模型的权值矩阵的压缩输出特征图;The second calculation module is used to calculate the compressed output feature map of the weight matrix of the compressed long short-term memory network model according to the weight group;
确定模块,用于通过最小二乘法依据输出特征图及压缩输出特征图确定压缩后的长短时记忆网络模型的最优权值矩阵;A determination module is used to determine the optimal weight matrix of the compressed long-short-term memory network model according to the output feature map and the compressed output feature map by the least squares method;
优化模块,用于利用最优权值矩阵对压缩后的长短时记忆网络模型进行参数优化。The optimization module is used to optimize the parameters of the compressed long-short-term memory network model by using the optimal weight matrix.
在上述实施例的基础上,在一个具体实施例中,该第一计算模块可以包括:On the basis of the foregoing embodiments, in a specific embodiment, the first calculation module may include:
计算预设长短时记忆网络模型的第l层在时间步t的遗忘门、输入门和输出门的激活函数的输入值以及在上一时间步t-1的输出值
Figure PCTCN2022101151-appb-000073
并确定对应的输出权值矩阵
Figure PCTCN2022101151-appb-000074
和输入权值矩阵
Figure PCTCN2022101151-appb-000075
Calculate the input value of the activation function of the forget gate, input gate and output gate of the l-th layer of the preset long-short-term memory network model at time step t, and the output value at the previous time step t-1
Figure PCTCN2022101151-appb-000073
And determine the corresponding output weight matrix
Figure PCTCN2022101151-appb-000074
and the input weight matrix
Figure PCTCN2022101151-appb-000075
根据公式
Figure PCTCN2022101151-appb-000076
Figure PCTCN2022101151-appb-000077
计算预设长短时记忆网络模型的权值矩阵的输出特征图;
According to the formula
Figure PCTCN2022101151-appb-000076
and
Figure PCTCN2022101151-appb-000077
Calculate the output feature map of the weight matrix of the preset long short-term memory network model;
其中,W hl为预设长短时记忆网络模型的第l层的输出权值矩阵,
Figure PCTCN2022101151-appb-000078
分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输出权值,W xl为预设长短时记忆网络模型的第l层的输入权值矩阵,
Figure PCTCN2022101151-appb-000079
分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输入权值,FM hl为预设长短时记忆网络模型的第 l层的输出权值矩阵的输出特征图,y fh、y ih、y uh、y oh分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输出权值矩阵的输出特征图,
Figure PCTCN2022101151-appb-000080
为预设长短时记忆网络模型在上一时间步t-1的输出值,FM xl为预设长短时记忆网络模型的第l层的输入权值矩阵的输出特征图, y fx、y ix、y ux、y ox分别为预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输入权值矩阵的输出特征图,
Figure PCTCN2022101151-appb-000081
为预设长短时记忆网络模型的第l层在时间步t的输入值。
Among them, W hl is the output weight matrix of the first layer of the preset long short-term memory network model,
Figure PCTCN2022101151-appb-000078
are the output weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively, W xl is the input weight matrix of the l-th layer of the preset long-short-term memory network model,
Figure PCTCN2022101151-appb-000079
are the input weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model respectively, and FM hl is the output feature map of the output weight matrix of the l-th layer of the preset long-short-term memory network model, y fh , y ih , y uh , y oh are the output feature maps of the output weight matrix of the forget gate, input gate, update gate and output gate of the preset long short-term memory network model, respectively,
Figure PCTCN2022101151-appb-000080
is the output value of the preset long-short-term memory network model at the last time step t-1, FM xl is the output feature map of the input weight matrix of the l-th layer of the preset long-short-term memory network model, y fx , y ix , y ux , y ox are the output feature maps of the input weight matrix of the forget gate, input gate, update gate and output gate of the preset long short-term memory network model, respectively,
Figure PCTCN2022101151-appb-000081
is the input value of layer l of the preset long-short-term memory network model at time step t.
在上述实施例的基础上,在一个具体实施例中,该第二计算模块可以包括:On the basis of the foregoing embodiments, in a specific embodiment, the second calculation module may include:
获取子模块,用于获取预设长短时记忆网络模型的第l层在上一时间步t-1的输出值
Figure PCTCN2022101151-appb-000082
并将输出值
Figure PCTCN2022101151-appb-000083
作为压缩后的长短时记忆网络模型的输入值;
The acquisition sub-module is used to obtain the output value of the l-th layer of the preset long-short-term memory network model at the previous time step t-1
Figure PCTCN2022101151-appb-000082
and will output the value
Figure PCTCN2022101151-appb-000083
As the input value of the compressed long-short-term memory network model;
第一确定子模块,用于将
Figure PCTCN2022101151-appb-000084
作为压缩后的长短时记忆网络模型的输出权值矩阵的压缩输出特征图,并将
Figure PCTCN2022101151-appb-000085
作为压缩后的长短时记忆网络模型的输入权值矩阵的压缩输出特征图;
The first determined sub-module is used to
Figure PCTCN2022101151-appb-000084
As the compressed output feature map of the output weight matrix of the compressed long short-term memory network model, and
Figure PCTCN2022101151-appb-000085
The compressed output feature map as the input weight matrix of the compressed long short-term memory network model;
其中,
Figure PCTCN2022101151-appb-000086
为W hl压缩后的输出权值矩阵,
Figure PCTCN2022101151-appb-000087
Figure PCTCN2022101151-appb-000088
的转置矩阵,
Figure PCTCN2022101151-appb-000089
为W xl压缩后的输入权值矩阵,
Figure PCTCN2022101151-appb-000090
Figure PCTCN2022101151-appb-000091
的转置矩阵,
Figure PCTCN2022101151-appb-000092
为预设长短时记忆网络模型的第l层在上一时间步t-1的输出值,T为输入数据x的时间步总数。
in,
Figure PCTCN2022101151-appb-000086
is the output weight matrix after W hl compression,
Figure PCTCN2022101151-appb-000087
for
Figure PCTCN2022101151-appb-000088
The transpose matrix of
Figure PCTCN2022101151-appb-000089
is the input weight matrix after W xl compression,
Figure PCTCN2022101151-appb-000090
for
Figure PCTCN2022101151-appb-000091
The transpose matrix of
Figure PCTCN2022101151-appb-000092
is the output value of layer l of the preset long-short-term memory network model at the last time step t-1, and T is the total number of time steps of the input data x.
在上述实施例的基础上,在一个具体实施例中,该确定模块可以包括:On the basis of the foregoing embodiments, in a specific embodiment, the determining module may include:
记录子模块,用于将预设长短时记忆网络模型中被压缩的权值组的编号记录为集合θ;The recording sub-module is used to record the number of the compressed weight group in the preset long short-term memory network model as a set θ;
第一提取子模块,用于依据集合θ提取预设长短时记忆网络模型在上一时间步t-1的输出权值矩阵的输出特征图局部数据
Figure PCTCN2022101151-appb-000093
和输入权值矩阵的输出特征图局部数据
Figure PCTCN2022101151-appb-000094
The first extraction sub-module is used to extract the local data of the output feature map of the output weight matrix of the preset long short-term memory network model at the previous time step t-1 according to the set θ
Figure PCTCN2022101151-appb-000093
and the output feature map local data of the input weight matrix
Figure PCTCN2022101151-appb-000094
第二确定子模块,用于根据公式
Figure PCTCN2022101151-appb-000095
确定压缩后的长短时记忆网络模型的第l层的最优输出权值矩阵
Figure PCTCN2022101151-appb-000096
The second determination sub-module is used to determine according to the formula
Figure PCTCN2022101151-appb-000095
Determine the optimal output weight matrix of layer l of the compressed long-short-term memory network model
Figure PCTCN2022101151-appb-000096
第三确定子模块,用于根据公式
Figure PCTCN2022101151-appb-000097
确定压缩后的长短时记忆网络模型的第l层的最优输入权值矩阵
Figure PCTCN2022101151-appb-000098
The third determination sub-module is used to determine according to the formula
Figure PCTCN2022101151-appb-000097
Determine the optimal input weight matrix of layer l of the compressed long short-term memory network model
Figure PCTCN2022101151-appb-000098
其中,
Figure PCTCN2022101151-appb-000099
为F范数,
Figure PCTCN2022101151-appb-000100
为输出权值矩阵的输出特征图局部数据,
Figure PCTCN2022101151-appb-000101
为输入权值矩阵的输出特征图局部数据。
in,
Figure PCTCN2022101151-appb-000099
is the F norm,
Figure PCTCN2022101151-appb-000100
is the output feature map local data of the output weight matrix,
Figure PCTCN2022101151-appb-000101
is the output feature map local data of the input weight matrix.
在上述实施例的基础上,在一个具体实施例中,该确定模块还可以包括:On the basis of the above embodiments, in a specific embodiment, the determining module may also include:
第二提取子模块,用于依据集合θ提取预设长短时记忆网络模型的第l+1层的输入权值矩阵W x(l+1)对应行的权值
Figure PCTCN2022101151-appb-000102
The second extraction sub-module is used to extract the weight of the corresponding row of the input weight matrix W x (l+1) of the l+1 layer of the preset long-short-term memory network model according to the set θ
Figure PCTCN2022101151-appb-000102
第四确定子模块,用于根据公式
Figure PCTCN2022101151-appb-000103
确定压缩后的长短时记忆网络模型的第l+1层的最优输入权值矩阵
Figure PCTCN2022101151-appb-000104
The fourth determination sub-module is used to determine according to the formula
Figure PCTCN2022101151-appb-000103
Determine the optimal input weight matrix of the l+1 layer of the compressed long short-term memory network model
Figure PCTCN2022101151-appb-000104
其中,FM x(l+1)为预设长短时记忆网络模型的第l+1层的输入权值矩阵的输出特征图,W x(l+1)为预设长短时记忆网络模型的第l+1层的输入权值矩阵,
Figure PCTCN2022101151-appb-000105
为W x(l+1)压缩后的输入权值矩阵,
Figure PCTCN2022101151-appb-000106
Figure PCTCN2022101151-appb-000107
的转置矩阵,
Figure PCTCN2022101151-appb-000108
为预设长短时记忆网络模型的第l+1层在时间步t的输入值。
Among them, FM x(l+1) is the output feature map of the input weight matrix of the l+1th layer of the preset long-short-term memory network model, W x(l+1) is the first-th layer of the preset long-short-term memory network model The input weight matrix of the l+1 layer,
Figure PCTCN2022101151-appb-000105
is the compressed input weight matrix of W x(l+1) ,
Figure PCTCN2022101151-appb-000106
for
Figure PCTCN2022101151-appb-000107
The transpose matrix of
Figure PCTCN2022101151-appb-000108
is the input value of layer l+1 of the preset long-short-term memory network model at time step t.
在上述实施例的基础上,在一个具体实施例中,该系统还可以包括:On the basis of the foregoing embodiments, in a specific embodiment, the system may also include:
重训练模块,用于响应于压缩后的长短时记忆网络模型的所有层都完成参数优化,对压缩后的长短时记忆网络模型进行预设次数的重训练。The retraining module is configured to perform a preset number of retrainings on the compressed long short-term memory network model in response to parameter optimization of all layers of the compressed long short-term memory network model.
由于系统部分的实施例与方法部分的实施例相互对应,因此系统部分的实施例请参见方法部分的实施例的描述,这里暂不赘述。Since the embodiments of the system part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the system part, and details will not be repeated here.
请参考图4,图4为本申请实施例所提供的一种图像处理设备的结构图。Please refer to FIG. 4 , which is a structural diagram of an image processing device provided by an embodiment of the present application.
该图像处理设备400可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)422和存储器432,一个或一个以上存储应用程序442或数据444的存储介质430(例如一个或一个以上海量存储设备)。其中,存储器432和存储介质430可以是短暂存储或持久存储。存储在存储介质430的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对装置中的一系列指令操作。更进一步地,处理器422可以设置为与存储介质430通信,在图像处理设备400上执行存储介质430中的一系列指令操作。The image processing device 400 may have relatively large differences due to different configurations or performances, and may include one or more than one processor (central processing units, CPU) 422 and memory 432, and one or more than one storage application program 442 or data 444 Storage medium 430 (such as one or more mass storage devices). Wherein, the memory 432 and the storage medium 430 may be temporary storage or persistent storage. The program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the device. Furthermore, the processor 422 may be configured to communicate with the storage medium 430 , and execute a series of instruction operations in the storage medium 430 on the image processing device 400 .
图像处理设备400还可以包括一个或一个以上电源424,一个或一个以上有线或无线网络接口450,一个或一个以上输入输出接口458,和/或,一个或一个以上操作系统441,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。The image processing device 400 may also include one or more power sources 424, one or more wired or wireless network interfaces 450, one or more input and output interfaces 458, and/or, one or more operating systems 441, such as Windows Server™, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
上述图1至图2所描述的图像处理方法中的步骤由图像处理设备基于该图4所示的结构实现。The steps in the image processing method described above in FIG. 1 to FIG. 2 are realized by the image processing device based on the structure shown in FIG. 4 .
进一步的,本申请实施例还公开了一种非易失性计算机可读存储介质,该存储介质中存储有计算机可读指令,该计算机可读指令被一个或多个处理器加载并执行时,实现前述任一实施例公开的图像处理方法中的步骤。Further, the embodiment of the present application also discloses a non-volatile computer-readable storage medium, in which computer-readable instructions are stored, and when the computer-readable instructions are loaded and executed by one or more processors, The steps in the image processing method disclosed in any of the foregoing embodiments are implemented.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and module can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置、设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed devices, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined or integrated. to another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or modules may be in electrical, mechanical or other forms.
作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。A module described as a separate component may or may not be physically separated, and a component shown as a module may or may not be a physical module, that is, it may be located in one place, or may also be distributed to multiple network modules. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, each module may exist separately physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules.
集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,功能调用装置,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , including several instructions to make a computer device (which may be a personal computer, a function calling device, or a network device, etc.) execute all or part of the steps of the methods in various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
以上对本申请所提供的一种图像处理方法、系统、设备及可读存储介质进行了详细介绍。本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这 些改进和修饰也落入本申请权利要求的保护范围内。An image processing method, system, device, and readable storage medium provided by the present application have been introduced in detail above. In this paper, specific examples are used to illustrate the principles and implementation methods of the present application, and the descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application. It should be pointed out that for those skilled in the art, without departing from the principle of the application, some improvements and modifications can be made to the application, and these improvements and modifications also fall within the protection scope of the claims of the application.
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that in this specification, relative terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is no such actual relationship or order between the operations. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

Claims (10)

  1. 一种图像处理方法,其特征在于,包括:An image processing method, characterized in that, comprising:
    依据固有结构化稀疏度对所述预设长短时记忆网络模型的权值矩阵进行分组,得到对应的权值组;grouping the weight matrix of the preset LSTM network model according to the inherent structured sparsity to obtain corresponding weight groups;
    分别计算每个权值组与其他权值组的皮尔森相关系数,将所述皮尔森相关系数作为所述权值组被采样到的采样概率,并依据预设压缩率通过所述采样概率随机选择对应的权值组进行压缩,得到压缩后的长短时记忆网络模型;及Calculate the Pearson correlation coefficient of each weight group and other weight groups separately, use the Pearson correlation coefficient as the sampling probability of the weight group being sampled, and randomly pass the sampling probability according to the preset compression rate Selecting the corresponding weight value group for compression to obtain the compressed long-short-term memory network model; and
    利用所述压缩后的长短时记忆网络模型对输入的图像进行图像处理。Image processing is performed on the input image by using the compressed long-short-term memory network model.
  2. 根据权利要求1所述的方法,其特征在于,在利用所述压缩后的长短时记忆网络模型对输入的图像进行图像处理之前,还包括:The method according to claim 1, wherein, before utilizing the compressed long-short-term memory network model to perform image processing on the input image, it also includes:
    依据所述权值组计算所述预设长短时记忆网络模型的权值矩阵的输出特征图;Calculating the output feature map of the weight matrix of the preset long-short-term memory network model according to the weight group;
    依据所述权值组计算所述压缩后的长短时记忆网络模型的权值矩阵的压缩输出特征图;Calculate the compressed output feature map of the weight matrix of the compressed long-short-term memory network model according to the weight group;
    通过最小二乘法依据所述输出特征图及所述压缩输出特征图确定所述压缩后的长短时记忆网络模型的最优权值矩阵;及determining the optimal weight matrix of the compressed long-short-term memory network model according to the output feature map and the compressed output feature map by a least squares method; and
    利用所述最优权值矩阵对所述压缩后的长短时记忆网络模型进行参数优化。Using the optimal weight matrix to optimize the parameters of the compressed long-short-term memory network model.
  3. 根据权利要求2所述的方法,其特征在于,依据所述权值组计算所述预设长短时记忆网络模型的权值矩阵的输出特征图,包括:The method according to claim 2, wherein the calculation of the output feature map of the weight matrix of the preset long-short-term memory network model according to the weight group includes:
    计算所述预设长短时记忆网络模型的第l层在时间步t的遗忘门、输入门和输出门的激活函数的输入值以及在上一时间步t-1的输出值
    Figure PCTCN2022101151-appb-100001
    并确定对应的输出权值矩阵
    Figure PCTCN2022101151-appb-100002
    和输入权值矩阵
    Figure PCTCN2022101151-appb-100003
    Calculate the input value of the activation function of the forgetting gate, input gate and output gate of the first layer of the preset long-short-term memory network model at time step t and the output value at the previous time step t-1
    Figure PCTCN2022101151-appb-100001
    And determine the corresponding output weight matrix
    Figure PCTCN2022101151-appb-100002
    and the input weight matrix
    Figure PCTCN2022101151-appb-100003
    and
    根据公式
    Figure PCTCN2022101151-appb-100004
    Figure PCTCN2022101151-appb-100005
    计算所述预设长短时记忆网络模型的权值矩阵的输出特征图;
    According to the formula
    Figure PCTCN2022101151-appb-100004
    and
    Figure PCTCN2022101151-appb-100005
    Calculate the output feature map of the weight matrix of the preset long short-term memory network model;
    其中,W hl为所述预设长短时记忆网络模型的第l层的输出权值矩阵,
    Figure PCTCN2022101151-appb-100006
    分别为所述预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输出权值,W xl为所述预设长短时记忆网络模型的第l层的输入权值矩阵,
    Figure PCTCN2022101151-appb-100007
    分别为所述预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输入权值,FM hl为所述预设长短时记忆网络模型的第l层的输出权值矩阵的输出特征图,y fh、y ih、y uh、y oh分别为所述预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输出权值矩阵的输出特征图,
    Figure PCTCN2022101151-appb-100008
    为所述预设长短时记忆网络模型在上一时间步t-1的输出值,FM xl为所述预设长短时记忆网络模型的第l层的输入权值矩阵的输出特征图,y fx、y ix、y ux、y ox分别为所述预设长短时记忆网络模型的遗忘门、输入门、更新门和输出门的输入权值矩阵的输出特征图,
    Figure PCTCN2022101151-appb-100009
    为所述预设长短时记忆网络模型的第l层在时间步t的输入值。
    Wherein, W hl is the output weight matrix of the first layer of the preset long-short-term memory network model,
    Figure PCTCN2022101151-appb-100006
    Respectively, the output weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model, W xl is the input weight matrix of the first layer of the preset long-short-term memory network model,
    Figure PCTCN2022101151-appb-100007
    are respectively the input weights of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model, and FM hl is the output weight matrix of the first layer of the preset long-short-term memory network model Output feature map, y fh , y ih , y uh , y oh are the output feature maps of the output weight matrix of the forget gate, input gate, update gate and output gate of the preset long short-term memory network model, respectively,
    Figure PCTCN2022101151-appb-100008
    is the output value of the preset long-short-term memory network model at the last time step t-1, FM xl is the output feature map of the input weight matrix of the first layer of the preset long-short-term memory network model, y fx , y ix , y ux , y ox are the output feature maps of the input weight matrix of the forget gate, input gate, update gate and output gate of the preset long-short-term memory network model, respectively,
    Figure PCTCN2022101151-appb-100009
    is the input value of the first layer of the preset long-short-term memory network model at time step t.
  4. 根据权利要求3所述的方法,其特征在于,依据所述权值组计算所述压缩后的长短时记忆网络模型的权值矩阵的压缩输出特征图,包括:The method according to claim 3, wherein the compressed output feature map of the weight matrix of the compressed long-short-term memory network model is calculated according to the weight group, comprising:
    获取所述预设长短时记忆网络模型的第l层在上一时间步t-1的输出值
    Figure PCTCN2022101151-appb-100010
    并将所述输出值
    Figure PCTCN2022101151-appb-100011
    作为所述压缩后的长短时记忆网络模型的输入值;及
    Obtain the output value of the l-th layer of the preset long-short-term memory network model at the previous time step t-1
    Figure PCTCN2022101151-appb-100010
    and put the output value
    Figure PCTCN2022101151-appb-100011
    As the input value of the compressed long-short-term memory network model; and
    Figure PCTCN2022101151-appb-100012
    作为所述压缩后的长短时记忆网络模型的输出权值矩阵的压缩输出特征图,并将
    Figure PCTCN2022101151-appb-100013
    作为所述压缩后的长短时记忆网络模型的输入权值矩阵的压缩输出特征图;
    Will
    Figure PCTCN2022101151-appb-100012
    As the compressed output feature map of the output weight matrix of the compressed long-short-term memory network model, and
    Figure PCTCN2022101151-appb-100013
    As the compressed output feature map of the input weight matrix of the compressed long-short-term memory network model;
    其中,
    Figure PCTCN2022101151-appb-100014
    为W hl压缩后的输出权值矩阵,
    Figure PCTCN2022101151-appb-100015
    Figure PCTCN2022101151-appb-100016
    的转置矩阵,
    Figure PCTCN2022101151-appb-100017
    为W xl压缩后的输入权值矩阵,
    Figure PCTCN2022101151-appb-100018
    Figure PCTCN2022101151-appb-100019
    的转置矩阵,
    Figure PCTCN2022101151-appb-100020
    为所述预设长短时记忆网络模型的第l层在上一时间步t-1的输出值,T为输入数据x的时间步总数。
    in,
    Figure PCTCN2022101151-appb-100014
    is the output weight matrix after W hl compression,
    Figure PCTCN2022101151-appb-100015
    for
    Figure PCTCN2022101151-appb-100016
    The transpose matrix of
    Figure PCTCN2022101151-appb-100017
    is the input weight matrix after W xl compression,
    Figure PCTCN2022101151-appb-100018
    for
    Figure PCTCN2022101151-appb-100019
    The transpose matrix of
    Figure PCTCN2022101151-appb-100020
    is the output value of the first layer of the preset long-short-term memory network model at the last time step t-1, and T is the total number of time steps of the input data x.
  5. 根据权利要求2-4任一项所述的方法,其特征在于,通过最小二乘法依据所述输出特征图及所述压缩输出特征图确定所述压缩后的长短时记忆网络模型的最优权值矩阵,包括:The method according to any one of claims 2-4, wherein the optimal weight of the compressed long-short-term memory network model is determined according to the output feature map and the compressed output feature map by the least square method A matrix of values, including:
    将所述预设长短时记忆网络模型中被压缩的权值组的编号记录为集合θ;Recording the number of the compressed weight group in the preset long-short-term memory network model as a set θ;
    依据所述集合θ提取所述预设长短时记忆网络模型在上一时间步t-1的输出权值矩阵的输出特征图局部数据
    Figure PCTCN2022101151-appb-100021
    和输入权值矩阵的输出特征图局部数据
    Figure PCTCN2022101151-appb-100022
    Extract the local data of the output feature map of the output weight matrix of the preset long-short-term memory network model at the previous time step t-1 according to the set θ
    Figure PCTCN2022101151-appb-100021
    and the output feature map local data of the input weight matrix
    Figure PCTCN2022101151-appb-100022
    根据公式
    Figure PCTCN2022101151-appb-100023
    确定所述压缩后的长短时记忆网络模型的第l层的最优输出权值矩阵
    Figure PCTCN2022101151-appb-100024
    According to the formula
    Figure PCTCN2022101151-appb-100023
    Determine the optimal output weight matrix of the first layer of the compressed long short-term memory network model
    Figure PCTCN2022101151-appb-100024
    and
    根据公式
    Figure PCTCN2022101151-appb-100025
    确定所述压缩后的长短时记忆网络模型的第l层的最优输入权值矩阵
    Figure PCTCN2022101151-appb-100026
    According to the formula
    Figure PCTCN2022101151-appb-100025
    Determine the optimal input weight matrix of the first layer of the compressed long short-term memory network model
    Figure PCTCN2022101151-appb-100026
    其中,
    Figure PCTCN2022101151-appb-100027
    为F范数,
    Figure PCTCN2022101151-appb-100028
    为输出权值矩阵的输出特征图局部数据,
    Figure PCTCN2022101151-appb-100029
    为输入权值矩阵的输出特征图局部数据。
    in,
    Figure PCTCN2022101151-appb-100027
    is the F norm,
    Figure PCTCN2022101151-appb-100028
    is the output feature map local data of the output weight matrix,
    Figure PCTCN2022101151-appb-100029
    is the output feature map local data of the input weight matrix.
  6. 根据权利要求5所述的方法,其特征在于,还包括:The method according to claim 5, further comprising:
    依据所述集合θ提取所述预设长短时记忆网络模型的第l+1层的输入权值矩阵W x(l+1)对应行的权值
    Figure PCTCN2022101151-appb-100030
    Extract the weight of the input weight matrix W x (l+1) corresponding row of the l+1 layer of the preset long-short-term memory network model according to the set θ
    Figure PCTCN2022101151-appb-100030
    and
    根据公式
    Figure PCTCN2022101151-appb-100031
    确定所述压缩后的长短时记忆网络模型的第l+1层的最优输入权值矩阵
    Figure PCTCN2022101151-appb-100032
    According to the formula
    Figure PCTCN2022101151-appb-100031
    Determine the optimal input weight matrix of the l+1 layer of the compressed long short-term memory network model
    Figure PCTCN2022101151-appb-100032
    其中,FM x(l+1)为所述预设长短时记忆网络模型的第l+1层的输入权值矩阵的输出特征图,W x(l+1)为所述预设长短时记忆网络模型的第l+1层的输入权值矩阵,
    Figure PCTCN2022101151-appb-100033
    为W x(l+1)压缩后的输入权值矩阵,
    Figure PCTCN2022101151-appb-100034
    Figure PCTCN2022101151-appb-100035
    的转置矩阵,
    Figure PCTCN2022101151-appb-100036
    为所述预设长短时记忆网络模型的第l+1层在时间步t的输入值。
    Wherein, FM x (l+1) is the output feature map of the input weight matrix of the l+1 layer of the preset long-short-term memory network model, and W x (l+1) is the preset long-short-term memory The input weight matrix of the l+1 layer of the network model,
    Figure PCTCN2022101151-appb-100033
    is the compressed input weight matrix of W x(l+1) ,
    Figure PCTCN2022101151-appb-100034
    for
    Figure PCTCN2022101151-appb-100035
    The transpose matrix of
    Figure PCTCN2022101151-appb-100036
    is the input value of the l+1th layer of the preset long-short-term memory network model at time step t.
  7. 根据权利要求2-6任一项所述的方法,其特征在于,在利用所述最优权值矩阵对所述压缩后的长短时记忆网络模型进行参数优化之后,还包括:The method according to any one of claims 2-6, wherein, after optimizing the parameters of the compressed long-short-term memory network model using the optimal weight matrix, further comprising:
    响应于所述压缩后的长短时记忆网络模型的所有层都完成参数优化,对所述压缩后的长短时记忆网络模型进行预设次数的重训练。Responding to the completion of parameter optimization of all layers of the compressed long-short-term memory network model, retraining the compressed long-short-term memory network model for a preset number of times.
  8. 一种图像处理系统,其特征在于,包括:An image processing system, characterized in that it comprises:
    分组模块,用于依据固有结构化稀疏度对所述预设长短时记忆网络模型的权值矩阵 进行分组,得到对应的权值组;The grouping module is used to group the weight matrix of the preset long-short-term memory network model according to the inherent structured sparsity to obtain the corresponding weight group;
    压缩模块,用于分别计算每个权值组与其他权值组的皮尔森相关系数,将所述皮尔森相关系数作为所述权值组被采样到的采样概率,并依据预设压缩率通过所述采样概率随机选择对应的权值组进行压缩,得到压缩后的长短时记忆网络模型;及The compression module is used to separately calculate the Pearson correlation coefficient of each weight group and other weight groups, and use the Pearson correlation coefficient as the sampling probability of the weight group being sampled, and pass the The sampling probability randomly selects the corresponding weight group to compress, and obtains the compressed long-short-term memory network model; and
    图像处理模块,用于利用所述压缩后的长短时记忆网络模型对输入的图像进行图像处理。The image processing module is configured to use the compressed long-short-term memory network model to perform image processing on the input image.
  9. 一种图像处理设备,其特征在于,包括:An image processing device, characterized in that it comprises:
    存储器,用于存储计算机可读指令;及memory for storing computer readable instructions; and
    一个或多个处理器,用于执行所述计算机可读指令时实现如权利要求1至7任一项所述图像处理方法的步骤。One or more processors, configured to implement the steps of the image processing method according to any one of claims 1 to 7 when executing the computer-readable instructions.
  10. 一种非易失性计算机可读存储介质,其特征在于,所述非易失性计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被一个或多个处理器执行时实现如权利要求1至7任一项所述图像处理方法的步骤。A non-volatile computer-readable storage medium, wherein computer-readable instructions are stored on the non-volatile computer-readable storage medium, and when the computer-readable instructions are executed by one or more processors Implementing the steps of the image processing method described in any one of claims 1 to 7.
PCT/CN2022/101151 2021-12-30 2022-06-24 Image processing method, system, device and readable storage medium WO2023123930A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111666557.5 2021-12-30
CN202111666557.5A CN114444657A (en) 2021-12-30 2021-12-30 Image processing method, system, equipment and readable storage medium

Publications (1)

Publication Number Publication Date
WO2023123930A1 true WO2023123930A1 (en) 2023-07-06

Family

ID=81365087

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/101151 WO2023123930A1 (en) 2021-12-30 2022-06-24 Image processing method, system, device and readable storage medium

Country Status (2)

Country Link
CN (1) CN114444657A (en)
WO (1) WO2023123930A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114444657A (en) * 2021-12-30 2022-05-06 浪潮电子信息产业股份有限公司 Image processing method, system, equipment and readable storage medium
CN116776159B (en) * 2023-08-23 2024-02-09 苏州浪潮智能科技有限公司 Electrocardiogram labeling method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040151371A1 (en) * 2003-01-30 2004-08-05 Eastman Kodak Company Method for face orientation determination in digital color images
CN109754080A (en) * 2018-12-21 2019-05-14 西北工业大学 The pruning method of Embedded network model
US10614798B2 (en) * 2016-07-29 2020-04-07 Arizona Board Of Regents On Behalf Of Arizona State University Memory compression in a deep neural network
US20210150362A1 (en) * 2019-11-15 2021-05-20 Microsoft Technology Licensing, Llc Neural network compression based on bank-balanced sparsity
CN113705775A (en) * 2021-07-29 2021-11-26 浪潮电子信息产业股份有限公司 Neural network pruning method, device, equipment and storage medium
CN114444657A (en) * 2021-12-30 2022-05-06 浪潮电子信息产业股份有限公司 Image processing method, system, equipment and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040151371A1 (en) * 2003-01-30 2004-08-05 Eastman Kodak Company Method for face orientation determination in digital color images
US10614798B2 (en) * 2016-07-29 2020-04-07 Arizona Board Of Regents On Behalf Of Arizona State University Memory compression in a deep neural network
CN109754080A (en) * 2018-12-21 2019-05-14 西北工业大学 The pruning method of Embedded network model
US20210150362A1 (en) * 2019-11-15 2021-05-20 Microsoft Technology Licensing, Llc Neural network compression based on bank-balanced sparsity
CN113705775A (en) * 2021-07-29 2021-11-26 浪潮电子信息产业股份有限公司 Neural network pruning method, device, equipment and storage medium
CN114444657A (en) * 2021-12-30 2022-05-06 浪潮电子信息产业股份有限公司 Image processing method, system, equipment and readable storage medium

Also Published As

Publication number Publication date
CN114444657A (en) 2022-05-06

Similar Documents

Publication Publication Date Title
WO2023123930A1 (en) Image processing method, system, device and readable storage medium
CN110473141B (en) Image processing method, device, storage medium and electronic equipment
CN111105017B (en) Neural network quantization method and device and electronic equipment
WO2022105117A1 (en) Method and device for image quality assessment, computer device, and storage medium
CN110647974A (en) Network layer operation method and device in deep neural network
CN115390164B (en) Radar echo extrapolation forecasting method and system
CN114490065A (en) Load prediction method, device and equipment
CN114332104B (en) Power grid power transmission scene RGB point cloud semantic segmentation multi-stage model joint optimization method
CN114021728B (en) Quantum data measuring method and system, electronic device, and medium
JP2022534890A (en) Image processing method and apparatus, electronic equipment and storage medium
CN112990444A (en) Hybrid neural network training method, system, equipment and storage medium
CN114065653A (en) Construction method of power load prediction model and power load prediction method
CN116188878A (en) Image classification method, device and storage medium based on neural network structure fine adjustment
CN113065525A (en) Age recognition model training method, face age recognition method and related device
CN111191739A (en) Wall surface defect detection method based on attention mechanism
CN114741527A (en) Graph representation learning method and device based on multi-source heterogeneous medical knowledge graph
CN111046958A (en) Image classification and recognition method based on data-dependent kernel learning and dictionary learning
CN116384576A (en) Wind speed prediction method, device, system and storage medium
CN113033804B (en) Convolution neural network compression method for remote sensing image
CN112036554B (en) Neural network model processing method and device, computer equipment and storage medium
CN115062769A (en) Knowledge distillation-based model training method, device, equipment and storage medium
CN114707643A (en) Model segmentation method and related equipment thereof
CN114861671A (en) Model training method and device, computer equipment and storage medium
CN114611673A (en) Neural network compression method, device, equipment and readable storage medium
CN112766537A (en) Short-term electric load prediction method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22913219

Country of ref document: EP

Kind code of ref document: A1