Image super-resolution reconstruction method, system, storage medium and electronic device

By combining low-resolution images, text information and noise prediction models, image super-resolution reconstruction is achieved, which solves the problem of poor reconstruction effects in the existing technology and improves the image reconstruction effect and intelligence.

CN118279152BActive Publication Date: 2024-10-15SHANGHAI MIDU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410704742.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-10-15
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

Image super-resolution reconstruction methods in the existing technology only rely on a single low-resolution image, resulting in poor reconstruction effects and unable to meet the needs of actual application scenarios.

Method used

By obtaining the training data set of the image super-resolution reconstruction model, including low-resolution images and text information, using text embedding vectors, speech embedding vectors and image embedding vectors, combined with the noise prediction model, iteratively calculates and updates the intermediate image embedding vector, and finally achieves Reconstruction of high-resolution images.

Benefits of technology

It effectively improves the image reconstruction effect and can realize super-resolution reconstruction of images based on text, speech and low-resolution images to meet the needs of different scenarios and is highly intelligent and practical.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118279152B_ABST
    Figure CN118279152B_ABST
Patent Text Reader

Abstract

The present invention provides an image super-resolution reconstruction method, system, storage medium and electronic device, the method comprising the following steps: obtaining a training data set of an image super-resolution reconstruction model; the training data set comprises low-resolution images and text information; training the image super-resolution reconstruction model based on the training data set, so as to realize image super-resolution reconstruction based on the trained image super-resolution reconstruction model. The image super-resolution reconstruction method, system, storage medium and electronic device of the present invention can realize image super-resolution reconstruction based on text, voice and low-resolution images, effectively improving the image reconstruction effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of deep learning, and in particular relates to an image super-resolution reconstruction method, system, storage medium and electronic device. Background Art

[0002] Super Resolution (SR) reconstruction refers to estimating images or video sequences with higher resolution (HR) from some blurred low resolution (LR) images or video sequences, while eliminating noise and blur caused by limited detector size and optical elements. It is an effective means to improve the resolution of degraded images or sequences. Deep learning has developed rapidly in the field of image processing in recent years, and its introduction has brought new development prospects for single image super resolution reconstruction.

[0003] However, the image super-resolution reconstruction method in the prior art only relies on a single low-resolution image, resulting in poor reconstruction effect and failing to meet the needs of actual application scenarios. Summary of the invention

[0004] In view of the shortcomings of the prior art mentioned above, the purpose of the present invention is to provide an image super-resolution reconstruction method, system, storage medium and electronic device, which can realize image super-resolution reconstruction based on text, voice and low-resolution images, thereby effectively improving the image reconstruction effect.

[0005] In a first aspect, the present invention provides an image super-resolution reconstruction method, the method comprising the following steps: obtaining a training data set for an image super-resolution reconstruction model; the training data set comprises a low-resolution image and text information; training the image super-resolution reconstruction model based on the training data set, so as to realize image super-resolution reconstruction based on the trained image super-resolution reconstruction model; wherein, training the image super-resolution reconstruction model based on the training data set comprises the following steps: generating a text embedding vector and a corresponding speech embedding vector based on the text information; generating an image embedding vector based on the low-resolution image; using the speech embedding vector as a V vector and the text embedding vector as a The V vector is a K vector, the image embedding vector is a Q vector, the V vector, the K vector and the Q vector are input into a noise prediction model to obtain the noise of the image embedding vector; the image embedding vector is element-wise subtracted from the noise to obtain an intermediate image embedding vector; the intermediate image embedding vector is used as an updated Q vector, and an updated intermediate image embedding vector is calculated by iterating a preset number of times; the intermediate image embedding vector updated for the last time is decoded to obtain a high-resolution image; a total loss function is calculated based on the image embedding vector and each intermediate image embedding vector; the noise prediction model is adjusted based on the total loss function until the image super-resolution reconstruction model converges.

[0006] In an implementation of the first aspect, obtaining a training data set for an image super-resolution reconstruction model includes the following steps:

[0007] Blurring the high-resolution image and generating blurred text, wherein the blurred text is slightly blurred, moderately blurred, or heavily blurred;

