WO2022221982A1 - 一种图像重建方法、装置、终端设备和存储介质 - Google Patents

一种图像重建方法、装置、终端设备和存储介质 Download PDF

Info

Publication number
WO2022221982A1
WO2022221982A1 PCT/CN2021/088049 CN2021088049W WO2022221982A1 WO 2022221982 A1 WO2022221982 A1 WO 2022221982A1 CN 2021088049 W CN2021088049 W CN 2021088049W WO 2022221982 A1 WO2022221982 A1 WO 2022221982A1
Authority
WO
WIPO (PCT)
Prior art keywords
feature map
target
combination
feature
mapping
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2021/088049
Other languages
English (en)
French (fr)
Inventor
王珊珊
梁皓云
郑海荣
刘新
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Institute of Advanced Technology of CAS
Original Assignee
Shenzhen Institute of Advanced Technology of CAS
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 Shenzhen Institute of Advanced Technology of CAS filed Critical Shenzhen Institute of Advanced Technology of CAS
Priority to US18/555,723 priority Critical patent/US12524837B2/en
Priority to PCT/CN2021/088049 priority patent/WO2022221982A1/zh
Publication of WO2022221982A1 publication Critical patent/WO2022221982A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/60Image enhancement or restoration using machine learning, e.g. neural networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Definitions

  • the present application relates to the technical field of image processing, and in particular, to an image reconstruction method, apparatus, terminal device and storage medium.
  • the existing deep learning-based image reconstruction methods can be mainly divided into two categories.
  • One is the expansion-based method, which starts from the problem of optimizing the image and then expands an optimization algorithm.
  • the architecture of the neural network is based on iterative construction; the other is the non-expanding method, which directly learns the mapping from zero-padding data to full-sampled data to complete image reconstruction.
  • neither of these two types of methods can capture the interdependence between different image regions where the content of the feature image is connected, that is, cannot capture the long-range dependencies of the image.
  • embodiments of the present application provide an image reconstruction method, apparatus, terminal device, and storage medium, which can capture long-distance dependencies of images.
  • a first aspect of the embodiments of the present application provides an image reconstruction method, including:
  • a reconstructed image corresponding to the original image is generated according to the fourth feature map.
  • the initial feature map of the original image is first extracted, and then the average value of the element values of each column of pixels in the initial feature map is calculated respectively, and a target row vector is constructed according to the average value.
  • it is copied in the column direction to obtain a feature map; and, the average value of the element values of each row of pixels in the initial feature map is calculated respectively, and the target column vector is constructed according to the average value.
  • the target column vector is constructed according to the average value
  • After performing one-dimensional convolution processing on the target column vector it is copied in the row direction to obtain another feature map, and then the two feature maps are fused; finally, after performing two-dimensional convolution processing on the fused feature map , generate a reconstructed image based on this fused feature map.
  • the above process adopts a cross-pooling method, which is equivalent to deploying a pooling kernel with a strip shape (one row or one column of the feature map) along a spatial dimension, which can use a wider range of pixels in feature calculation. , thus being able to capture the long-range dependencies of the image.
  • the generating the reconstructed image corresponding to the original image according to the fourth feature map may include:
  • each of the target feature map combinations includes more than two target feature maps
  • the mapping feature map combination includes a mapping feature map obtained after each target feature map in the target feature map combination is processed by a preset mapping function;
  • generating the reconstructed image corresponding to the original image according to each combination of the target feature maps and each combination of the mapping feature maps may include:
  • a reconstructed image corresponding to the original image is generated according to the final feature map combination.
  • a final feature map combination containing a large number of feature maps can be obtained, and then a reconstructed image corresponding to the original image is generated based on the final feature map combination.
  • arranging each of the target feature map combinations and each of the mapping feature map combinations in a specified order to obtain a final feature map combination may include:
  • Each of the target feature map combinations is arranged at both ends of the final feature map combination, and each of the mapping feature map combinations is arranged between two ends of the final feature map combination.
  • each target feature map combination can be arranged at both ends, and each mapping feature map combination can be arranged in the middle.
  • generating the reconstructed image corresponding to the original image according to the final feature map combination may include:
  • Deconvolution processing is performed on the feature maps in the final feature map combination, and then the feature maps after the deconvolution processing are fused to obtain a reconstructed image corresponding to the original image.
  • the feature map in the final feature map combination can be input into the deconvolution layer for processing, and the dimension of the feature map can be increased, so that the processed result is consistent with the dimension of the reconstructed image.
  • mapping feature map combination corresponding to the target feature map combination by using feature mapping may include:
  • mapping processing is performed on each target feature map in the target feature map combination, respectively, to obtain a mapping feature map corresponding to each target feature map in the target feature map combination.
  • mapping function By adopting a linear function as the mapping function, the computational complexity of the feature mapping process can be further reduced.
  • the fusion of the first feature map and the second feature map to obtain a third feature map may include:
  • the process of summing corresponding position elements is performed on the first feature map and the second feature map to obtain the third feature map.
  • a second aspect of the embodiments of the present application provides an image reconstruction apparatus, including:
  • an original image acquisition module used to acquire the original image to be reconstructed
  • a feature extraction module for extracting the initial feature map of the original image
  • a row vector building module used to calculate the average value of the element values of each column of pixels in the initial feature map respectively, and to construct a target row vector according to the obtained average value corresponding to each column of pixels;
  • a column vector building module used to calculate the average value of the element values of each row of pixels in the initial feature map respectively, and construct a target column vector according to the obtained average value corresponding to each row of pixels;
  • a row vector duplication module for performing one-dimensional convolution processing on the target row vector, and duplicating the target row vector after the one-dimensional convolution processing in the column direction to obtain a first feature map
  • a column vector duplication module for performing one-dimensional convolution processing on the target column vector, and duplicating the target column vector after the one-dimensional convolution processing in the row direction to obtain a second feature map
  • a feature fusion module configured to fuse the first feature map and the second feature map to obtain a third feature map
  • a two-dimensional convolution module configured to perform two-dimensional convolution processing on the third feature map to obtain a fourth feature map
  • An image reconstruction module configured to generate a reconstructed image corresponding to the original image according to the fourth feature map.
  • a third aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, when the processor executes the computer program
  • the image reconstruction method provided by the first aspect of the embodiments of the present application is implemented.
  • a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the implementation of the first aspect of the embodiments of the present application is implemented image reconstruction method.
  • a fifth aspect of the embodiments of the present application provides a computer program product, which enables the terminal device to execute the image reconstruction method described in the first aspect of the embodiments of the present application when the computer program product runs on a terminal device.
  • FIG. 1 is a flowchart of an embodiment of an image reconstruction method provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of processing a cross-pooling operation on a feature map provided by an embodiment of the present application
  • FIG. 3 is a flowchart of an embodiment of another image reconstruction method provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of processing a feature mapping operation on a feature map provided by an embodiment of the present application
  • FIG. 5 is a structural diagram of an embodiment of an image reconstruction apparatus provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a terminal device provided by an embodiment of the present application.
  • the present application proposes an image reconstruction method, apparatus, terminal device and storage medium, which can solve the problem that the long-distance dependency of the image cannot be captured when reconstructing the image.
  • the execution body of each method embodiment of the present application is various types of terminal devices or servers, such as mobile phones, tablet computers, notebook computers, desktop computers, and wearable devices.
  • an image reconstruction method provided by an embodiment of the present application is shown, including:
  • the original image to be reconstructed is acquired.
  • the original image may be a blurred image, and a clear image corresponding to it needs to be reconstructed.
  • the feature map of the original image needs to be extracted.
  • various feature extraction networks in the prior art may be used to perform convolution and other processing on the original image to extract a corresponding feature image as the initial feature map in the embodiment of the present application. It should be noted that this application does not impose any restrictions on the structure and type of the feature extraction network.
  • the average value of the element values of each row of pixels in the initial feature map is calculated respectively. For example, for the first row of pixels in the initial feature map, the row Add the element values of all the pixels of average value. Next, a target column vector is constructed according to the obtained average values of pixels in each row. The number of elements of the target column vector is equal to the number of rows of the initial feature map, and each element value is the average of the element values of the corresponding row. value, that is, the average values corresponding to each row of pixels are combined into a column vector.
  • the obtained target row vector first perform one-dimensional convolution processing on it, for example, a 1D convolution with a convolution kernel of 3 can be used, and then copy the target row vector after one-dimensional convolution processing in the column direction , to get the first feature map.
  • the size (number of rows and columns) of the first feature map obtained by copying the target row vector may be the same as the size of the initial feature map.
  • one-dimensional convolution processing is also performed on it first, for example, a 1D convolution with a convolution kernel of 3 can be used, and then the target column after one-dimensional convolution processing is processed in the row direction.
  • the vector is copied to obtain the second feature map.
  • the size (number of rows and columns) of the second feature map obtained by copying the target column vector may also be the same as the size of the initial feature map.
  • the first feature map and the second feature map are fused, and the fusion method may include stacking corresponding position elements, taking the maximum value of the corresponding position elements, taking the average value of the corresponding position elements, etc., so as to obtain a third feature map with the same size .
  • the fusion of the first feature map and the second feature map to obtain a third feature map may include:
  • the process of summing corresponding position elements is performed on the first feature map and the second feature map to obtain the third feature map.
  • the method of summing the corresponding position elements can be adopted.
  • the elements of the first row and column of the first feature map are summed with the elements of the first row and column of the second feature map to obtain the elements of the first row and column of the third feature map.
  • the elements of the first row and the second column of the first feature map are summed with the elements of the first row and the second column of the second feature map, so as to obtain the elements of the first row and the second column of the third feature map, And so on.
  • a two-dimensional convolution process is performed on the third feature map obtained by fusion, for example, a 2D convolution with a convolution kernel of 3 may be used to obtain a fourth feature map.
  • FIG. 2 a schematic diagram of the corresponding processing is shown in FIG. 2 .
  • Figure 2 first extract the average value of the element values of each column of pixels in the initial feature map to construct a target row vector, and extract the average value of the element values of each row of pixels in the initial feature map to construct a target column vector; then , perform one-dimensional convolution processing on the target row vector and target column vector respectively, copy the target row vector in the column direction to obtain the first feature map, and copy the target column vector in the row direction to obtain the second feature map ;
  • the first feature map and the second feature map are superimposed to obtain a third feature map, and after two-dimensional convolution processing, a fourth feature map is obtained.
  • the size of the pooling kernel of the pooling layer used is usually 2*2, and the output feature map is obtained by continuously sliding the pooling kernel on the entire original feature map.
  • the fused features are all features in a narrow pixel range, so the long-distance dependencies of the image cannot be captured.
  • the embodiment of the present application uses a cross-pooling layer to replace the conventional pooling layer, and the size of the corresponding pooling kernel is the same as one row or one column of the feature image. Therefore, the pixel range of the fused feature during calculation is wider. Ability to adequately capture long-range dependencies in images.
  • the initial feature map of the original image is first extracted, and then the average value of the element values of each column of pixels in the initial feature map is calculated respectively, and a target row vector is constructed according to the average value.
  • it is copied in the column direction to obtain a feature map; and, the average value of the element values of each row of pixels in the initial feature map is calculated respectively, and the target column vector is constructed according to the average value.
  • the target column vector is constructed according to the average value
  • After performing one-dimensional convolution processing on the target column vector it is copied in the row direction to obtain another feature map, and then the two feature maps are fused; finally, after performing two-dimensional convolution processing on the fused feature map , generate a reconstructed image based on this fused feature map.
  • the above process adopts a cross-pooling method, which is equivalent to deploying a pooling kernel with a strip shape (one row or one column of the feature map) along a spatial dimension, which can use a wider range of pixels in feature calculation. , thus being able to capture the long-range dependencies of the image.
  • FIG. 3 another image reconstruction method provided by an embodiment of the present application is shown, including:
  • Steps 301-308 are the same as steps 101-108, for details, please refer to the relevant description of steps 101-108.
  • steps 309 to 311 may be used to increase the number of obtained feature maps.
  • each target feature map combination contains more than two target feature maps.
  • the number of target feature maps contained in different target feature map combinations may be the same or different, and the method of grouping the target feature maps may be random grouping, grouping according to a specific order, etc. Not limited.
  • mapping feature map combination includes the mapping feature map obtained after each target feature map in the target feature map combination is processed by a preset mapping function;
  • each mapping feature map included in a certain mapping feature map combination is obtained after each target feature map included in the corresponding target feature map combination is processed by a mapping function.
  • a certain target feature map combination A contains a total of 3 target feature maps: target feature map 1, target feature map 2 and target feature map 3, then a preset mapping function f(x) is used to map the target feature map 1.
  • the map feature map combination corresponding to the target feature map combination A consists of map feature map 1, map feature map 2, and map feature map 3.
  • mapping feature map combination corresponding to the target feature map combination by using feature mapping may include:
  • mapping processing is performed on each target feature map in the target feature map combination, respectively, to obtain a mapping feature map corresponding to each target feature map in the target feature map combination.
  • a linear function can be used as the mapping function.
  • a and x are multiplied by the corresponding positions of the matrix, and then the elements in the matrix b are added to obtain the output mapping feature map f(x).
  • a larger number of feature maps can be generated, that is, the above-mentioned combination of each mapped feature map.
  • a reconstructed image corresponding to the original image can be generated according to the original target feature map combination and the generated mapping feature map combination.
  • generating the reconstructed image corresponding to the original image according to each combination of the target feature maps and each combination of the mapping feature maps may include:
  • a reconstructed image corresponding to the original image is generated according to the final feature map combination.
  • each target feature map combination and each mapping feature map combination is not limited, but the order of each feature map included in each feature map combination in the feature map combination remains unchanged.
  • a final feature map combination containing a large number of feature maps can be obtained, and then a reconstructed image corresponding to the original image is generated based on the final feature map combination.
  • arranging each of the target feature map combinations and each of the mapping feature map combinations in a specified order to obtain a final feature map combination may include:
  • Each of the target feature map combinations is arranged at both ends of the final feature map combination, and each of the mapping feature map combinations is arranged between two ends of the final feature map combination.
  • each target feature map combination can be arranged at both ends, and each mapping feature map combination can be arranged in the middle. For example, if there are 2 target feature map combinations, one of the target feature map combinations can be copied as the head end of the final feature map combination, and the other target feature map combination can be copied as the tail end of the final feature map combination.
  • the two target feature map combinations obtained by performing feature mapping on the two target feature map combinations are arranged between the first and last ends of the final feature map combination.
  • generating the reconstructed image corresponding to the original image according to the final feature map combination may include:
  • Deconvolution processing is performed on the feature maps in the final feature map combination, and then the feature maps after the deconvolution processing are fused to obtain a reconstructed image corresponding to the original image.
  • the feature map in the final feature map combination can be input into the deconvolution layer for processing, and the dimension of the feature map can be increased, so that the processed result is consistent with the dimension of the reconstructed image.
  • the above steps 310-312 belong to the processing of performing feature mapping on the feature map, and a schematic diagram of the corresponding processing is shown in FIG. 4 .
  • the multiple target feature maps are divided into 2 target feature map combinations, and after the convolution processing of the 3*3 convolution kernel, one of the target feature map combinations is copied as the head of the final feature map combination. Copy another target feature map combination as the tail end of the final feature map combination; in addition, perform feature mapping processing on the two target feature map combinations respectively, and the obtained 2 mapped feature map combinations are inserted into the final feature map combination between the head and tail ends.
  • image reconstruction can be done based on this final feature map combination.
  • the embodiment of the present application Compared with the method of initializing more convolution kernels to perform convolution operations to obtain a greater number of feature maps, the embodiment of the present application generates a greater number of feature maps by performing feature mapping on the original feature maps, which can avoid The complex convolution operation effectively reduces the amount of calculation and improves the processing speed of the algorithm.
  • a feature map is used to generate a larger number of feature maps, so as to obtain more feature maps under the premise of lower computational cost. Can improve the performance of deep neural networks used for image reconstruction.
  • an embodiment of an image reconstruction apparatus in an embodiment of the present application includes:
  • An original image acquisition module 501 configured to acquire an original image to be reconstructed
  • Feature extraction module 502 for extracting the initial feature map of the original image
  • Row vector building module 503 for calculating the average value of the element values of each column of pixels in the initial feature map respectively, and constructing a target row vector according to the obtained average value corresponding to each column of pixels;
  • Column vector construction module 504 for calculating the average value of the element values of each row of pixels in the initial feature map respectively, and constructing a target column vector according to the average value corresponding to each row of pixels obtained;
  • Row vector copying module 505 for performing one-dimensional convolution processing on the target row vector, and copying the target row vector after the one-dimensional convolution processing in the column direction to obtain a first feature map
  • Column vector copying module 506 for performing one-dimensional convolution processing on the target column vector, and copying the target column vector after the one-dimensional convolution processing in the row direction to obtain a second feature map;
  • a feature fusion module 507 configured to fuse the first feature map and the second feature map to obtain a third feature map
  • a two-dimensional convolution module 508, configured to perform two-dimensional convolution processing on the third feature map to obtain a fourth feature map
  • the image reconstruction module 509 is configured to generate a reconstructed image corresponding to the original image according to the fourth feature map.
  • the image reconstruction module may include:
  • a convolution processing unit configured to perform convolution processing with a preset number of convolution kernels on the fourth feature map to obtain multiple target feature maps
  • a feature map dividing unit configured to divide the multiple target feature maps into two or more target feature map combinations, each of the target feature map combinations comprising more than two target feature maps;
  • the feature mapping unit is used to perform two-dimensional convolution processing on each target feature map in the target feature map combination for each target feature map combination, and then generate a combination with the target feature map by means of feature mapping
  • the corresponding mapping feature map combination, the mapping feature map combination includes the mapping feature map obtained after each target feature map in the target feature map combination is processed by a preset mapping function;
  • An image reconstruction unit configured to generate a reconstructed image corresponding to the original image according to each combination of the target feature maps and each combination of the mapping feature maps.
  • the image reconstruction unit may include:
  • the feature map combination arrangement subunit is used for arranging each of the target feature map combinations and each of the mapping feature map combinations in a specified order to obtain a final feature map combination;
  • An image reconstruction subunit configured to generate a reconstructed image corresponding to the original image according to the final feature map combination.
  • the feature map combination and arrangement subunit may be used to: arrange each of the target feature map combinations on both ends of the final feature map combination, and arrange each of the mapped feature map combinations on the final feature map. between the two ends of the graph combination.
  • the image reconstruction subunit can be used to: perform deconvolution processing on the feature maps in the final feature map combination, and then fuse the feature maps after the deconvolution processing to obtain the corresponding feature maps of the original image. Rebuild the image.
  • the feature mapping unit can be used to: use a preset linear function as a mapping function, respectively perform feature mapping processing on each target feature map in the target feature map combination, and obtain each target feature map combination in the target feature map combination.
  • the corresponding mapping feature maps of each target feature map can be used to: use a preset linear function as a mapping function, respectively perform feature mapping processing on each target feature map in the target feature map combination, and obtain each target feature map combination in the target feature map combination.
  • the corresponding mapping feature maps of each target feature map can be used to: use a preset linear function as a mapping function, respectively perform feature mapping processing on each target feature map in the target feature map combination, and obtain each target feature map combination in the target feature map combination.
  • the corresponding mapping feature maps of each target feature map can be used to: use a preset linear function as a mapping function, respectively perform feature mapping processing on each target feature map in the target feature map combination, and obtain each target feature map combination in the target feature map combination.
  • the corresponding mapping feature maps of each target feature map can be
  • the feature fusion module may be configured to: perform a process of summing corresponding position elements on the first feature map and the second feature map to obtain the third feature map.
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any one of the image reconstruction methods shown in FIG. 1 or FIG. 3 is implemented .
  • Embodiments of the present application further provide a computer program product, which, when the computer program product runs on a terminal device, enables the terminal device to execute any image reconstruction method as shown in FIG. 1 or FIG. 3 .
  • FIG. 6 is a schematic diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device 6 in this embodiment includes: a processor 60 , a memory 61 , and a computer program 62 stored in the memory 61 and running on the processor 60 .
  • the processor 60 executes the computer program 62
  • the steps in the above embodiments of the image reconstruction methods are implemented, for example, steps 101 to 109 shown in FIG. 1 .
  • the processor 60 executes the computer program 62
  • the functions of the modules/units in the foregoing device embodiments, for example, the functions of the modules 501 to 509 shown in FIG. 5 are implemented.
  • the computer program 62 may be divided into one or more modules/units, which are stored in the memory 61 and executed by the processor 60 to complete the present application.
  • the one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 62 in the terminal device 6 .
  • the so-called processor 60 may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuits) Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 61 may be an internal storage unit of the terminal device 6 , such as a hard disk or a memory of the terminal device 6 .
  • the memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) equipped on the terminal device 6 card, Flash Card, etc.
  • the memory 61 may also include both an internal storage unit of the terminal device 6 and an external storage device.
  • the memory 61 is used to store the computer program and other programs and data required by the terminal device.
  • the memory 61 can also be used to temporarily store data that has been output or will be output.
  • the disclosed apparatus and method may be implemented in other manners.
  • the system embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be Incorporation may either be integrated into another system, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the present application can implement all or part of the processes in the methods of the above embodiments, and can also be completed by instructing the relevant hardware through a computer program.
  • the computer program can be stored in a computer-readable storage medium, and the computer When the program is executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, removable hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electric carrier signal telecommunication signal and software distribution medium, etc.
  • the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Excluded are electrical carrier signals and telecommunication signals.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本申请涉及图像处理技术领域,提出一种图像重建方法、装置、终端设备和存储介质。该方法首先提取原始图像的初始特征图,然后分别计算该初始特征图中每一列像素的元素值的平均值,并根据该平均值构建目标行向量,在对该目标行向量执行一维卷积处理后于列方向上对其进行复制,得到一个特征图;以及,分别计算该初始特征图中每一行像素的元素值的平均值,并根据该平均值构建目标列向量,在对该目标列向量执行一维卷积处理后于行方向上对其进行复制,得到另一个特征图,接着将两个特征图融合;最后,对融合的特征图执行二维卷积处理,并基于该融合的特征图生成重建的图像。通过这样设置,能够捕获图像的远距离依赖关系。