[0008] Scale the blurred high-resolution image and generate upsampled text;

[0009] Performing noise processing on the high-resolution image after the scaling processing and generating noise text, wherein the noise text has light noise, medium noise or heavy noise;

[0010] Compress the high-resolution image after noise processing and generate slightly compressed text;

[0011] Scaling the compressed image to obtain a low-resolution image and generating downsampled text;

[0012] The blurred text, upsampled text, noisy text, lightly compressed text and downsampled text are merged into the text information.

[0013] In an implementation of the first aspect, generating a text embedding vector and a corresponding speech embedding vector based on the text information includes the following steps:

[0014] Performing text encoding on the text information to obtain the text embedding vector;

[0015] Performing speech synthesis on the text embedding vector to obtain synthesized speech;

[0016] The synthesized speech is sequentially input into a speech encoder, a multi-layer perceptron and a transposed matrix to obtain the speech embedding vector.

[0017] In an implementation of the first aspect, performing speech synthesis on the text embedding vector to obtain synthesized speech includes the following steps:

[0018] Input the text embedding vector into the two-layer self-attention mechanism in sequence to obtain the text V vector;

[0019] Perform matrix multiplication of Gaussian noise with the two matrices respectively to obtain the text Q vector and the text K vector;

[0020] Input the text V vector, the text Q vector and the text K vector into a cross attention mechanism, and then sequentially pass through a linear layer and softmax to obtain the number of occurrences of each text embedding vector;

[0021] Arrange the corresponding text embedding vectors in order according to the number of occurrences to obtain a synthetic text embedding vector;

[0022] Perform speech decoding on the synthetic text embedding vector to obtain the synthetic speech.

[0023] In an implementation of the first aspect, generating an image embedding vector based on the low-resolution image includes the following steps:

[0024] Upsampling the low-resolution image;

[0025] The upsampled low-resolution ratio image is element-wise spliced ​​with Gaussian noise to obtain a spliced ​​low-resolution image;

[0026] Perform image encoding on the spliced ​​low-resolution image to generate the image embedding vector.

[0027] In an implementation of the first aspect, calculating the total loss function based on the image embedding vector and each intermediate image embedding vector comprises the following steps:

[0028] Calculate the L1 loss function of each intermediate image embedding vector and the image embedding vector;

[0029] Calculate the L2 loss function of the embedding vectors of two adjacent intermediate images;

[0030] The loss function sum of all L1 loss functions and all L2 loss functions is calculated as the total loss function.

[0031] In an implementation of the first aspect, the noise prediction model includes a preset number of block structures, and the block structure includes two multi-head cross-attention mechanisms, a self-attention mechanism, and two multi-head cross-attention mechanisms connected in sequence.

[0032] In a second aspect, the present invention provides an image super-resolution reconstruction system, the system comprising an acquisition module and a training module;

[0033] The acquisition module is used to acquire a training data set for an image super-resolution reconstruction model; the training data set includes low-resolution images and text information;

[0034] The training module is used to train the image super-resolution reconstruction model based on the training data set, so as to realize image super-resolution reconstruction based on the trained image super-resolution reconstruction model;

[0035] Wherein, training the image super-resolution reconstruction model based on the training data set comprises the following steps:

[0036] Generate a text embedding vector and a corresponding speech embedding vector based on the text information;

[0037] generating an image embedding vector based on the low-resolution image;

[0038] The speech embedding vector is used as a V vector, the text embedding vector is used as a K vector, and the image embedding vector is used as a Q vector, and the V vector, the K vector, and the Q vector are input into a noise prediction model to obtain the noise of the image embedding vector;

[0039] Subtracting the image embedding vector from the noise element-wise to obtain an intermediate image embedding vector;

[0040] Using the intermediate image embedding vector as an updated Q vector, iterating a preset number of times to calculate an updated intermediate image embedding vector;

[0041] Decode the last updated intermediate image embedding vector to obtain a high-resolution image;

[0042] Calculating a total loss function based on the image embedding vector and each intermediate image embedding vector;

[0043] The noise prediction model is adjusted based on the total loss function until the image super-resolution reconstruction model converges.

[0044] In a third aspect, the present invention provides an electronic device, the electronic device comprising: a processor and a memory;

[0045] The memory is used to store computer programs;

[0046] The processor is used to execute the computer program stored in the memory so that the electronic device performs the above-mentioned image super-resolution reconstruction method.

[0047] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned image super-resolution reconstruction method when executed by an electronic device.

[0048] As described above, the image super-resolution reconstruction method, system, storage medium and electronic device described in the present invention have the following beneficial effects.

[0049] (1) It can achieve super-resolution reconstruction of images based on text, speech and low-resolution images, effectively improving the image reconstruction effect to meet the needs of different scenarios.

[0050] (2) Highly intelligent and extremely practical. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 Shown is a schematic diagram of a scene of an electronic device in an embodiment of the present invention.

[0052] Figure 2 FIG. 4 is a flow chart of an image super-resolution reconstruction method according to an embodiment of the present invention.

[0053] Figure 3 FIG. 4 is a schematic diagram showing the structure of a noise prediction model in an embodiment of the present invention.

[0054] Figure 4 FIG. 4 is a schematic diagram showing the structure of an image super-resolution reconstruction system in one embodiment of the present invention.

[0055] Figure 5 It is a schematic structural diagram of an electronic device of the present invention in one embodiment. DETAILED DESCRIPTION

[0056] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0057] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0058] The following embodiments of the present invention provide an image super-resolution reconstruction method, which can be applied to Figure 1 The electronic device shown. The electronic device described in the present invention may include a mobile phone 11 with a wireless charging function, a tablet computer 12, a laptop computer 13, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiment of the present invention does not impose any restrictions on the specific type of the electronic device.

[0059] For example, the electronic device may be a station (STAION, ST) in a WLAN with a wireless charging function, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with a wireless charging function, a computing device or other processing device, a computer, a laptop computer, a handheld communication device, a handheld computing device, and / or other devices for communicating on a wireless system and a next generation communication system, such as a mobile terminal in a 5G network, a mobile terminal in a future evolved Public Land Mobile Network (PLMN), or a mobile terminal in a future evolved Non-terrestrial Network (NTN).

[0060] For example, the electronic device can communicate with the network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobilecommunication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include Global Positioning System (GPS), Global Navigation Satellite System (GLONASS), Beidou Satellite Navigation System (BDS), Quasi-Zenith Satellite System (QZSS) and / or Satellite Based Augmentation Systems (SBAS).

[0061] The technical solutions in the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0062] like Figure 2 As shown, in one embodiment, the image super-resolution reconstruction method of the present invention includes steps S1 and S2.

[0063] Step S1, obtaining a training data set for an image super-resolution reconstruction model; the training data set includes low-resolution images and text information.

[0064] Specifically, firstly, a low-resolution image and text information are generated based on a high-resolution image, and the low-resolution image and the text information are combined as training data of a training data set. The high-resolution image can be used as a label of the image super-resolution reconstruction model.

[0065] In one embodiment, obtaining a training data set for an image super-resolution reconstruction model includes the following steps.

[0066] 11) Blurring the high-resolution image and generating blurred text, wherein the blurred text is lightly blurred, moderately blurred, or heavily blurred.

[0067] The blurring process uses isotropic Gaussian blur and anisotropic Gaussian blur, and the probabilities of the two are equal. The convolution kernel size kernel size is randomly selected from the set [7, 9, . . . , 21]. The standard deviation σ is uniformly sampled from 0.2 to 3. If the sampling values ​​of kernel size and standard deviation are both less than 1 / 3 of the range, the blurred text is slightly blurred (small blur); if the sampling value is in the range of 1 / 3 to 2 / 3, the blurred text is medium blurred (medium blur); if the sampling value is greater than 2 / 3 of the range, the blurred text is heavily blurred (heavy blur), otherwise the blurred text is heavy blur.

[0068] 12) Scale the blurred high-resolution image and generate upsampled text.

[0069] Among them, two scaling processes are performed in total, using area, bilinear and bicubic interpolation with probability [0.3, 0.4, 0.3]. The first scale is uniformly sampled in the range of 0.15~1.5. The second scale is 1 / 4 of the high-resolution image, and the corresponding text is upsampled text.