Description

一种图像重建方法、装置、终端设备和存储介质 技术领域
本申请涉及图像处理技术领域,尤其涉及一种图像重建方法、装置、终端设备和存储介质。
背景技术
目前,深度学习已经成为图像重建的常用技术手段,现有的基于深度学习的图像重建方法主要可以分为两类,一类是基于展开的方法,从优化图像的问题出发然后把一个优化算法展开到神经网络里,该神经网络的架构是基于迭代构建的;另一类是非展开的方法,直接学习零填充数据到全采样数据的映射,以完成图像的重建。然而,这两类方法均无法捕获特征图像中内容存在联系的不同图像区域之间的相互依赖关系,也即无法捕获图像的远距离依赖关系。
技术问题
有鉴于此,本申请实施例提供了一种图像重建方法、装置、终端设备和存储介质,能够捕获图像的远距离依赖关系。
技术解决方案
本申请实施例的第一方面提供了一种图像重建方法,包括:
获取待重建的原始图像;
提取所述原始图像的初始特征图;
分别计算所述初始特征图中每一列像素的元素值的平均值,并根据获得的各列像素对应的平均值构建目标行向量;
分别计算所述初始特征图中每一行像素的元素值的平均值,并根据获得的各行像素对应的平均值构建目标列向量;
对所述目标行向量执行一维卷积处理,并在列方向上对一维卷积处理后的所述目标行向量进行复制,得到第一特征图;
对所述目标列向量执行一维卷积处理,并在行方向上对一维卷积处理后的所述目标列向量进行复制,得到第二特征图;
将所述第一特征图和所述第二特征图融合,得到第三特征图;
对所述第三特征图执行二维卷积处理,得到第四特征图;
根据所述第四特征图生成所述原始图像对应的重建图像。
在本申请实施例中,首先提取原始图像的初始特征图,然后分别计算该初始特征图中每一列像素的元素值的平均值,并根据该平均值构建目标行向量,在对该目标行向量执行一维卷积处理后于列方向上对其进行复制,得到一个特征图;以及,分别计算该初始特征图中每一行像素的元素值的平均值,并根据该平均值构建目标列向量,在对该目标列向量执行一维卷积处理后于行方向上对其进行复制,得到另一个特征图,接着将两个特征图融合;最后,在对融合的特征图执行二维卷积处理后,基于该融合的特征图生成重建的图像。上述过程采用的是一种交叉池化的方法,相当于沿着一个空间维度部署一个长条形状(特征图的一行或者一列)的池化核,在特征计算时能够用到的像素范围更广,因此能够捕获图像的远距离依赖关系。
在本申请的一个实施例中,所述根据所述第四特征图生成所述原始图像对应的重建图像,可以包括:
对所述第四特征图执行预设卷积核数量的卷积处理,得到多张目标特征图;
将所述多张目标特征图划分为两个以上的目标特征图组合,每个所述目标特征图组合包含两张以上的所述目标特征图;
针对每个所述目标特征图组合,对该目标特征图组合中的每张目标特征图分别执行二维卷积处理,然后采用特征映射的方式生成与该目标特征图组合对应的映射特征图组合,该映射特征图组合包含该目标特征图组合中每张目标特征图各自经预设的映射函数处理后获得的映射特征图;
根据各个所述目标特征图组合和各个所述映射特征图组合,生成所述原始图像对应的重建图像。
通过采用特征映射的方式,可以实现在较低计算量的前提下获得更多的特征图,提高图像重建使用的深度神经网络的性能。
进一步的,所述根据各个所述目标特征图组合和各个所述映射特征图组合,生成所述原始图像对应的重建图像,可以包括:
将各个所述目标特征图组合和各个所述映射特征图组合按照指定顺序排列,得到最终特征图组合;
根据所述最终特征图组合生成所述原始图像对应的重建图像。
通过排序,可以获得一个包含大量特征图的最终特征图组合,然后基于该最终特征图组合生成该原始图像对应的重建图像。
进一步的,所述将各个所述目标特征图组合和各个所述映射特征图组合按照指定顺序排列,得到最终特征图组合,可以包括:
将各个所述目标特征图组合排列在所述最终特征图组合的两端,且将各个所述映射特征图组合排列在所述最终特征图组合的两端之间。
在排列特征图组合时,可以将各个目标特征图组合排列在两端,将各个映射特征图组合排列在中间。
进一步的,所述根据所述最终特征图组合生成所述原始图像对应的重建图像,可以包括:
对所述最终特征图组合中的特征图执行反卷积处理,然后将反卷积处理后的特征图融合,得到所述原始图像对应的重建图像。
在生成重建的图像时,可以将该最终特征图组合中的特征图输入反卷积层进行处理,对特征图进行升维,使得处理后的结果和重建的图像的维度大小一致,同时可以通过将输入通道数设置为重建图像的通道数来将所有的特征图融合,从而得到最终的重建图像。
进一步的,所述采用特征映射的方式生成与该目标特征图组合对应的映射特征图组合,可以包括:
以预设的线性函数作为映射函数,对该目标特征图组合中的每张目标特征图分别执行特征映射处理,得到该目标特征图组合中的每张目标特征图各自对应的映射特征图。
通过采用线性函数作为映射函数,可以进一步减少特征映射过程的计算量。
在本申请的一个实施例中,所述将所述第一特征图和所述第二特征图融合,得到第三特征图,可以包括:
对所述第一特征图和所述第二特征图执行对应位置元素求和的处理,得到所述第三特征图。
为了减少计算量,在融合两个特征图时,可以采用对应位置元素求和的方式。
本申请实施例的第二方面提供了一种图像重建装置,包括:
原始图像获取模块,用于获取待重建的原始图像;
特征提取模块,用于提取所述原始图像的初始特征图;
行向量构建模块,用于分别计算所述初始特征图中每一列像素的元素值的平均值,并根据获得的各列像素对应的平均值构建目标行向量;
列向量构建模块,用于分别计算所述初始特征图中每一行像素的元素值的平均值,并根据获得的各行像素对应的平均值构建目标列向量;
行向量复制模块,用于对所述目标行向量执行一维卷积处理,并在列方向上对一维卷积处理后的所述目标行向量进行复制,得到第一特征图;
列向量复制模块,用于对所述目标列向量执行一维卷积处理,并在行方向上对一维卷积处理后的所述目标列向量进行复制,得到第二特征图;
特征融合模块,用于将所述第一特征图和所述第二特征图融合,得到第三特征图;
二维卷积模块,用于对所述第三特征图执行二维卷积处理,得到第四特征图;
图像重建模块,用于根据所述第四特征图生成所述原始图像对应的重建图像。
本申请实施例的第三方面提供了一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如本申请实施例的第一方面提供的图像重建方法。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如本申请实施例的第一方面提供的图像重建方法。
本申请实施例的第五方面提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行本申请实施例的第一方面所述的图像重建方法。
可以理解的是,上述第二方面至第五方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。
附图说明
图1是本申请实施例提供的一种图像重建方法的一个实施例的流程图;
图2是本申请实施例提供的对特征图进行交叉池化操作的处理示意图;
图3是本申请实施例提供的另一种图像重建方法的一个实施例的流程图;
图4是本申请实施例提供的对特征图进行特征映射操作的处理示意图;
图5是本申请实施例提供的一种图像重建装置的一个实施例的结构图;
图6是本申请实施例提供的一种终端设备的示意图。
本发明的实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
本申请提出一种图像重建方法、装置、终端设备和存储介质,能够解决在重建图像时无法捕获图像的远距离依赖关系的问题。应当理解,本申请各个方法实施例的执行主体为各种类型的终端设备或服务器,比如手机、平板电脑、笔记本电脑、台式电脑和可穿戴设备等。
请参阅图1,示出了本申请实施例提供的一种图像重建方法,包括:
101、获取待重建的原始图像;
首先,获取待重建的原始图像。该原始图像可以是一幅模糊的图像,需要重建出与其对应的清晰图像。
102、提取所述原始图像的初始特征图;
在获取原始图像之后,需要提取该原始图像的特征图。例如,可以采用现有技术中的各类特征提取网络,对该原始图像执行卷积等处理,以提取对应的特征图像,作为本申请实施例中的初始特征图。需要说明的是,本申请不对该特征提取网络的结构和类型进行任何限制。
103、分别计算所述初始特征图中每一列像素的元素值的平均值,并根据获得的各列像素对应的平均值构建目标行向量;
在提取初始特征图之后,分别计算该初始特征图中每一列像素的元素值的平均值,例如,针对该初始特征图中的第一列像素,将该列的所有像素的元素值相加然后计算平均值,得到第一列像素对应的平均值,以此类推,针对该初始特征图的每一列像素都执行相同的操作,从而得到每一列像素分别对应的平均值。接着,根据获得的每一列像素分别对应的平均值构建一个目标行向量,该目标行向量的元素个数等于该初始特征图的列数量,且每个元素值分别为对应列的元素值的平均值,也即将每一列像素分别对应的平均值合并起来成为一个行向量。
104、分别计算所述初始特征图中每一行像素的元素值的平均值,并根据获得的各行像素对应的平均值构建目标列向量;
和构建目标行向量的方法类似,在构建目标列向量时,分别计算该初始特征图中每一行像素的元素值的平均值,例如,针对该初始特征图中的第一行像素,将该行的所有像素的元素值相加然后计算平均值,得到第一行像素对应的平均值,以此类推,针对该初始特征图的每一行像素都执行相同的操作,从而得到每一行像素分别对应的平均值。接着,根据获得的每一行像素分别对应的平均值构建一个目标列向量,该目标列向量的元素个数等于该初始特征图的行数量,且每个元素值分别为对应行的元素值的平均值,也即将每一行像素分别对应的平均值合并起来成为一个列向量。
105、对所述目标行向量执行一维卷积处理,并在列方向上对一维卷积处理后的所述目标行向量进行复制,得到第一特征图;
对于获得的目标行向量,首先对其执行一维的卷积处理,例如可以采用卷积核为3的1D卷积,然后在列方向上对一维卷积处理后的该目标行向量进行复制,得到第一特征图。一般的,复制目标行向量获得的第一特征图的尺寸(行数和列数)可以和该初始特征图的尺寸相同。
106、对所述目标列向量执行一维卷积处理,并在行方向上对一维卷积处理后的所述目标列向量进行复制,得到第二特征图;
类似的,对于获得的目标列向量,同样先对其执行一维的卷积处理,例如可以采用卷积核为3的1D卷积,然后在行方向上对一维卷积处理后的该目标列向量进行复制,得到第二特征图。一般的,复制目标列向量获得的第二特征图的尺寸(行数和列数)也可以和该初始特征图的尺寸相同。
107、将所述第一特征图和所述第二特征图融合,得到第三特征图;
然后,将该第一特征图和第二特征图融合,融合的方式可以包括对应位置元素叠加、对应位置元素取最大值、对应位置元素取平均值等,从而得到一个尺寸相同的第三特征图。
在本申请的一种实现方式中,所述将所述第一特征图和所述第二特征图融合,得到第三特征图,可以包括:
对所述第一特征图和所述第二特征图执行对应位置元素求和的处理,得到所述第三特征图。
为了减少计算量,在融合两个特征图时,可以采用对应位置元素求和的方式。例如,第一特征图的第一行、第一列的元素与第二特征图的第一行、第一列的元素求和,从而得到第三特征图的第一行、第一列的元素;第一特征图的第一行、第二列的元素与第二特征图的第一行、第二列的元素求和,从而得到第三特征图的第一行、第二列的元素,以此类推。
108、对所述第三特征图执行二维卷积处理,得到第四特征图;
接着,对融合获得的第三特征图执行二维的卷积处理,例如可以采用卷积核为3的2D卷积,从而得到第四特征图。
上述步骤103-108可以概括为交叉池化的操作,相应的处理示意图如图2所示。在图2中,首先提取初始特征图中每一列像素的元素值的平均值,构建成目标行向量,以及提取初始特征图中每一行像素的元素值的平均值,构建成目标列向量;然后,分别对目标行向量和目标列向量执行一维卷积处理,将目标行向量在列方向上进行复制,得到第一特征图,以及将目标列向量在行方向上进行复制,得到第二特征图;接着,将第一特征图和第二特征图叠加,得到第三特征图,再经过二维卷积处理后,得到第四特征图。
对于常规的图像重建网络,其采用的池化层的池化核的大小通常是2*2,通过不断地在整个原始特征图上滑动该池化核从而得到输出的特征图,这样进行计算时融合的特征都是很窄的像素范围内的特征,故无法捕捉图像的远距离依赖关系。针对这个问题,本申请实施例采用交叉池化层来替换常规的池化层,相应的池化核的大小与特征图像的一行或者一列相同,因此进行计算时融合的特征的像素范围较广,能够充分捕捉图像的远距离依赖关系。
109、根据所述第四特征图生成所述原始图像对应的重建图像。
最后,对该第四特征图执行反卷积、上采样等图像重建过程中常用的扩充处理后,可以得到该原始图像对应的重建图像。
在本申请实施例中,首先提取原始图像的初始特征图,然后分别计算该初始特征图中每一列像素的元素值的平均值,并根据该平均值构建目标行向量,在对该目标行向量执行一维卷积处理后于列方向上对其进行复制,得到一个特征图;以及,分别计算该初始特征图中每一行像素的元素值的平均值,并根据该平均值构建目标列向量,在对该目标列向量执行一维卷积处理后于行方向上对其进行复制,得到另一个特征图,接着将两个特征图融合;最后,在对融合的特征图执行二维卷积处理后,基于该融合的特征图生成重建的图像。上述过程采用的是一种交叉池化的方法,相当于沿着一个空间维度部署一个长条形状(特征图的一行或者一列)的池化核,在特征计算时能够用到的像素范围更广,因此能够捕获图像的远距离依赖关系。
请参阅图3,示出了本申请实施例提供的另一种图像重建方法,包括:
301、获取待重建的原始图像;
302、提取所述原始图像的初始特征图;
303、分别计算所述初始特征图中每一列像素的元素值的平均值,并根据获得的各列像素对应的平均值构建目标行向量;
304、分别计算所述初始特征图中每一行像素的元素值的平均值,并根据获得的各行像素对应的平均值构建目标列向量;
305、对所述目标行向量执行一维卷积处理,并在列方向上对一维卷积处理后的所述目标行向量进行复制,得到第一特征图;
306、对所述目标列向量执行一维卷积处理,并在行方向上对一维卷积处理后的所述目标列向量进行复制,得到第二特征图;
307、将所述第一特征图和所述第二特征图融合,得到第三特征图;
308、对所述第三特征图执行二维卷积处理,得到第四特征图;
步骤301-308与步骤101-108相同,具体可以参照步骤101-108的相关说明。
309、对所述第四特征图执行预设卷积核数量的卷积处理,得到多张目标特征图;
在深度学习中,特征图的丰富程度很重要,为了提高深度神经网络的性能以及图像重建的效果,往往需要获得更多数量的特征图。因此,在获得第四特征图后,可以采用如步骤309至311的方式增加获得的特征图的数量。通过设置一定数量卷积核的卷积层对该第四特征图进行处理,可以得到多张不同的目标特征图。
310、将所述多张目标特征图划分为两个以上的目标特征图组合,每个所述目标特征图组合包含两张以上的所述目标特征图;
在获得多张目标特征图后,对这些目标特征图进行分组,得到两个以上的目标特征图组合,其中每个目标特征图组合包含两张以上的目标特征图。需要说明的是,不同的目标特征图组合包含的目标特征图的数量可以相同,也可以不同,对目标特征图进行分组的方式可以采用随机分组、按照特定顺序进行分组等方式,本申请对此不作限定。
311、针对每个所述目标特征图组合,对该目标特征图组合中的每张目标特征图分别执行二维卷积处理,然后采用特征映射的方式生成与该目标特征图组合对应的映射特征图组合,该映射特征图组合包含该目标特征图组合中每张目标特征图各自经预设的映射函数处理后获得的映射特征图;
在对目标特征图分组后,对每个目标特征图组合中的所有目标特征图执行二维卷积处理,例如可以执行卷积核为3*3的卷积处理,然后采用特征映射的方式生成每个目标特征图组合分别对应的映射特征图组合。具体的,某个映射特征图组合中包含的每张映射特征图是由对应的目标特征图组合中包含的每张目标特征图各自经映射函数处理后获得的。例如,某个目标特征图组合A包含目标特征图1、目标特征图2和目标特征图3总共3张目标特征图,则采用某个预设的映射函数f(x)对目标特征图1进行处理,得到映射特征图1;采用f(x)对目标特征图2进行处理,得到映射特征图2;采用f(x)对目标特征图3进行处理,得到映射特征图3,那么最终获得的与目标特征图组合A对应的映射特征图组合由映射特征图1、映射特征图2和映射特征图3组成。
进一步的,所述采用特征映射的方式生成与该目标特征图组合对应的映射特征图组合,可以包括:
以预设的线性函数作为映射函数,对该目标特征图组合中的每张目标特征图分别执行特征映射处理,得到该目标特征图组合中的每张目标特征图各自对应的映射特征图。
为了减少特征映射过程的计算量,可以采用线性函数作为映射函数。例如,可以采用线性函数f(x)=a*x+b作为映射函数,其中x为输入的一幅目标特征图,a、b都是人工预设且和x的尺寸相同的矩阵。在运算时,a和x做矩阵对应位置相乘处理,然后再加上矩阵b中的元素,从而得到输出的映射特征图f(x)。
312、根据各个所述目标特征图组合和各个所述映射特征图组合,生成所述原始图像对应的重建图像。
通过采用特征映射的方式,可以生成更多数量的特征图,即上述的各个映射特征图组合。接下来,可以根据原始的目标特征图组合和生成的映射特征图组合生成与该原始图像对应的重建图像。
在本申请的一种实现方式中,所述根据各个所述目标特征图组合和各个所述映射特征图组合,生成所述原始图像对应的重建图像,可以包括:
将各个所述目标特征图组合和各个所述映射特征图组合按照指定顺序排列,得到最终特征图组合;
根据所述最终特征图组合生成所述原始图像对应的重建图像。
在排列特征图组合时,各个目标特征图组合和各个映射特征图组合的顺序没有限制,但每个特征图组合中包含的各个特征图在该特征图组合中的排序保持不变。通过排序,可以获得一个包含大量特征图的最终特征图组合,然后基于该最终特征图组合生成该原始图像对应的重建图像。
进一步的,所述将各个所述目标特征图组合和各个所述映射特征图组合按照指定顺序排列,得到最终特征图组合,可以包括:
将各个所述目标特征图组合排列在所述最终特征图组合的两端,且将各个所述映射特征图组合排列在所述最终特征图组合的两端之间。
在排列特征图组合时,可以将各个目标特征图组合排列在两端,将各个映射特征图组合排列在中间。例如,若有2个目标特征图组合,则可以将其中一个目标特征图组合复制为最终特征图组合的首端,将另一个目标特征图组合复制为最终特征图组合的尾端,而通过对该2个目标特征图组合进行特征映射获得的2个映射特征图组合则排布在该最终特征图组合的首尾两端之间。
进一步的,所述根据所述最终特征图组合生成所述原始图像对应的重建图像,可以包括:
对所述最终特征图组合中的特征图执行反卷积处理,然后将反卷积处理后的特征图融合,得到所述原始图像对应的重建图像。
在生成重建的图像时,可以将该最终特征图组合中的特征图输入反卷积层进行处理,对特征图进行升维,使得处理后的结果和重建的图像的维度大小一致,同时可以通过将输入通道数设置为重建图像的通道数来将所有的特征图融合,从而得到最终的重建图像。
上述步骤310-312属于对特征图进行特征映射的处理,对应的处理示意图如图4所示。在图4中,将多张目标特征图划分为2个目标特征图组合,经过3*3卷积核的卷积处理后,将其中一个目标特征图组合复制作为最终特征图组合的首端,将另一个目标特征图组合复制为最终特征图组合的尾端;另外,对该2个目标特征图组合分别执行特征映射的处理,得到的2个映射特征图组合则插入到该最终特征图组合的首尾两端之间。最后,可以基于该最终特征图组合完成图像的重建。与初始化更多的卷积核执行卷积运算以获得更多数量特征图的方式相比,本申请实施例通过对原有的特征图执行特征映射的方式生成更多数量的特征图,能够避免复杂的卷积运算,有效降低了计算量,提升算法处理速度。
本申请实施例在通过交叉池化的方式获得原始图像的特征图之后,会采用特征映射的方式生成更多数量的特征图,从而实现在较低计算量的前提下获得更多的特征图,可以提高图像重建使用的深度神经网络的性能。
应理解,上述各个实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
上面主要描述了一种图像重建方法,下面将对一种图像重建装置进行描述。
请参阅图5,本申请实施例中一种图像重建装置的一个实施例包括:
原始图像获取模块501,用于获取待重建的原始图像;
特征提取模块502,用于提取所述原始图像的初始特征图;
行向量构建模块503,用于分别计算所述初始特征图中每一列像素的元素值的平均值,并根据获得的各列像素对应的平均值构建目标行向量;
列向量构建模块504,用于分别计算所述初始特征图中每一行像素的元素值的平均值,并根据获得的各行像素对应的平均值构建目标列向量;
行向量复制模块505,用于对所述目标行向量执行一维卷积处理,并在列方向上对一维卷积处理后的所述目标行向量进行复制,得到第一特征图;
列向量复制模块506,用于对所述目标列向量执行一维卷积处理,并在行方向上对一维卷积处理后的所述目标列向量进行复制,得到第二特征图;
特征融合模块507,用于将所述第一特征图和所述第二特征图融合,得到第三特征图;
二维卷积模块508,用于对所述第三特征图执行二维卷积处理,得到第四特征图;
图像重建模块509,用于根据所述第四特征图生成所述原始图像对应的重建图像。
在本申请的一个实施例中,所述图像重建模块可以包括:
卷积处理单元,用于对所述第四特征图执行预设卷积核数量的卷积处理,得到多张目标特征图;
特征图划分单元,用于将所述多张目标特征图划分为两个以上的目标特征图组合,每个所述目标特征图组合包含两张以上的所述目标特征图;
特征映射单元,用于针对每个所述目标特征图组合,对该目标特征图组合中的每张目标特征图分别执行二维卷积处理,然后采用特征映射的方式生成与该目标特征图组合对应的映射特征图组合,该映射特征图组合包含该目标特征图组合中每张目标特征图各自经预设的映射函数处理后获得的映射特征图;
图像重建单元,用于根据各个所述目标特征图组合和各个所述映射特征图组合,生成所述原始图像对应的重建图像。
进一步的,所述图像重建单元可以包括:
特征图组合排列子单元,用于将各个所述目标特征图组合和各个所述映射特征图组合按照指定顺序排列,得到最终特征图组合;
图像重建子单元,用于根据所述最终特征图组合生成所述原始图像对应的重建图像。
进一步的,所述特征图组合排列子单元可以用于:将各个所述目标特征图组合排列在所述最终特征图组合的两端,且将各个所述映射特征图组合排列在所述最终特征图组合的两端之间。
更进一步的,所述图像重建子单元可以用于:对所述最终特征图组合中的特征图执行反卷积处理,然后将反卷积处理后的特征图融合,得到所述原始图像对应的重建图像。
进一步的,所述特征映射单元可以用于:以预设的线性函数作为映射函数,对该目标特征图组合中的每张目标特征图分别执行特征映射处理,得到该目标特征图组合中的每张目标特征图各自对应的映射特征图。
在本申请的一个实施例中,所述特征融合模块可以用于:对所述第一特征图和所述第二特征图执行对应位置元素求和的处理,得到所述第三特征图。
本申请实施例还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如图1或图3表示的任意一种图像重建方法。
本申请实施例还提供一种计算机程序产品,当该计算机程序产品在终端设备上运行时,使得终端设备执行实现如图1或图3表示的任意一种图像重建方法。
图6是本申请一实施例提供的终端设备的示意图。如图6所示,该实施例的终端设备6包括:处理器60、存储器61以及存储在所述存储器61中并可在所述处理器60上运行的计算机程序62。所述处理器60执行所述计算机程序62时实现上述各个图像重建方法的实施例中的步骤,例如图1所示的步骤101至109。或者,所述处理器60执行所述计算机程序62时实现上述各装置实施例中各模块/单元的功能,例如图5所示模块501至509的功能。
所述计算机程序62可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器61中,并由所述处理器60执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序62在所述终端设备6中的执行过程。
所称处理器60可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器61可以是所述终端设备6的内部存储单元,例如终端设备6的硬盘或内存。所述存储器61也可以是所述终端设备6的外部存储设备,例如所述终端设备6上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器61还可以既包括所述终端设备6的内部存储单元也包括外部存储设备。所述存储器61用于存储所述计算机程序以及所述终端设备所需的其他程序和数据。所述存储器61还可以用于暂时地存储已经输出或者将要输出的数据。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (10)

  1. 一种图像重建方法,其特征在于,包括:
    获取待重建的原始图像;
    提取所述原始图像的初始特征图;
    分别计算所述初始特征图中每一列像素的元素值的平均值,并根据获得的各列像素对应的平均值构建目标行向量;
    分别计算所述初始特征图中每一行像素的元素值的平均值,并根据获得的各行像素对应的平均值构建目标列向量;
    对所述目标行向量执行一维卷积处理,并在列方向上对一维卷积处理后的所述目标行向量进行复制,得到第一特征图;
    对所述目标列向量执行一维卷积处理,并在行方向上对一维卷积处理后的所述目标列向量进行复制,得到第二特征图;
    将所述第一特征图和所述第二特征图融合,得到第三特征图;
    对所述第三特征图执行二维卷积处理,得到第四特征图;
    根据所述第四特征图生成所述原始图像对应的重建图像。
  2. 如权利要求1所述的方法,其特征在于,所述根据所述第四特征图生成所述原始图像对应的重建图像,包括:
    对所述第四特征图执行预设卷积核数量的卷积处理,得到多张目标特征图;
    将所述多张目标特征图划分为两个以上的目标特征图组合,每个所述目标特征图组合包含两张以上的所述目标特征图;
    针对每个所述目标特征图组合,对该目标特征图组合中的每张目标特征图分别执行二维卷积处理,然后采用特征映射的方式生成与该目标特征图组合对应的映射特征图组合,该映射特征图组合包含该目标特征图组合中每张目标特征图各自经预设的映射函数处理后获得的映射特征图;
    根据各个所述目标特征图组合和各个所述映射特征图组合,生成所述原始图像对应的重建图像。
  3. 如权利要求2所述的方法,其特征在于,所述根据各个所述目标特征图组合和各个所述映射特征图组合,生成所述原始图像对应的重建图像,包括:
    将各个所述目标特征图组合和各个所述映射特征图组合按照指定顺序排列,得到最终特征图组合;
    根据所述最终特征图组合生成所述原始图像对应的重建图像。
  4. 如权利要求3所述的方法,其特征在于,所述将各个所述目标特征图组合和各个所述映射特征图组合按照指定顺序排列,得到最终特征图组合,包括:
    将各个所述目标特征图组合排列在所述最终特征图组合的两端,且将各个所述映射特征图组合排列在所述最终特征图组合的两端之间。
  5. 如权利要求3所述的方法,其特征在于,所述根据所述最终特征图组合生成所述原始图像对应的重建图像,包括:
    对所述最终特征图组合中的特征图执行反卷积处理,然后将反卷积处理后的特征图融合,得到所述原始图像对应的重建图像。
  6. 如权利要求2所述的方法,其特征在于,所述采用特征映射的方式生成与该目标特征图组合对应的映射特征图组合,包括:
    以预设的线性函数作为映射函数,对该目标特征图组合中的每张目标特征图分别执行特征映射处理,得到该目标特征图组合中的每张目标特征图各自对应的映射特征图。
  7. 如权利要求1至6中任一项所述的方法,其特征在于,所述将所述第一特征图和所述第二特征图融合,得到第三特征图,包括:
    对所述第一特征图和所述第二特征图执行对应位置元素求和的处理,得到所述第三特征图。
  8. 一种图像重建装置,其特征在于,包括:
    原始图像获取模块,用于获取待重建的原始图像;
    特征提取模块,用于提取所述原始图像的初始特征图;
    行向量构建模块,用于分别计算所述初始特征图中每一列像素的元素值的平均值,并根据获得的各列像素对应的平均值构建目标行向量;
    列向量构建模块,用于分别计算所述初始特征图中每一行像素的元素值的平均值,并根据获得的各行像素对应的平均值构建目标列向量;
    行向量复制模块,用于对所述目标行向量执行一维卷积处理,并在列方向上对一维卷积处理后的所述目标行向量进行复制,得到第一特征图;
    列向量复制模块,用于对所述目标列向量执行一维卷积处理,并在行方向上对一维卷积处理后的所述目标列向量进行复制,得到第二特征图;
    特征融合模块,用于将所述第一特征图和所述第二特征图融合,得到第三特征图;
    二维卷积模块,用于对所述第三特征图执行二维卷积处理,得到第四特征图;
    图像重建模块,用于根据所述第四特征图生成所述原始图像对应的重建图像。
  9. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至7中任一项所述的图像重建方法。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至7中任一项所述的图像重建方法。