[0070] 13) Noise processing is performed on the scaled high-resolution image to generate noise text, where the noise text has light noise, medium noise or heavy noise.

[0071] Among them, Gaussian noise and Poisson noise are applied with equal probability. Gaussian noise energy levels are uniformly sampled from 1 to 30, while Poisson noise energy levels are uniformly sampled from 0.05 to 3. If the sampling value is less than 1 / 3 of the range, the noise text is small noise; if the sampling value is between 1 / 3 and 2 / 3, the noise text is medium noise; if the sampling value is greater than 2 / 3 of the range, the noise text is heavy noise.

[0072] 14) Compress the high-resolution image after noise processing and generate lightly compressed text.

[0073] Among them, JPEG compression is used, and the quality coefficient is uniformly sampled between 30 and 95. The corresponding text is lightly compressed text (light compression).

[0074] 15) Scaling the compressed image to obtain a low-resolution image and generate downsampled text.

[0075] 16) Combining the blurred text, upsampled text, noisy text, lightly compressed text and downsampled text into the text information.

[0076] The text information includes small / medium / heavy blur, upsample, small / medium / heavy noise, light compression, and downsample.

[0077] Step S2: training the image super-resolution reconstruction model based on the training data set to achieve image super-resolution reconstruction based on the trained image super-resolution reconstruction model.

[0078] In one embodiment, training the image super-resolution reconstruction model based on the training data set includes the following steps.

[0079] 21) Generate a text embedding vector and a corresponding speech embedding vector based on the text information.

[0080] The text information is passed through the text encoder of the CLIP model to generate a text embedding vector textembeddings(T_t,D), where T_t is the length and D is the embedding dimension.

[0081] Perform speech synthesis on the text embedding vector to obtain synthesized speech. Input the synthesized speech into a speech encoder (such as a wav2vec encoder), a multi-layer perceptron (MLP) and a transpose matrix (matrix transpose) in sequence to obtain the speech embedding vector. The text embedding vector and the speech embedding vector have the same shape.

[0082] In one embodiment, when performing speech synthesis on the text embedding vector, the text embedding vector is sequentially input into two layers of self-attention mechanism to obtain a text V vector; Gaussian noise is matrix multiplied with two matrices respectively to obtain a text Q vector and a text K vector; the text V vector, the text Q vector and the text K vector are input into a cross-attention mechanism, and then sequentially passed through a linear layer and softmax to obtain the number of occurrences of each text embedding vector; the corresponding text embedding vectors are arranged in sequence according to the number of occurrences to obtain a synthesized text embedding vector; the synthesized text embedding vector is speech decoded to obtain the synthesized speech. For example, if the text embedding vector is ABCDE and the corresponding number of occurrences is 22131, then the synthesized text embedding vector obtained is AABBCDDDE.

[0083] 22) Generate an image embedding vector based on the low-resolution image.

[0084] The low-resolution image is subjected to a linear interpolation upsampling operation, the image size is enlarged to 4 times the original size, and then an element-wise concatenation operation is performed with a sample sampled from Gaussian noise, and then encoded by an image encoder (such as the image encoder in the CLIP model) to obtain an image embedding vector.

[0085] 23) The speech embedding vector is used as a V vector, the text embedding vector is used as a K vector, and the image embedding vector is used as a Q vector. The V vector, the K vector, and the Q vector are input into a noise prediction model to obtain the noise of the image embedding vector.

[0086] Among them, Figure 3 As shown, the noise prediction model includes a preset number (e.g., 10) of block structures, and the block structure includes two multi-head cross-attention mechanisms, a self-attention mechanism, and two multi-head cross-attention mechanisms connected in sequence. Each block structure needs to input a QKV vector, the Q vector of the first block structure is the image embedding vector, and the Q vectors of other block structures are the outputs of the commercial block structure. The K vector and the V vector remain unchanged, and the noise is output after multiple block structures.

[0087] 24) performing element-wise subtraction of the image embedding vector and the noise to obtain an intermediate image embedding vector.

[0088] 25) Using the intermediate image embedding vector as the updated Q vector, repeating steps 23)-25) for a preset number of iterations to calculate the updated intermediate image embedding vector.

[0089] Wherein, the preset number of times is 1000 times.

[0090] 26) Decode the last updated intermediate image embedding vector to obtain a high-resolution image.

[0091] 27) Calculating a total loss function based on the image embedding vector and each intermediate image embedding vector.

[0092] Among them, the L1 loss function of each intermediate image embedding vector and the image embedding vector is calculated; the L2 loss function of two adjacent intermediate image embedding vectors is calculated; and the loss function sum of all L1 loss functions and all L2 loss functions is calculated as the total loss function.

[0093] 28) Adjusting the noise prediction model based on the total loss function until the image super-resolution reconstruction model converges.

[0094] The total loss function is used for back propagation to adjust the noise prediction model, and finally the image super-resolution reconstruction model converges.

[0095] After the high-resolution reconstruction model of the image is trained, a high-resolution image can be reconstructed based on the low-resolution image and the corresponding text information. Wherein, the corresponding text embedding vector, image embedding vector and speech embedding vector are obtained based on the low-resolution image and the text information. The text embedding vector, the image embedding vector and the speech embedding vector are input into the noise prediction model to predict the noise, the image embedding vector is subtracted from the noise to obtain the intermediate image embedding vector, the preset number of iterations N is used to calculate the updated intermediate image embedding vector, and the final intermediate image embedding vector is decoded to obtain the corresponding high-resolution image. Wherein. The preset number N can be selected according to actual needs. If you want to make a quick inference, set the value of N to be smaller, so that the obtained high-resolution image is rougher; if you want to obtain a higher-quality high-resolution image, set N to be larger, such as close to 1000.

[0096] The protection scope of the image super-resolution reconstruction method described in the embodiment of the present invention is not limited to the execution order of the steps listed in this embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present invention are included in the protection scope of the present invention.

[0097] An embodiment of the present invention further provides an image super-resolution reconstruction system, which can implement the image super-resolution reconstruction method described in the present invention. However, the implementation device of the image super-resolution reconstruction system described in the present invention includes but is not limited to the structure of the image super-resolution reconstruction system listed in this embodiment. All structural deformations and replacements of the prior art made according to the principles of the present invention are included in the protection scope of the present invention.

[0098] like Figure 4 As shown, in one embodiment, the image super-resolution reconstruction system of the present invention includes an acquisition module 41 and a training module 42 .

[0099] The acquisition module 41 is used to acquire a training data set for an image super-resolution reconstruction model; the training data set includes low-resolution images and text information.

[0100] The training module 42 is connected to the acquisition module 41, and is used to train the image super-resolution reconstruction model based on the training data set, so as to realize image super-resolution reconstruction based on the trained image super-resolution reconstruction model.

[0101] Wherein, training the image super-resolution reconstruction model based on the training data set comprises the following steps:

[0102] Generate a text embedding vector and a corresponding speech embedding vector based on the text information;

[0103] generating an image embedding vector based on the low-resolution image;

[0104] The speech embedding vector is used as a V vector, the text embedding vector is used as a K vector, and the image embedding vector is used as a Q vector, and the V vector, the K vector, and the Q vector are input into a noise prediction model to obtain the noise of the image embedding vector;

[0105] Subtracting the image embedding vector from the noise element-wise to obtain an intermediate image embedding vector;

[0106] Using the intermediate image embedding vector as an updated Q vector, iterating a preset number of times to calculate an updated intermediate image embedding vector;

[0107] Decode the last updated intermediate image embedding vector to obtain a high-resolution image;

[0108] Calculating a total loss function based on the image embedding vector and each intermediate image embedding vector;

[0109] The noise prediction model is adjusted based on the total loss function until the image super-resolution reconstruction model converges.

[0110] The structures and principles of the acquisition module 41 and the training module 42 correspond one-to-one to the steps in the above-mentioned image super-resolution reconstruction method, so they will not be described in detail here.

[0111] In the several embodiments provided by the present invention, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules / units is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules or units, which can be electrical, mechanical or other forms.

[0112] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention. For example, the functional modules / units in the various embodiments of the present invention may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.