PCT/CN2021/088049 2021-04-19 2021-04-19 一种图像重建方法、装置、终端设备和存储介质 Ceased WO2022221982A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US18/555,723 US12524837B2 (en) 2021-04-19 2021-04-19 Image reconstruction method and apparatus, terminal device, and storage medium
PCT/CN2021/088049 WO2022221982A1 (zh) 2021-04-19 2021-04-19 一种图像重建方法、装置、终端设备和存储介质

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/088049 WO2022221982A1 (zh) 2021-04-19 2021-04-19 一种图像重建方法、装置、终端设备和存储介质

Publications (1)

Publication Number Publication Date
WO2022221982A1 true WO2022221982A1 (zh) 2022-10-27

Family

ID=83723615

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/088049 Ceased WO2022221982A1 (zh) 2021-04-19 2021-04-19 一种图像重建方法、装置、终端设备和存储介质

Country Status (2)

Country Link
US (1) US12524837B2 (zh)
WO (1) WO2022221982A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116188577A (zh) * 2023-02-08 2023-05-30 未来机器人(深圳)有限公司 托盘位姿检测方法及装置、设备、存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113837970B (zh) * 2021-09-30 2024-04-26 北京地平线信息技术有限公司 图像数据的脱敏方法和装置

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109685968A (zh) * 2018-12-15 2019-04-26 西安建筑科技大学 一种基于卷积神经网络的纸币图像缺陷的识别模型构建以及识别方法
CN110728627A (zh) * 2018-07-16 2020-01-24 宁波舜宇光电信息有限公司 图像降噪方法、装置、系统和存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109978886B (zh) * 2019-04-01 2021-11-09 北京市商汤科技开发有限公司 图像处理方法及装置、电子设备和存储介质
US11893710B2 (en) * 2020-11-16 2024-02-06 Boe Technology Group Co., Ltd. Image reconstruction method, electronic device and computer-readable storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110728627A (zh) * 2018-07-16 2020-01-24 宁波舜宇光电信息有限公司 图像降噪方法、装置、系统和存储介质
CN109685968A (zh) * 2018-12-15 2019-04-26 西安建筑科技大学 一种基于卷积神经网络的纸币图像缺陷的识别模型构建以及识别方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HOU QIBIN; ZHANG LI; CHENG MING-MING; FENG JIASHI: "Strip Pooling: Rethinking Spatial Pooling for Scene Parsing", 2020 IEEE/CVF CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION (CVPR), IEEE, 13 June 2020 (2020-06-13), pages 4002 - 4011, XP033805470, DOI: 10.1109/CVPR42600.2020.00406 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116188577A (zh) * 2023-02-08 2023-05-30 未来机器人(深圳)有限公司 托盘位姿检测方法及装置、设备、存储介质