[0113] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0114] The embodiment of the present invention also provides a computer-readable storage medium. A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above embodiment can be completed by instructing the processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a digital video disc (DVD)), or a semiconductor medium (for example, a solid-state disk (SSD)), etc.

[0115] An embodiment of the present invention further provides an electronic device, which includes a processor and a memory.

[0116] The memory is used to store computer programs.

[0117] The memory includes: ROM, RAM, disk, USB flash drive, memory card or CD and other media that can store program codes.

[0118] The processor is connected to the memory and is used to execute the computer program stored in the memory so that the electronic device executes the above-mentioned image super-resolution reconstruction method.

[0119] Preferably, the processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0120] like Figure 5As shown, the electronic device of the present invention is in the form of a general computing device. The components of the electronic device may include but are not limited to: one or more processors or processing units 51, a memory 52, and a bus 53 connecting different system components (including the memory 52 and the processing unit 51).

[0121] Bus 53 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0122] Electronic devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, removable and non-removable media.

[0123] The memory 52 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 521 and / or cache memory 522. The electronic device may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 523 may be used to read and write non-removable, non-volatile magnetic media ( Figure 5 not shown, usually called a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 53 via one or more data medium interfaces. The memory 52 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0124] A program / utility 524 having a set (at least one) of program modules 5241 may be stored, for example, in the memory 52, such program modules 5241 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include an implementation of a network environment. The program modules 5241 generally perform the functions and / or methods of the embodiments described herein.

[0125] The electronic device may also communicate with one or more external devices (e.g., keyboards, pointing devices, displays, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via input / output (I / O) interface 54. Furthermore, the electronic device may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 55. Figure 5 As shown, the network adapter 55 communicates with other modules of the electronic device via the bus 53. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0126] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A method for image super-resolution reconstruction, It is characterized in that The method comprises the following steps: Acquire a training data set for an image super-resolution reconstruction model; the training data set includes low-resolution images and text information; Training the image super-resolution reconstruction model based on the training data set to achieve image super-resolution reconstruction based on the trained image super-resolution reconstruction model; Wherein, training the image super-resolution reconstruction model based on the training data set comprises the following steps: Generate a text embedding vector and a corresponding speech embedding vector based on the text information; generating an image embedding vector based on the low-resolution image; The speech embedding vector is used as a V vector, the text embedding vector is used as a K vector, and the image embedding vector is used as a Q vector, and the V vector, the K vector, and the Q vector are input into a noise prediction model to obtain the noise of the image embedding vector; Subtracting the image embedding vector from the noise element-wise to obtain an intermediate image embedding vector; Using the intermediate image embedding vector as an updated Q vector, iterating a preset number of times to calculate an updated intermediate image embedding vector; Decode the last updated intermediate image embedding vector to obtain a high-resolution image; Calculating a total loss function based on the image embedding vector and each intermediate image embedding vector; Adjusting the noise prediction model based on the total loss function until the image super-resolution reconstruction model converges; Obtaining a training dataset for an image super-resolution reconstruction model includes the following steps: Performing blur processing on the high-resolution image and generating blurred text information, wherein the blurred text information is slightly blurred, moderately blurred or heavily blurred; Scaling the blurred high-resolution image and generating up-sampled text information, wherein the up-sampled text information is up-sampled; Performing noise processing on the high-resolution image after the scaling processing, and generating noise text information, wherein the noise text information is light noise, medium noise or heavy noise; Compressing the high-resolution image after noise processing and generating lightly compressed text information, wherein the lightly compressed text information is lightly compressed; Scaling the compressed high-resolution image to obtain a low-resolution image, and generating down-sampled text information, wherein the down-sampled text information is down-sampled; The blurred text information, the upsampled text information, the noisy text information, the lightly compressed text information and the downsampled text information are combined into the text information.

2. The image super-resolution reconstruction method according to claim 1, Features: Generating a text embedding vector and a corresponding speech embedding vector based on the text information comprises the following steps: Performing text encoding on the text information to obtain the text embedding vector; Performing speech synthesis on the text embedding vector to obtain synthesized speech; The synthesized speech is sequentially input into a speech encoder, a multi-layer perceptron and a transposed matrix to obtain the speech embedding vector.

3. The image super-resolution reconstruction method according to claim 2, Features: Performing speech synthesis on the text embedding vector to obtain synthesized speech includes the following steps: Input the text embedding vector into the two-layer self-attention mechanism in sequence to obtain the text V vector; Perform matrix multiplication of Gaussian noise with the two matrices respectively to obtain the text Q vector and the text K vector; Input the text V vector, the text Q vector and the text K vector into a cross attention mechanism, and then sequentially pass through a linear layer and softmax to obtain the number of occurrences of each text embedding vector; Arrange the corresponding text embedding vectors in order according to the number of occurrences to obtain a synthetic text embedding vector; Perform speech decoding on the synthetic text embedding vector to obtain the synthetic speech.

4. The image super-resolution reconstruction method according to claim 1, Features: Generating an image embedding vector based on the low-resolution image comprises the following steps: Upsampling the low-resolution image; The upsampled low-resolution ratio image is element-wise spliced ​​with Gaussian noise to obtain a spliced ​​low-resolution image; Perform image encoding on the spliced ​​low-resolution image to generate the image embedding vector.

5. The image super-resolution reconstruction method according to claim 1, Features: Calculating the total loss function based on the image embedding vector and each intermediate image embedding vector comprises the following steps: Calculate the L1 loss function of each intermediate image embedding vector and the image embedding vector; Calculate the L2 loss function of the embedding vectors of two adjacent intermediate images; The loss function sum of all L1 loss functions and all L2 loss functions is calculated as the total loss function.

6. The image super-resolution reconstruction method according to claim 1, Features: The noise prediction model includes a preset number of block structures, and the block structure includes two multi-head cross-attention mechanisms, a self-attention mechanism and two multi-head cross-attention mechanisms connected in sequence.

7. An image super-resolution reconstruction system, It is characterized in that The system includes an acquisition module and a training module; The acquisition module is used to acquire a training data set for an image super-resolution reconstruction model; the training data set includes low-resolution images and text information; The training module is used to train the image super-resolution reconstruction model based on the training data set, so as to realize image super-resolution reconstruction based on the trained image super-resolution reconstruction model; Wherein, training the image super-resolution reconstruction model based on the training data set comprises the following steps: Generate a text embedding vector and a corresponding speech embedding vector based on the text information; generating an image embedding vector based on the low-resolution image; The speech embedding vector is used as a V vector, the text embedding vector is used as a K vector, and the image embedding vector is used as a Q vector, and the V vector, the K vector, and the Q vector are input into a noise prediction model to obtain the noise of the image embedding vector; Subtracting the image embedding vector from the noise element-wise to obtain an intermediate image embedding vector; Using the intermediate image embedding vector as an updated Q vector, iterating a preset number of times to calculate an updated intermediate image embedding vector; Decode the last updated intermediate image embedding vector to obtain a high-resolution image; Calculating a total loss function based on the image embedding vector and each intermediate image embedding vector; Adjusting the noise prediction model based on the total loss function until the image super-resolution reconstruction model converges; Obtaining a training dataset for an image super-resolution reconstruction model includes the following steps: Performing blur processing on the high-resolution image and generating blurred text information, wherein the blurred text information is slightly blurred, moderately blurred or heavily blurred; Scaling the blurred high-resolution image and generating up-sampled text information, wherein the up-sampled text information is up-sampled; Performing noise processing on the high-resolution image after the scaling processing, and generating noise text information, wherein the noise text information is light noise, medium noise or heavy noise; Compressing the high-resolution image after noise processing and generating lightly compressed text information, wherein the lightly compressed text information is lightly compressed; Scaling the compressed high-resolution image to obtain a low-resolution image, and generating down-sampled text information, wherein the down-sampled text information is down-sampled; The blurred text information, the upsampled text information, the noisy text information, the lightly compressed text information and the downsampled text information are combined into the text information.

8. An electronic device, It is characterized in that The electronic device comprises: a processor and a memory; The memory is used to store computer programs; The processor is used to execute the computer program stored in the memory so that the electronic device performs the image super-resolution reconstruction method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the program is executed by an electronic device, the image super-resolution reconstruction method according to any one of claims 1 to 6 is implemented.