Also Published As

Publication number Publication date
US20240202873A1 (en) 2024-06-20
US12524837B2 (en) 2026-01-13

Similar Documents

Publication Publication Date Title
CN111476719B (zh) 图像处理方法、装置、计算机设备及存储介质
CN109146788B (zh) 基于深度学习的超分辨率图像重建方法和装置
CN110544214A (zh) 一种图像修复方法、装置及电子设备
WO2021164269A1 (zh) 基于注意力机制的视差图获取方法和装置
CN111353956A (zh) 图像修复方法、装置、计算机设备及存储介质
CN110781923A (zh) 特征提取方法及装置
WO2022217496A1 (zh) 影像数据质量评估方法、装置、终端设备及可读存储介质
CN116993592A (zh) 一种图像超分辨率重建模型的构建方法、装置及应用
CN113129212A (zh) 图像超分辨率重建方法、装置、终端设备及存储介质
CN113610704B (zh) 图像生成方法、装置、设备和可读存储介质
WO2022166258A1 (zh) 行为识别方法、装置、终端设备及计算机可读存储介质
CN110838085A (zh) 一种图像的超分辨率重建方法、装置及电子设备
US11636665B2 (en) Streaming image semantic segmentation method, logical integrated circuit system and electronic device
WO2022221982A1 (zh) 一种图像重建方法、装置、终端设备和存储介质
CN111709879B (zh) 图像处理方法、图像处理装置及终端设备
CN115456858B (zh) 图像处理方法、装置、计算机设备及计算机可读存储介质
JP7826519B2 (ja) 画像ノイズ低減処理方法、装置、デバイス、記憶媒体及びプログラム製品
CN111178513A (zh) 神经网络的卷积实现方法、卷积实现装置及终端设备
CN113111891B (zh) 一种图像重建方法、装置、终端设备和存储介质
CN113658320A (zh) 一种三维重建方法、人脸三维重建方法及其相关装置
CN119917700A (zh) 异构计算机中的索引方法、装置、设备、介质及产品
WO2019114044A1 (zh) 图像处理方法、装置、电子设备及计算机可读存储介质
CN113240720A (zh) 一种三维表面重建方法、装置、服务器以及可读存储介质
CN108961161B (zh) 一种图像数据处理方法、装置和计算机存储介质
CN115994858B (zh) 一种超分辨率图像重建方法及系统

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: 21937234

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 18555723

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21937234

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21937234

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 16.05.2024)

122 Ep: pct application non-entry in european phase

Ref document number: 21937234

Country of ref document: EP

Kind code of ref document: A1

WWG Wipo information: grant in national office

Ref document number: 18555723

Country of ref document: US