[go: up one dir, main page]

WO2020057492A1 - Image compression and decompression method and apparatus, electronic device, and storage medium - Google Patents

Image compression and decompression method and apparatus, electronic device, and storage medium Download PDF

Info

Publication number
WO2020057492A1
WO2020057492A1 PCT/CN2019/106149 CN2019106149W WO2020057492A1 WO 2020057492 A1 WO2020057492 A1 WO 2020057492A1 CN 2019106149 W CN2019106149 W CN 2019106149W WO 2020057492 A1 WO2020057492 A1 WO 2020057492A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
compressed
resolution
convolutional neural
neural network
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/CN2019/106149
Other languages
French (fr)
Chinese (zh)
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.)
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
Original Assignee
Beijing Kingsoft Office Software Inc
Zhuhai Kingsoft Office Software Co Ltd
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 Beijing Kingsoft Office Software Inc, Zhuhai Kingsoft Office Software Co Ltd filed Critical Beijing Kingsoft Office Software Inc
Publication of WO2020057492A1 publication Critical patent/WO2020057492A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation

Definitions

  • the present application relates to the field of image processing technology, and in particular, to an image compression and decompression method, device, electronic device, and storage medium.
  • the compression of the size of the image includes reducing the size of the image to reduce the resolution of the image. For example, a 100 * 100 pixel image is compressed into a 50 * 50 pixel image.
  • the image is compressed by this compression method, when the user views the compressed image, the user can only see the compressed image, that is, the image with lower resolution, and the user experience is poor.
  • the purpose of the embodiments of the present application is to provide an image compression and decompression method, device, electronic device, and storage medium, so as to improve the resolution of an image viewed by a user when viewing the compressed image, and improve the user experience.
  • Specific technical solutions are as follows:
  • an embodiment of the present application provides an image compression method, where the method includes:
  • the training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images with a resolution higher than the resolution threshold corresponding to the low-resolution images.
  • the second CNN model is used for Performing convolution filtering decompression on the network compressed data to obtain a decompressed image;
  • the network compressed data is stored.
  • the method further includes:
  • the correspondence between the size compressed image and a preset identifier is stored; the preset identifier is used to indicate the presence of the network compressed data of the image to be compressed.
  • the image to be compressed is located in a PDF document; or the image to be compressed is located in a Word document; or the image to be compressed is located in an Excel document; or the image to be compressed is located in a WPS document.
  • an embodiment of the present application provides an image decompression method, where the method includes:
  • the decompressed image is output.
  • the step of obtaining network compressed data of a target image includes:
  • the method further includes:
  • the size-compressed image is output.
  • an embodiment of the present application provides an image compression apparatus, where the apparatus includes:
  • a first compression module configured to perform convolution filtering and compression on the image to be compressed using a first CNN model to obtain network compressed data; wherein the first CNN model and the second CNN model are obtained by training using a preset training set
  • the training set includes multiple low-resolution images with a resolution lower than the resolution threshold, and images with a resolution higher than the resolution threshold corresponding to the low-resolution images, and the second CNN model is used for Decompress the network compressed data by convolution filtering to obtain a decompressed image;
  • the first storage module is configured to store the network compressed data.
  • the device further includes:
  • a second compression module configured to compress the image to be compressed after obtaining the image to be compressed to obtain a size-compressed image
  • a second storage module is configured to store the correspondence between the size compressed image and a preset identifier after the network compressed data is obtained, where the preset identifier is used to indicate the existence of network compressed data of the image to be compressed.
  • the image to be compressed is located in a PDF document; or the image to be compressed is located in a Word document; or the image to be compressed is located in an Excel document; or the image to be compressed is located in a WPS document.
  • an embodiment of the present application provides an image decompression device, where the device includes:
  • a decompression module configured to perform convolution filtering and decompression on the network compressed data using a second CNN model to obtain a decompressed image; wherein the second CNN model and the first CNN model are obtained by training using a preset training set;
  • the training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images with a resolution higher than the resolution threshold corresponding to the low-resolution images, and the first CNN model is used to be compressed.
  • Image compression and convolution filter compression to obtain the network compression data
  • An output module configured to output the decompressed image.
  • the obtaining module is specifically configured to obtain a size-compressed image of the target image; determine whether a preset identifier corresponding to the size-compressed image is stored; and the preset identifier is used to indicate a network in which the target image exists Compressed data; if stored, obtain the network compressed data.
  • the output module is further configured to output the size-compressed image if the preset identifier corresponding to the size-compressed image is not stored.
  • an embodiment of the present application provides an image compression method, where the method includes:
  • the first CNN model is used to perform convolution filtering and compression on the image to be compressed to obtain network compressed data; wherein the first CNN model and the second CNN model are obtained by training using a preset training set, and the training set includes multiple Sample images, the second CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image;
  • the network compressed data is stored.
  • an embodiment of the present application provides an image decompression method, where the method includes:
  • Convolutional filtering and decompression of the network compressed data using a second CNN model to obtain a decompressed image wherein the second CNN model and the first CNN model are obtained by training using a preset training set, and the training set includes Multiple sample images, the first CNN model is used to perform convolution filter compression on the image to be compressed to obtain the network compression data;
  • the decompressed image is output.
  • an embodiment of the present application provides an image compression apparatus, where the apparatus includes:
  • a first compression module configured to perform convolution filtering and compression on the image to be compressed using a first CNN model to obtain network compressed data; wherein the first CNN model and the second CNN model are obtained by training using a preset training set The training set includes multiple sample images, and the second CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image;
  • the first storage module is configured to store the network compressed data.
  • an image decompression device where the device includes:
  • a decompression module configured to perform convolution filtering and decompression on the network compressed data using a second CNN model to obtain a decompressed image; wherein the second CNN model and the first CNN model are obtained by training using a preset training set;
  • the training set includes multiple sample images, and the first CNN model is used to perform convolution filter compression on the compressed image to be compressed to obtain the network compressed data;
  • An output module configured to output the decompressed image.
  • an embodiment of the present application provides an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete each other through the communication bus.
  • the memory is used to store a computer program
  • the processor is configured to execute a program stored on the memory to implement any of the steps of the image compression method provided by the first aspect.
  • an embodiment of the present application provides an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete each other through the communication bus.
  • the memory is used to store a computer program
  • the processor is configured to execute a program stored on the memory to implement any of the steps of the image decompression method provided by the second aspect.
  • an embodiment of the present application provides an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete each other through the communication bus Communication
  • the memory is used to store a computer program
  • the processor is configured to execute a program stored on the memory to implement any of the steps of the image compression method provided by the fifth aspect.
  • an embodiment of the present application provides an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete each other through the communication bus.
  • the memory is used to store a computer program
  • the processor is configured to execute a program stored on the memory to implement any of the steps of the image decompression method provided by the sixth aspect.
  • an embodiment of the present application provides a machine-readable storage medium.
  • the machine-readable storage medium stores a computer program, and when the computer program is executed by a processor, any image provided in the first aspect is implemented. Compression method steps.
  • an embodiment of the present application provides a machine-readable storage medium.
  • the machine-readable storage medium stores a computer program.
  • any image provided in the second aspect is implemented. Decompression method steps.
  • an embodiment of the present application provides a machine-readable storage medium.
  • the machine-readable storage medium stores a computer program, and when the computer program is executed by a processor, any image provided in the fifth aspect is implemented. Compression method steps.
  • an embodiment of the present application provides a machine-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any image provided in the sixth aspect is implemented Decompression method steps.
  • an embodiment of the present application provides a computer program that, when executed by a processor, implements any of the image compression method steps provided in the first aspect.
  • an embodiment of the present application provides a computer program that, when executed by a processor, implements any of the image decompression method steps provided in the second aspect.
  • an embodiment of the present application provides a computer program that, when executed by a processor, implements any of the image compression method steps provided in the fifth aspect.
  • an embodiment of the present application provides a computer program that, when executed by a processor, implements any of the image decompression method steps provided in the sixth aspect.
  • Embodiments of the present application provide an image compression and decompression method, device, electronic device, and storage medium.
  • a CNN model is trained by using multiple images below a resolution threshold and multiple images above a resolution threshold.
  • the CNN model is used to perform convolution filtering and compression on the images to obtain network compression data with smaller resolution to reduce the storage space occupied.
  • the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • it is not necessary to achieve all the advantages described above at the same time.
  • FIG. 1 is a first schematic flowchart of an image compression method according to an embodiment of the present application
  • FIG. 2 is a schematic flowchart of a CNN model training method according to an embodiment of the present application
  • FIG. 3 is a schematic flowchart of a second method of an image compression method according to an embodiment of the present application.
  • FIG. 4 is a first schematic flowchart of an image decompression method according to an embodiment of the present application.
  • FIG. 5 is a second schematic flowchart of an image decompression method according to an embodiment of the present application.
  • FIG. 6 is a first schematic structural diagram of an image compression device according to an embodiment of the present application.
  • FIG. 7 is a schematic diagram of a second structure of an image compression device according to an embodiment of the present application.
  • FIG. 8 is a first schematic structural diagram of an image decompression device according to an embodiment of the present application.
  • FIG. 9 is a first schematic structural diagram of an electronic device according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a second structure of an electronic device according to an embodiment of the present application.
  • an image compression method and an image decompression method In order to reduce the loss of image resolution when viewing the compressed image and improve the user experience, embodiments of the present application provide an image compression method and an image decompression method.
  • the image compression and decompression method can be applied to any electronic device such as a mobile phone, a computer, and a notebook.
  • a CNN model is trained by using multiple images below a resolution threshold and multiple images above a resolution threshold.
  • the CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space.
  • the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • FIG. 1 is a schematic flowchart of a first method of an image compression method according to an embodiment of the present application. The method includes the following steps.
  • Step 101 Obtain an image to be compressed.
  • the image is acquired as an image to be compressed.
  • the image to be compressed may be an independent image or an image located in a document.
  • the documents here include but are not limited to PDF documents, Word documents, Excel documents, WPS documents, etc.
  • the PDF document may be an editable PDF document.
  • Step 102 Compress the compressed image using the CNN model to obtain network compressed data.
  • Step 102 is to use the first CNN model to perform convolution filtering and compression on the image to be compressed to obtain network compressed data.
  • the first CNN model is used to perform convolution filter compression on the image to be compressed to obtain network compressed data.
  • the first CNN model and the second CNN model are obtained by training with a preset training set.
  • the training set includes multiple low-resolution images with a resolution lower than the resolution threshold, and the resolution corresponding to the low-resolution image is higher than the resolution threshold Image, the second CNN model is used to decompress the network compressed data by convolution filtering to obtain a decompressed image.
  • an image with a resolution higher than the resolution threshold is a high-resolution image.
  • a low-resolution image may correspond to one or more high-resolution images, and a high-resolution image may correspond to one or more low-resolution images.
  • the method includes the following steps.
  • Step 21 Obtain a preset first CNN model. Initialize the parameters in the first CNN model. The initialized parameters can be set according to actual needs and experience.
  • training-related high-level parameters may also be set, where the high-level parameters may include a learning rate, a gradient descent algorithm, and the like.
  • the high-level parameters may be set in various manners in related technologies, which is not described in detail here.
  • Step 22 Obtain a preset training set.
  • the training set includes multiple low-resolution images with a resolution below the resolution threshold, and high-resolution images corresponding to the low-resolution image and with a resolution above the resolution threshold.
  • Step 23 Obtain network compressed data corresponding to multiple high-resolution images.
  • the network compressed data of the high-resolution image can be stored in a storage database in advance.
  • the network compression data of the high-resolution image is input to the second CNN model, and the high-resolution image can be obtained.
  • Step 24 Perform forward calculation, which specifically includes: inputting each low-resolution image in the training set into a preset first CNN model and performing convolution filtering and compression processing to obtain network compressed data corresponding to each low-resolution image.
  • steps 23 and 24 are not limited in the embodiment of the present application.
  • Step 25 Determine a loss value of image convolution filter compression based on network compressed data corresponding to multiple high-resolution images and network compressed data corresponding to each low-resolution image.
  • the similarity between the network compressed data corresponding to the high-resolution image and the network compressed data corresponding to the low-resolution image can be calculated, and the reciprocal of the calculated similarity is used as the loss value of the image convolution filter compression.
  • the larger the similarity the smaller the loss value of image convolution filter compression.
  • the smaller the similarity the larger the loss value of image convolution filter compression.
  • a Mean Squared Error (MSE) formula can also be used as a loss function to calculate the mean square error of the network compressed data corresponding to the high-resolution image and the network compressed data corresponding to the low-resolution image.
  • MSE Mean Squared Error
  • Step 26 Determine whether the preset first CNN model converges based on the loss value of the image convolution filter compression. If not, proceed to step 27; if converge, end the first CNN model training.
  • a first loss threshold may be set in advance. If the loss value of the image convolution filter compression is lower than the first loss threshold, it is determined that the first CNN model converges. If the loss value of the image convolution filter compression is not lower than the first loss threshold, it is determined that the first CNN model does not converge.
  • Step 27 Adjust parameters in the preset first CNN model, and return to step 24.
  • the electronic device for training the first CNN model and the electronic device for compressing images may be the same device or different devices.
  • Step 103 Store network compression data.
  • the image to be compressed is an independent image
  • the obtained network compressed data is directly stored.
  • the image to be compressed is an image located in a document
  • the obtained network compressed data is stored in the document. For example, if the image 1 to be compressed is located in the PDF document f1, after obtaining the network compressed data 1 of the image 1 to be compressed, the network compressed data 1 is stored in the PDF document f1.
  • the network compressed data obtained by using the first CNN model compression is not an image, and image processing software cannot directly open the network compressed data to obtain an image.
  • FIG. 3 is a schematic flowchart of a second method for providing an image compression method according to an embodiment of the present application. Based on FIG. 1, the method includes the following steps.
  • Step 301 Obtain an image to be compressed.
  • Step 301 is the same as step 101.
  • Step 302 Compress the image to be compressed using the CNN model to obtain network compressed data.
  • Step 302 is to use the first CNN model to perform convolution filtering and compression on the image to be compressed to obtain network compressed data.
  • the first CNN model is used to perform convolution filter compression on the image to be compressed to obtain network compressed data.
  • the first CNN model and the second CNN model are obtained by training with a preset training set.
  • the training set includes multiple low-resolution images with a resolution lower than the resolution threshold, and the resolution corresponding to the low-resolution image is higher than the resolution threshold.
  • Image the second CNN model is used to decompress the network compressed data by convolution filtering to obtain a decompressed image.
  • Step 302 is the same as step 102.
  • Step 303 Size-compress the image to be compressed to obtain a size-compressed image.
  • size compression is performed on an image of 100 * 100 pixels to obtain an image of 50 * 50 pixels.
  • the 50 * 50 pixel image is a size-compressed image.
  • Step 304 Store the network compressed data, and store the correspondence between the size compressed image and the preset identifier.
  • the preset identifier is used to indicate that there is network compressed data of the image to be compressed.
  • the size-compressed image after obtaining the size-compressed image, the size-compressed image may be stored first, and after obtaining the network-compressed data, the preset identifier corresponding to the size-compressed image may be stored. It is also possible to first obtain network compressed data, and after obtaining the size compressed image, directly store the correspondence between the size compressed image and the preset identifier. This embodiment of the present application does not limit this.
  • both network compressed data and size compressed images are stored. If the second CNN model is not stored in the electronic device, the image cannot be opened through the network compressed data. At this time, the size compressed image can be opened to Avoid issues where users cannot view images.
  • FIG. 4 is a first schematic flowchart of an image decompression method provided by an embodiment of the present application. The method includes the following steps.
  • Step 401 Obtain network compressed data of a target image.
  • the target image is an image that the user needs to open.
  • the target image can be an independent image or an image located in a document.
  • the documents here include but are not limited to PDF documents, Word documents, Excel documents, WPS documents.
  • Step 402 Decompress the network compressed data using a CNN model to obtain a decompressed image.
  • Step 402 is to use the second convolutional neural network model to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image.
  • the second CNN model is used to perform convolution filtering and decompression on network compressed data to obtain a decompressed image.
  • the second CNN model and the first CNN model are obtained by training using a preset training set.
  • the training set includes multiple low-resolution images with a resolution lower than the resolution threshold, and the resolution corresponding to the low-resolution image is higher than the resolution threshold.
  • Image the first CNN model is used to perform convolution filter compression on the image to be compressed to obtain network compressed data.
  • the training of the second CNN model may refer to the training process of the first CNN model shown in FIG. 2.
  • the difference between the training process of the second CNN model and the training process of the first CNN model lies in: obtaining network compression data corresponding to multiple low-resolution images, and inputting network compression data corresponding to each low-resolution image in the training set into the
  • the two CNN models perform convolution filtering and decompression processing to obtain decompressed images. Based on multiple high-resolution images and decompressed images, the loss value of image convolution filtering and decompression is determined.
  • the electronic device for training the second CNN model and the electronic device for decompressing the image may be the same device or different devices.
  • Step 403 Output a decompressed image.
  • the second CNN model is trained by using multiple images below the resolution threshold and multiple images above the resolution threshold, so that the second CNN model is more suitable for decompressing network compressed data into an image. Decompressed images with higher resolution are obtained, and even decompressed images with higher resolution than the original image (such as low-resolution images) are obtained. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • the network compressed data is data obtained by using convolution filter compression. Therefore, the network compressed data is not image data. Using image processing software cannot directly open the network compressed data to obtain an image.
  • FIG. 5 is a schematic flowchart of a second method of the image decompression method provided by an embodiment of the present application. Based on FIG. 4, the method includes the following steps.
  • Step 501 Obtain a size-compressed image of a target image.
  • Step 502 Determine whether a preset identifier corresponding to the size-compressed image is stored. If it is stored, step 503 is performed. If not, step 506 is performed.
  • the preset identifier is used to indicate that there is network compressed data of the target image.
  • step 503 is performed. If the preset identifier corresponding to the size compressed image is not stored, it is determined that there is no network compressed data of the target image, and step 506 is performed to ensure that the user can view the image.
  • Step 503 Obtain network compressed data.
  • Step 504 Decompress the network compressed data by using a CNN model to obtain a decompressed image.
  • Step 504 is to use the second convolutional neural network model to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image.
  • the second CNN model is used to perform convolution filtering and decompression on network compressed data to obtain a decompressed image.
  • the second CNN model and the first CNN model are obtained by training using a preset training set.
  • the training set includes multiple low-resolution images with a resolution lower than the resolution threshold, and the resolution corresponding to the low-resolution image is higher than the resolution threshold Image, the first CNN model is used to perform convolution filter compression on the image to be compressed to obtain network compressed data.
  • Step 505 Output a decompressed image.
  • Steps 503-505 are the same as steps 401-403.
  • Step 506 Output the compressed image.
  • a size-compressed image is directly output to ensure the user View the image.
  • the first CNN model and the second CNN model may be jointly trained.
  • the joint training of the first CNN model and the second CNN model may include the following steps.
  • Step a1 Obtain a preset first CNN model and a second CNN model. Initialize the parameters in the first CNN model and the second CNN model. The initialized parameters can be set according to actual needs and experience.
  • Step a2 Obtain a preset training set.
  • the training set includes multiple low-resolution images with a resolution below the resolution threshold, and high-resolution images corresponding to the low-resolution image and with a resolution above the resolution threshold.
  • Step a3. Perform the first forward calculation, which specifically includes: inputting each low-resolution image in the training set into a preset first CNN model and performing convolution filtering and compression processing to obtain a network corresponding to each low-resolution image. Compressed data.
  • step a4 is performed. If it is greater than or equal to the preset data amount, step a7 is performed.
  • Step a4 performing a second forward calculation, which specifically includes: inputting network compression data corresponding to each low-resolution image into a preset second CNN model and performing convolution filtering and decompression processing to obtain each low-resolution image The corresponding decompressed image.
  • Step a5 Determine an image loss value based on the high-resolution image and the decompressed image corresponding to each low-resolution image.
  • the similarity between the high-resolution image and the decompressed image corresponding to the low-resolution image may be calculated, and the reciprocal of the calculated similarity is used as the image loss value.
  • the greater the similarity the smaller the image loss value.
  • the smaller the similarity the larger the image loss value.
  • the MSE formula can also be used as a loss function to calculate the mean square error between the high-resolution image and the decompressed image corresponding to the low-resolution image to obtain the image loss value.
  • a loss function to calculate the mean square error between the high-resolution image and the decompressed image corresponding to the low-resolution image to obtain the image loss value.
  • Step a6 Determine whether the preset first CNN model and the second CNN model converge based on the image loss value. If not, proceed to step a7; if converge, end training.
  • a second loss threshold may be set in advance. If the image loss value is lower than the second loss threshold, it is determined that the first CNN model and the second CNN model converge. If the image loss value is not lower than the second loss threshold, it is determined that the first CNN model and the second CNN model do not converge.
  • Step a7 Adjust the parameters in the preset first CNN model and the second CNN model, and return to step a3.
  • the compressed image of the first CNN model obtained by training in steps a1 to a7 above is used to obtain network compressed data.
  • the amount of data of the network compressed data is less than that of the image to be compressed, which reduces the storage space occupied by the image.
  • the second CNN model trained in the above steps a1-a7 is used to decompress the network compressed data to obtain a decompressed image. Since the second CNN model obtained by training the low-resolution image and the high-resolution image is used, the resolution of the decompressed image is higher than or equal to that of the image to be compressed (that is, the original image). This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • FIG. 6 is a schematic diagram of a first structure of an image compression apparatus according to an embodiment of the present application.
  • the apparatus includes the following modules.
  • a first compression module 602 is configured to perform convolution filtering and compression on an image to be compressed by using a first CNN model to obtain network compressed data.
  • the first CNN model and the second CNN model are obtained by training using a preset training set. Multiple low-resolution images with a resolution lower than the resolution threshold and images with a resolution higher than the resolution threshold corresponding to the low-resolution image.
  • the second CNN model is used to perform convolution filtering and decompression on network compressed data to obtain Decompress the image;
  • the first storage module 603 is configured to store network compressed data.
  • a second compression module 604 configured to perform size compression on the image to be compressed after obtaining the image to be compressed to obtain a size-compressed image
  • the second storage module 605 is configured to store the correspondence between the size-compressed image and a preset identifier after the network compressed data is obtained; the preset identifier is used to indicate that there is network compressed data of the image to be compressed.
  • the image to be compressed is located in a PDF document
  • the image to be compressed is in a Word document
  • the image to be compressed is in an Excel document; or
  • the image to be compressed is located in a WPS document.
  • An embodiment of the present application provides an image compression apparatus, which uses a plurality of images below a resolution threshold and a plurality of images above a resolution threshold to train a CNN model.
  • the CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • FIG. 8 is a schematic diagram of a first structure of an image decompression device provided by an embodiment of the present application.
  • the device includes the following modules.
  • An obtaining module 801, configured to obtain network compressed data of a target image
  • the decompression module 802 is configured to perform convolution filtering and decompression on the network compressed data by using the second CNN model to obtain a decompressed image.
  • the second CNN model and the first CNN model are obtained by training using a preset training set. Including multiple low-resolution images with a resolution lower than the resolution threshold and images with a resolution higher than the resolution threshold corresponding to the low-resolution image, the first CNN model is used to perform convolution filter compression on the image to be compressed to obtain Network compressed data;
  • An output module 803 is configured to output a decompressed image.
  • the obtaining module 801 may be specifically configured to obtain a size-compressed image of a target image; determine whether a preset identifier corresponding to the size-compressed image is stored; the preset identifier is used to indicate that network compression of the target image exists Data; if stored, get network compressed data.
  • the output module 803 may be further configured to output a size-compressed image if a preset identifier corresponding to the size-compressed image is not stored.
  • An embodiment of the present application provides an image decompression apparatus, which uses a plurality of images below a resolution threshold and a plurality of images above a resolution threshold to train a CNN model.
  • the CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • An embodiment of the present application further provides an image compression method.
  • the method includes the following steps.
  • Step 110 Obtain an image to be compressed.
  • Step 120 Use the first CNN model to perform convolution filtering and compression on the compressed image to obtain network compression data.
  • the first CNN model and the second CNN model are obtained by training using a preset training set, where the training set includes multiple sample images
  • the second CNN model is used to perform convolution filtering and decompression on network compressed data to obtain a decompressed image.
  • Step 130 Store network compression data.
  • the image compression method may further include:
  • the image to be compressed is subjected to size compression to obtain a size-compressed image
  • the correspondence between the size-compressed image and the preset identifier is stored; the preset identifier is used to indicate that there is network compressed data of the image to be compressed.
  • the image to be compressed is located in a PDF document; or the image to be compressed is located in a Word document; or the image to be compressed is located in an Excel document; or the image to be compressed is located in a WPS document.
  • An embodiment of the present application provides an image compression method.
  • a CNN model is trained by using multiple images below a resolution threshold and multiple images above a resolution threshold.
  • the CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space.
  • the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • An embodiment of the present application further provides an image decompression method.
  • the method includes the following steps.
  • Step 210 Obtain network compressed data of the target image.
  • Step 220 Use the second CNN model to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; wherein the second CNN model and the first CNN model are obtained by training using a preset training set, and the training set includes multiple samples Image, the first CNN model is used to perform convolution filter compression on the image to be compressed, to obtain network compressed data.
  • Step 230 Output a decompressed image.
  • the step of obtaining network compressed data of a target image may include:
  • the network compressed data is obtained.
  • the image decompression method may further include:
  • the size-compressed image is output.
  • An embodiment of the present application provides an image decompression method, which uses multiple images below a resolution threshold and multiple images above a resolution threshold to train a CNN model.
  • the CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • the first CNN model and the second CNN model may be jointly trained.
  • the joint training of the first CNN model and the second CNN model may include the following steps.
  • Step b1 Obtain a preset first CNN model and a second CNN model. Initialize the parameters in the first CNN model and the second CNN model. The initialized parameters can be set according to actual needs and experience.
  • Step b2 Obtain a preset training set.
  • the training set includes multiple sample images.
  • Step b3 Perform the first forward calculation, which specifically includes: inputting each sample image in the training set into a preset first CNN model and performing convolution filtering and compression processing to obtain network compression data corresponding to each sample image.
  • step b4 after obtaining network compressed data corresponding to a sample image, it is determined that the data amount of the network compressed data is less than a preset data amount. If it is less than the preset data amount, step b4 is performed. If it is greater than or equal to the preset data amount, step b7 is performed.
  • Step b4 performing a second forward calculation, which specifically includes: inputting network compression data corresponding to each sample image into a preset second CNN model and performing convolution filtering and decompression processing to obtain a decompression corresponding to each sample image. image.
  • Step b5 Determine an image loss value based on each sample image and the corresponding decompressed image.
  • the similarity between the sample image and the corresponding decompressed image may be calculated, and the reciprocal of the calculated similarity is used as the image loss value.
  • the greater the similarity the smaller the image loss value.
  • the smaller the similarity the larger the image loss value.
  • the MSE formula can also be used as a loss function to calculate the mean square error between the sample image and the corresponding decompressed image to obtain the image loss value.
  • a loss function to calculate the mean square error between the sample image and the corresponding decompressed image to obtain the image loss value.
  • Step b6 Determine whether the preset first CNN model and the second CNN model converge based on the image loss value. If not, proceed to step b7; if converge, end training.
  • a third loss threshold may be set in advance. If the image loss value is lower than the third loss threshold, it is determined that the first CNN model and the second CNN model converge. If the image loss value is not lower than the third loss threshold, it is determined that the first CNN model and the second CNN model do not converge.
  • Step b7 Adjust the parameters in the preset first CNN model and the second CNN model, and return to step b3.
  • the first CNN model obtained by training in steps b1 to b7 is used to compress the image to obtain network compressed data.
  • the amount of network compressed data is less than the amount of data to be compressed, which reduces the storage space occupied by the image.
  • the second CNN model trained in the above steps b1-b7 is used to decompress the network compressed data to obtain a decompressed image. Because the second CNN model is obtained by training with multiple sample images, the resolution of the decompressed image is relatively close to the resolution of the image to be compressed (that is, the original image). This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • An embodiment of the present application further provides an image compression device.
  • the device includes an acquisition module 310, a first compression module 320, and a first storage module 330.
  • An obtaining module 310 configured to obtain an image to be compressed
  • a first compression module 320 is configured to perform convolution filtering and compression on a compressed image using a first CNN model to obtain network compressed data; wherein the first CNN model and the second CNN model are obtained by training using a preset training set, and the training set includes Multiple sample images, the second CNN model is used to decompress the network compressed data by convolution filtering to obtain the decompressed image;
  • the first storage module 330 is configured to store network compressed data.
  • the image compression apparatus may further include:
  • a second compression module configured to compress the size of the image to be compressed after obtaining the image to be compressed to obtain a size-compressed image
  • the second storage module is configured to store the correspondence between the size-compressed image and the preset identifier after the network compressed data is obtained; the preset identifier is used to indicate that there is network compressed data of the image to be compressed.
  • the image to be compressed is located in a PDF document; or the image to be compressed is located in a Word document; or the image to be compressed is located in an Excel document; or the image to be compressed is located in a WPS document.
  • An embodiment of the present application provides an image compression device, which trains a CNN model by using multiple images below a resolution threshold and multiple images above a resolution threshold.
  • the CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • An embodiment of the present application further provides an image decompression device.
  • the device includes: an acquisition module 410, a decompression module 420, and an output module 430.
  • An obtaining module 410 configured to obtain network compressed data of a target image
  • the decompression module 420 is configured to perform convolution filtering and decompression on the network compressed data by using the second CNN model to obtain a decompressed image.
  • the second CNN model and the first CNN model are obtained by training using a preset training set. Including multiple sample images, the first CNN model is used to perform convolution filter compression on the compressed image to be compressed to obtain network compressed data;
  • the output module 430 is configured to output a decompressed image.
  • the obtaining module 410 may be specifically configured to obtain the size-compressed image of the target image; determine whether a preset identifier corresponding to the size-compressed image is stored; the preset identifier is used to indicate that network compression of the target image exists Data; if stored, get network compressed data.
  • the output module 430 may be further configured to output a size-compressed image if a preset identifier corresponding to the size-compressed image is not stored.
  • An embodiment of the present application provides an image decompression device, which uses a plurality of images below a resolution threshold and a plurality of images above a resolution threshold to train a CNN model.
  • the CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • an embodiment of the present application further provides an electronic device, as shown in FIG. 9, including an processor 901, a communication interface 902, a memory 903, and a communication bus 904.
  • the memory 903 completes communication with each other through the communication bus 904.
  • the memory 903 is configured to store a computer program
  • the processor 901 is configured to implement the foregoing image compression method when executing a program stored in the memory 903.
  • the image compression method includes:
  • the first CNN model is used to perform convolution filtering and compression on the compressed image to obtain network compressed data.
  • the first CNN model and the second CNN model are obtained by training using a preset training set, and the training set includes multiple resolutions lower than the resolution. Threshold low-resolution images, and images corresponding to low-resolution images with a resolution higher than the resolution threshold, the second CNN model is used to perform convolution filtering and decompression on network compressed data to obtain decompressed images;
  • Storage network compresses data.
  • An embodiment of the present application provides an electronic device for training a CNN model by using multiple images below a resolution threshold and multiple images above a resolution threshold.
  • the CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to decompress the network compressed data into a convolution filter to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • an embodiment of the present application further provides an electronic device.
  • the electronic device includes a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004.
  • the processor 1001, The interface 1002 and the memory 1003 complete communication with each other through the communication bus 1004.
  • the processor 1001 is configured to implement the foregoing image decompression method when executing a program stored in the memory 1003.
  • the image decompression method includes:
  • the second CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; wherein the second CNN model and the first CNN model are obtained by training using a preset training set, and the training set includes multiple resolutions lower than The low-resolution image with a resolution threshold and the image with a resolution higher than the resolution threshold corresponding to the low-resolution image, the first CNN model is used to perform convolution filter compression on the compressed image compression to obtain network compressed data;
  • An embodiment of the present application provides an electronic device for training a CNN model by using multiple images below a resolution threshold and multiple images above a resolution threshold.
  • the CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • an embodiment of the present application further provides an electronic device including a processor, a communication interface, a memory, and a communication bus.
  • the processor, the communication interface, and the memory always perform mutual communication through communication.
  • the processor is configured to implement the foregoing image compression method when executing a program stored in the memory.
  • the image compression method includes:
  • the first convolutional neural network model is used to perform convolution filtering and compression on the compressed image to obtain network compressed data.
  • the first convolutional neural network model and the second convolutional neural network model are obtained by training using a preset training set. Including multiple sample images, the second convolutional neural network model is used to decompress the network compressed data by convolution filtering to obtain a decompressed image;
  • Storage network compresses data.
  • An embodiment of the present application provides an electronic device for training a CNN model by using multiple images below a resolution threshold and multiple images above a resolution threshold.
  • the CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • an embodiment of the present application further provides an electronic device including a processor, a communication interface, a memory, and a communication bus.
  • the processor, the communication interface, and the memory always perform communication with each other through communication.
  • the processor is configured to implement the foregoing image decompression method when executing a program stored in the memory.
  • the image decompression method includes:
  • the second convolutional neural network model uses the second convolutional neural network model to decompress the network compressed data to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network model are obtained by training using a preset training set, The training set includes multiple sample images, and the first convolutional neural network model is used to perform convolution filter compression on the compressed image compression to obtain network compressed data;
  • An embodiment of the present application provides an electronic device for training a CNN model by using multiple images below a resolution threshold and multiple images above a resolution threshold.
  • the CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.
  • the above communication bus may be a PCI (Peripheral Component Interconnect, Peripheral Component Interconnect Standard) bus or an EISA (Extended Industry Standard Architecture, Extended Industry Standard Architecture) bus, etc.
  • the communication bus can be divided into an address bus, a data bus, a control bus, and the like.
  • the communication interface is used for communication between the electronic device and other devices.
  • the foregoing memory may include RAM (Random Access Memory, Random Access Memory), and may also include NVM (Non-Volatile Memory, non-volatile memory), such as at least one disk memory.
  • NVM Non-Volatile Memory, non-volatile memory
  • the memory may also be at least one storage device located far from the foregoing processor.
  • the above processor may be a general-purpose processor, including a CPU (Central Processing Unit), a NP (Network Processor), etc .; it may also be a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
  • a CPU Central Processing Unit
  • NP Network Processor
  • DSP Digital Signal Processing
  • ASIC Application Specific Integrated Circuit
  • FPGA Field-Programmable Gate Array
  • Other programmable logic devices discrete gate or transistor logic devices, and discrete hardware components.
  • the embodiment of the present application further provides a machine-readable storage medium.
  • a computer program is stored in the machine-readable storage medium.
  • the computer program is executed by a processor, any one of the foregoing image compression methods is implemented.
  • the embodiment of the present application further provides a machine-readable storage medium.
  • a computer program is stored in the machine-readable storage medium.
  • the computer program is executed by a processor, any of the foregoing image decompression methods is implemented .
  • an embodiment of the present application further provides a computer program that implements any one of the foregoing image compression methods when the computer program is executed by a processor.
  • an embodiment of the present application further provides a computer program that implements any one of the foregoing image decompression methods when the computer program is executed by a processor.
  • the image compression device embodiment, the image decompression device embodiment, the electronic device embodiment, the machine-readable storage medium embodiment, and the computer program embodiment are basically similar to the image compression method and the image decompression method.
  • the description is relatively simple.
  • related points refer to the description of the image compression method and image decompression method embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Embodiments of the present application provide an image compression and decompression method and apparatus, an electronic device, and a storage medium. The method comprises: acquiring an image to be compressed; applying a convolutional neural network model to compress said image by means of a convolution filter, and obtaining neural network-based compressed data, wherein the convolutional neural network model is trained and obtained by means of a preset training set, and the training set comprises: a plurality of low resolution images having a resolution lower than a resolution threshold; and images, corresponding to the low resolution images, having a resolution higher than the resolution threshold; and storing the neural network-based compressed data. The embodiments of the present application achieve improved image resolution for users upon viewing compressed images, and improve the user experience.

Description

图像压缩、解压缩方法、装置、电子设备及存储介质Image compression and decompression method and device, electronic equipment and storage medium

本申请要求于2018年9月19日提交中国专利局、申请号为201811095462.0发明名称为“图像压缩、解压缩方法、装置、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on September 19, 2018, with the application number 201811095462.0, and the invention name is "Image Compression, Decompression Method, Device, Electronic Equipment, and Storage Medium". Citations are incorporated in this application.

技术领域Technical field

本申请涉及图像处理技术领域,特别是涉及一种图像压缩、解压缩方法、装置、电子设备及存储介质。The present application relates to the field of image processing technology, and in particular, to an image compression and decompression method, device, electronic device, and storage medium.

背景技术Background technique

目前,为减少图像占用的存储空间,便于图像的传输等,常常需要对图像进行尺寸压缩。其中,图像的尺寸压缩包括减小图像的尺寸,以降低图像的分辨率。例如,将100*100像素的图像压缩为50*50像素的图像。但是若采用这种压缩方式压缩图像,当用户查看压缩图像时,只能查看到压缩后的图像,即分辨率低的图像,用户体验较差。At present, in order to reduce the storage space occupied by an image and facilitate the transmission of the image, it is often necessary to compress the size of the image. The compression of the size of the image includes reducing the size of the image to reduce the resolution of the image. For example, a 100 * 100 pixel image is compressed into a 50 * 50 pixel image. However, if the image is compressed by this compression method, when the user views the compressed image, the user can only see the compressed image, that is, the image with lower resolution, and the user experience is poor.

发明内容Summary of the Invention

本申请实施例的目的在于提供一种图像压缩、解压缩方法、装置、电子设备及存储介质,以提高用户查看压缩图像时所查看到的图像的分辨率,提高用户体验。具体技术方案如下:The purpose of the embodiments of the present application is to provide an image compression and decompression method, device, electronic device, and storage medium, so as to improve the resolution of an image viewed by a user when viewing the compressed image, and improve the user experience. Specific technical solutions are as follows:

第一方面,本申请实施例提供了一种图像压缩方法,所述方法包括:In a first aspect, an embodiment of the present application provides an image compression method, where the method includes:

获取待压缩图像;Obtain the image to be compressed;

利用第一CNN(Convolutional Neural Network,卷积神经网络)模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一CNN模型和第二CNN模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第二CNN模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;Use a first CNN (Convolutional Neural Network) model to perform convolution filtering and compression on the to-be-compressed image to obtain network compressed data; wherein the first CNN model and the second CNN model use preset training The training set is obtained. The training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images with a resolution higher than the resolution threshold corresponding to the low-resolution images. The second CNN model is used for Performing convolution filtering decompression on the network compressed data to obtain a decompressed image;

存储所述网络压缩数据。The network compressed data is stored.

可选的,所述方法还包括:Optionally, the method further includes:

在获取到所述待压缩图像之后,对所述待压缩图像进行尺寸压缩,得到尺寸压缩图像;After obtaining the image to be compressed, performing size compression on the image to be compressed to obtain a size-compressed image;

在得到所述网络压缩数据后,存储所述尺寸压缩图像与预设标识的对应关系;所述预设标识用于指示存在所述待压缩图像的网络压缩数据。After the network compressed data is obtained, the correspondence between the size compressed image and a preset identifier is stored; the preset identifier is used to indicate the presence of the network compressed data of the image to be compressed.

可选的,所述待压缩图像位于PDF文档中;或者所述待压缩图像位于Word文档中;或者所述待压缩图像位于Excel文档中;或者所述待压缩图像位于WPS文档中。Optionally, the image to be compressed is located in a PDF document; or the image to be compressed is located in a Word document; or the image to be compressed is located in an Excel document; or the image to be compressed is located in a WPS document.

第二方面,本申请实施例提供了一种图像解压缩方法,所述方法包括:In a second aspect, an embodiment of the present application provides an image decompression method, where the method includes:

获取目标图像的网络压缩数据;Obtain the network compressed data of the target image;

利用第二CNN模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二CNN模型和第一CNN模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第一CNN模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;Convolutional filtering and decompression of the network compressed data using a second CNN model to obtain a decompressed image; wherein the second CNN model and the first CNN model are obtained by training using a preset training set, and the training set includes A plurality of low-resolution images with a resolution lower than a resolution threshold, and images corresponding to a low-resolution image with a resolution higher than the resolution threshold, the first CNN model is used to perform convolution filtering on image compression Compress to obtain the network compressed data;

输出所述解压缩图像。The decompressed image is output.

可选的,所述获取目标图像的网络压缩数据的步骤,包括:Optionally, the step of obtaining network compressed data of a target image includes:

获取目标图像的尺寸压缩图像;Obtain the size-compressed image of the target image;

判断是否存储有所述尺寸压缩图像对应的预设标识;所述预设标识用于指示存在所述目标图像的网络压缩数据;Determining whether a preset identifier corresponding to the compressed image of the size is stored; the preset identifier is used to indicate that network compression data of the target image exists;

若存储有,则获取所述网络压缩数据。If stored, the network compressed data is obtained.

可选的,所述方法还包括:Optionally, the method further includes:

若未存储所述尺寸压缩图像对应的所述预设标识,则输出所述尺寸压缩图像。If the preset identifier corresponding to the size-compressed image is not stored, the size-compressed image is output.

第三方面,本申请实施例提供了一种图像压缩装置,所述装置包括:In a third aspect, an embodiment of the present application provides an image compression apparatus, where the apparatus includes:

获取模块,用于获取待压缩图像;An acquisition module for acquiring an image to be compressed;

第一压缩模块,用于利用第一CNN模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一CNN模型和第二CNN模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第二CNN模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;A first compression module, configured to perform convolution filtering and compression on the image to be compressed using a first CNN model to obtain network compressed data; wherein the first CNN model and the second CNN model are obtained by training using a preset training set The training set includes multiple low-resolution images with a resolution lower than the resolution threshold, and images with a resolution higher than the resolution threshold corresponding to the low-resolution images, and the second CNN model is used for Decompress the network compressed data by convolution filtering to obtain a decompressed image;

第一存储模块,用于存储所述网络压缩数据。The first storage module is configured to store the network compressed data.

可选的,所述装置还包括:Optionally, the device further includes:

第二压缩模块,用于在获取到所述待压缩图像之后,对所述待压缩图像进行尺寸压缩,得到尺寸压缩图像;A second compression module, configured to compress the image to be compressed after obtaining the image to be compressed to obtain a size-compressed image;

第二存储模块,用于在得到所述网络压缩数据后,存储所述尺寸压缩图像与预设标识的对应关系;所述预设标识用于指示存在所述待压缩图像的网络压缩数据。A second storage module is configured to store the correspondence between the size compressed image and a preset identifier after the network compressed data is obtained, where the preset identifier is used to indicate the existence of network compressed data of the image to be compressed.

可选的,所述待压缩图像位于PDF文档中;或者所述待压缩图像位于Word文档中;或者所述待压缩图像位于Excel文档中;或者所述待压缩图像位于WPS文档中。Optionally, the image to be compressed is located in a PDF document; or the image to be compressed is located in a Word document; or the image to be compressed is located in an Excel document; or the image to be compressed is located in a WPS document.

第四方面,本申请实施例提供了一种图像解压缩装置,所述装置包括:In a fourth aspect, an embodiment of the present application provides an image decompression device, where the device includes:

获取模块,用于获取目标图像的网络压缩数据;An acquisition module for acquiring network compressed data of a target image;

解压缩模块,用于利用第二CNN模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二CNN模型和第一CNN模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第一CNN模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;A decompression module, configured to perform convolution filtering and decompression on the network compressed data using a second CNN model to obtain a decompressed image; wherein the second CNN model and the first CNN model are obtained by training using a preset training set; The training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images with a resolution higher than the resolution threshold corresponding to the low-resolution images, and the first CNN model is used to be compressed. Image compression and convolution filter compression to obtain the network compression data;

输出模块,用于输出所述解压缩图像。An output module, configured to output the decompressed image.

可选的,所述获取模块,具体用于获取目标图像的尺寸压缩图像;判断 是否存储有所述尺寸压缩图像对应的预设标识;所述预设标识用于指示存在所述目标图像的网络压缩数据;若存储有,则获取所述网络压缩数据。Optionally, the obtaining module is specifically configured to obtain a size-compressed image of the target image; determine whether a preset identifier corresponding to the size-compressed image is stored; and the preset identifier is used to indicate a network in which the target image exists Compressed data; if stored, obtain the network compressed data.

可选的,所述输出模块,还用于若未存储所述尺寸压缩图像对应的所述预设标识,则输出所述尺寸压缩图像。Optionally, the output module is further configured to output the size-compressed image if the preset identifier corresponding to the size-compressed image is not stored.

第五方面,本申请实施例提供了一种图像压缩方法,所述方法包括:In a fifth aspect, an embodiment of the present application provides an image compression method, where the method includes:

获取待压缩图像;Obtain the image to be compressed;

利用第一CNN模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一CNN模型和第二CNN模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第二CNN模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;The first CNN model is used to perform convolution filtering and compression on the image to be compressed to obtain network compressed data; wherein the first CNN model and the second CNN model are obtained by training using a preset training set, and the training set includes multiple Sample images, the second CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image;

存储所述网络压缩数据。The network compressed data is stored.

第六方面,本申请实施例提供了一种图像解压缩方法,所述方法包括:According to a sixth aspect, an embodiment of the present application provides an image decompression method, where the method includes:

获取目标图像的网络压缩数据;Obtain the network compressed data of the target image;

利用第二CNN模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二CNN模型和第一CNN模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第一CNN模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;Convolutional filtering and decompression of the network compressed data using a second CNN model to obtain a decompressed image; wherein the second CNN model and the first CNN model are obtained by training using a preset training set, and the training set includes Multiple sample images, the first CNN model is used to perform convolution filter compression on the image to be compressed to obtain the network compression data;

输出所述解压缩图像。The decompressed image is output.

第七方面,本申请实施例提供了一种图像压缩装置,所述装置包括:In a seventh aspect, an embodiment of the present application provides an image compression apparatus, where the apparatus includes:

获取模块,用于获取待压缩图像;An acquisition module for acquiring an image to be compressed;

第一压缩模块,用于利用第一CNN模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一CNN模型和第二CNN模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第二CNN模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;A first compression module, configured to perform convolution filtering and compression on the image to be compressed using a first CNN model to obtain network compressed data; wherein the first CNN model and the second CNN model are obtained by training using a preset training set The training set includes multiple sample images, and the second CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image;

第一存储模块,用于存储所述网络压缩数据。The first storage module is configured to store the network compressed data.

第八方面,本申请实施例提供了一种图像解压缩装置,所述装置包括:In an eighth aspect, an embodiment of the present application provides an image decompression device, where the device includes:

获取模块,用于获取目标图像的网络压缩数据;An acquisition module for acquiring network compressed data of a target image;

解压缩模块,用于利用第二CNN模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二CNN模型和第一CNN模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第一CNN模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;A decompression module, configured to perform convolution filtering and decompression on the network compressed data using a second CNN model to obtain a decompressed image; wherein the second CNN model and the first CNN model are obtained by training using a preset training set; The training set includes multiple sample images, and the first CNN model is used to perform convolution filter compression on the compressed image to be compressed to obtain the network compressed data;

输出模块,用于输出所述解压缩图像。An output module, configured to output the decompressed image.

第九方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口、所述存储器通过所述通信总线完成相互间的通信;In a ninth aspect, an embodiment of the present application provides an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete each other through the communication bus. Communication;

所述存储器,用于存放计算机程序;The memory is used to store a computer program;

所述处理器,用于执行所述存储器上所存放的程序,实现第一方面提供的任一图像压缩方法步骤。The processor is configured to execute a program stored on the memory to implement any of the steps of the image compression method provided by the first aspect.

第十方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口、所述存储器通过所述通信总线完成相互间的通信;According to a tenth aspect, an embodiment of the present application provides an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete each other through the communication bus. Communication;

所述存储器,用于存放计算机程序;The memory is used to store a computer program;

所述处理器,用于执行所述存储器上所存放的程序,实现第二方面提供的任一图像解压缩方法步骤。The processor is configured to execute a program stored on the memory to implement any of the steps of the image decompression method provided by the second aspect.

第十一方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口、所述存储器通过所述通信总线完成相互间的通信;According to an eleventh aspect, an embodiment of the present application provides an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete each other through the communication bus Communication

所述存储器,用于存放计算机程序;The memory is used to store a computer program;

所述处理器,用于执行所述存储器上所存放的程序,实现第五方面提供的任一图像压缩方法步骤。The processor is configured to execute a program stored on the memory to implement any of the steps of the image compression method provided by the fifth aspect.

第十二方面,本申请实施例提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口、所述存储器通 过所述通信总线完成相互间的通信;In a twelfth aspect, an embodiment of the present application provides an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete each other through the communication bus. Communication

所述存储器,用于存放计算机程序;The memory is used to store a computer program;

所述处理器,用于执行所述存储器上所存放的程序,实现第六方面提供的任一图像解压缩方法步骤。The processor is configured to execute a program stored on the memory to implement any of the steps of the image decompression method provided by the sixth aspect.

第十三方面,本申请实施例提供了一种机器可读存储介质,所述机器可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现第一方面提供的任一图像压缩方法步骤。In a thirteenth aspect, an embodiment of the present application provides a machine-readable storage medium. The machine-readable storage medium stores a computer program, and when the computer program is executed by a processor, any image provided in the first aspect is implemented. Compression method steps.

第十四方面,本申请实施例提供了一种机器可读存储介质,所述机器可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现第二方面提供的任一图像解压缩方法步骤。In a fourteenth aspect, an embodiment of the present application provides a machine-readable storage medium. The machine-readable storage medium stores a computer program. When the computer program is executed by a processor, any image provided in the second aspect is implemented. Decompression method steps.

第十五方面,本申请实施例提供了一种机器可读存储介质,所述机器可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现第五方面提供的任一图像压缩方法步骤。In a fifteenth aspect, an embodiment of the present application provides a machine-readable storage medium. The machine-readable storage medium stores a computer program, and when the computer program is executed by a processor, any image provided in the fifth aspect is implemented. Compression method steps.

第十六方面,本申请实施例提供了一种机器可读存储介质,所述机器可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现第六方面提供的任一图像解压缩方法步骤。In a sixteenth aspect, an embodiment of the present application provides a machine-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any image provided in the sixth aspect is implemented Decompression method steps.

第十七方面,本申请实施例提供了一种计算机程序,所述计算机程序被处理器执行时实现第一方面提供的任一图像压缩方法步骤。In a seventeenth aspect, an embodiment of the present application provides a computer program that, when executed by a processor, implements any of the image compression method steps provided in the first aspect.

第十八方面,本申请实施例提供了一种计算机程序,所述计算机程序被处理器执行时实现第二方面提供的任一图像解压缩方法步骤。In an eighteenth aspect, an embodiment of the present application provides a computer program that, when executed by a processor, implements any of the image decompression method steps provided in the second aspect.

第十九方面,本申请实施例提供了一种计算机程序,所述计算机程序被处理器执行时实现第五方面提供的任一图像压缩方法步骤。In a nineteenth aspect, an embodiment of the present application provides a computer program that, when executed by a processor, implements any of the image compression method steps provided in the fifth aspect.

第二十方面,本申请实施例提供了一种计算机程序,所述计算机程序被处理器执行时实现第六方面提供的任一图像解压缩方法步骤。In a twentieth aspect, an embodiment of the present application provides a computer program that, when executed by a processor, implements any of the image decompression method steps provided in the sixth aspect.

本申请实施例提供了一种图像压缩、解压缩方法、装置、电子设备及存储介质,利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网 络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。当然,实施本申请的任一产品或方法必不一定需要同时达到以上所述的所有优点。Embodiments of the present application provide an image compression and decompression method, device, electronic device, and storage medium. A CNN model is trained by using multiple images below a resolution threshold and multiple images above a resolution threshold. The CNN model is used to perform convolution filtering and compression on the images to obtain network compression data with smaller resolution to reduce the storage space occupied. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience. Of course, to implement any product or method of the present application, it is not necessary to achieve all the advantages described above at the same time.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present application or the prior art more clearly, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to these drawings without paying creative labor.

图1为本申请实施例提供的图像压缩方法的第一种流程示意图;FIG. 1 is a first schematic flowchart of an image compression method according to an embodiment of the present application; FIG.

图2为本申请实施例提供的CNN模型训练方法的一种流程示意图;2 is a schematic flowchart of a CNN model training method according to an embodiment of the present application;

图3为本申请实施例提供的图像压缩方法的第二种流程示意图;3 is a schematic flowchart of a second method of an image compression method according to an embodiment of the present application;

图4为本申请实施例提供的图像解压缩方法的第一种流程示意图;4 is a first schematic flowchart of an image decompression method according to an embodiment of the present application;

图5为本申请实施例提供的图像解压缩方法的第二种流程示意图;FIG. 5 is a second schematic flowchart of an image decompression method according to an embodiment of the present application; FIG.

图6为本申请实施例提供的图像压缩装置的第一种结构示意图;FIG. 6 is a first schematic structural diagram of an image compression device according to an embodiment of the present application; FIG.

图7为本申请实施例提供的图像压缩装置的第二种结构示意图;7 is a schematic diagram of a second structure of an image compression device according to an embodiment of the present application;

图8为本申请实施例提供的图像解压缩装置的第一种结构示意图;8 is a first schematic structural diagram of an image decompression device according to an embodiment of the present application;

图9为本申请实施例提供的电子设备的第一种结构示意图;FIG. 9 is a first schematic structural diagram of an electronic device according to an embodiment of the present application; FIG.

图10为本申请实施例提供的电子设备的第二种结构示意图。FIG. 10 is a schematic diagram of a second structure of an electronic device according to an embodiment of the present application.

具体实施方式detailed description

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做 出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In the following, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without doing creative work fall within the protection scope of the present application.

为降低查看压缩后图像时图像分辨率的损失,提高用户体验,本申请实施例提供了一种图像压缩方法及一种图像解压缩方法。该图像压缩及解压缩方法可以应用于手机、电脑、笔记本等任一电子设备。In order to reduce the loss of image resolution when viewing the compressed image and improve the user experience, embodiments of the present application provide an image compression method and an image decompression method. The image compression and decompression method can be applied to any electronic device such as a mobile phone, a computer, and a notebook.

本申请实施例提供的图像压缩及解压缩方法中,利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。In the image compression and decompression method provided by the embodiments of the present application, a CNN model is trained by using multiple images below a resolution threshold and multiple images above a resolution threshold. The CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

下面通过具体实施例,对本申请实施例提供的图像压缩方法和图像解压缩方法进行详细说明。The image compression method and the image decompression method provided by the embodiments of the present application will be described in detail below through specific embodiments.

参考图1,图1为本申请实施例提供的图像压缩方法的第一种流程示意图,该方法包括如下步骤。Referring to FIG. 1, FIG. 1 is a schematic flowchart of a first method of an image compression method according to an embodiment of the present application. The method includes the following steps.

步骤101,获取待压缩图像。Step 101: Obtain an image to be compressed.

在需要对图像进行压缩时,获取该图像作为待压缩图像。When an image needs to be compressed, the image is acquired as an image to be compressed.

本申请实施例中,待压缩图像可以为独立的一张图像,也可以为位于文档中的图像。这里的文档包括但不限于PDF文档、Word文档、Excel文档、WPS文档等。其中,PDF文档可为可编辑PDF文档。In the embodiment of the present application, the image to be compressed may be an independent image or an image located in a document. The documents here include but are not limited to PDF documents, Word documents, Excel documents, WPS documents, etc. The PDF document may be an editable PDF document.

步骤102,利用CNN模型对待压缩图像进行压缩,得到网络压缩数据。Step 102: Compress the compressed image using the CNN model to obtain network compressed data.

步骤102即为利用第一CNN模型对待压缩图像进行卷积滤波压缩,得到网络压缩数据。Step 102 is to use the first CNN model to perform convolution filtering and compression on the image to be compressed to obtain network compressed data.

其中,第一CNN模型用于对待压缩图像进行卷积滤波压缩,得到网络压缩数据。第一CNN模型和第二CNN模型利用预设的训练集训练获得,训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应 的分辨率高于分辨率阈值的图像,第二CNN模型用于对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。The first CNN model is used to perform convolution filter compression on the image to be compressed to obtain network compressed data. The first CNN model and the second CNN model are obtained by training with a preset training set. The training set includes multiple low-resolution images with a resolution lower than the resolution threshold, and the resolution corresponding to the low-resolution image is higher than the resolution threshold Image, the second CNN model is used to decompress the network compressed data by convolution filtering to obtain a decompressed image.

本申请实施例中,分辨率高于分辨率阈值的图像即为高分辨率图像。一低分辨率图像可以对应一个或多个高分辨率图像,一高分辨率图像可以对应一个或多个低分辨率图像。In the embodiment of the present application, an image with a resolution higher than the resolution threshold is a high-resolution image. A low-resolution image may correspond to one or more high-resolution images, and a high-resolution image may correspond to one or more low-resolution images.

在本申请的一个实施例中,参考图2所示的第一CNN模型的训练流程,包括如下步骤。In an embodiment of the present application, referring to the training process of the first CNN model shown in FIG. 2, the method includes the following steps.

步骤21,获取预设的第一CNN模型。初始化第一CNN模型中的参数,初始化的参数可以根据实际需要和经验进行设置。Step 21: Obtain a preset first CNN model. Initialize the parameters in the first CNN model. The initialized parameters can be set according to actual needs and experience.

本步骤中,还可以对训练相关的高层参数进行设置,其中,高层参数可以包括学习率、梯度下降算法等。具体可以采用相关技术中的各种方式对高层参数进行设置,在此不进行详细描述。In this step, training-related high-level parameters may also be set, where the high-level parameters may include a learning rate, a gradient descent algorithm, and the like. Specifically, the high-level parameters may be set in various manners in related technologies, which is not described in detail here.

步骤22,获取预设的训练集。训练集中包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的且分辨率高于分辨率阈值的高分辨率图像。Step 22: Obtain a preset training set. The training set includes multiple low-resolution images with a resolution below the resolution threshold, and high-resolution images corresponding to the low-resolution image and with a resolution above the resolution threshold.

步骤23、获取多张高分辨率图像对应的网络压缩数据。Step 23: Obtain network compressed data corresponding to multiple high-resolution images.

其中,高分辨率图像的网络压缩数据可以预先存储在存储数据库中。将高分辨率图像的网络压缩数据输入第二CNN模型,可得到该高分辨率图像。The network compressed data of the high-resolution image can be stored in a storage database in advance. The network compression data of the high-resolution image is input to the second CNN model, and the high-resolution image can be obtained.

步骤24,进行前向计算,具体包括:将训练集中的每个低分辨率图像分别输入预设的第一CNN模型进行卷积滤波压缩处理,得到每个低分辨率图像对应的网络压缩数据。Step 24: Perform forward calculation, which specifically includes: inputting each low-resolution image in the training set into a preset first CNN model and performing convolution filtering and compression processing to obtain network compressed data corresponding to each low-resolution image.

本申请实施例中不限定步骤23和步骤24的执行顺序。The execution order of steps 23 and 24 is not limited in the embodiment of the present application.

步骤25,基于多个高分辨率图像对应的网络压缩数据和每个低分辨率图像对应的网络压缩数据,确定图像卷积滤波压缩的损失值。Step 25: Determine a loss value of image convolution filter compression based on network compressed data corresponding to multiple high-resolution images and network compressed data corresponding to each low-resolution image.

本申请实施例中,可以计算高分辨率图像对应的网络压缩数据与低分辨率图像对应的网络压缩数据的相似度,将计算得到的相似度的倒数作为图像卷积滤波压缩的损失值。相似度越大,图像卷积滤波压缩的损失值越小。相 似度越小,图像卷积滤波压缩的损失值越大。In the embodiment of the present application, the similarity between the network compressed data corresponding to the high-resolution image and the network compressed data corresponding to the low-resolution image can be calculated, and the reciprocal of the calculated similarity is used as the loss value of the image convolution filter compression. The larger the similarity, the smaller the loss value of image convolution filter compression. The smaller the similarity, the larger the loss value of image convolution filter compression.

本申请实施例中,还可以使用均方误差(Mean Squared Error,MSE)公式作为损失函数,计算上述高分辨率图像对应的网络压缩数据与低分辨率图像对应的网络压缩数据的均方误差,得到图像卷积滤波压缩的损失值。具体的可参考相关技术中对MSE描述,此处不再赘述。In the embodiment of the present application, a Mean Squared Error (MSE) formula can also be used as a loss function to calculate the mean square error of the network compressed data corresponding to the high-resolution image and the network compressed data corresponding to the low-resolution image. The loss value of image convolution filter compression is obtained. For details, refer to the description of MSE in related technologies, and details are not described herein again.

步骤26、基于图像卷积滤波压缩的损失值,确定预设的第一CNN模型是否收敛。如果不收敛,进入步骤27;如果收敛,结束第一CNN模型训练。Step 26: Determine whether the preset first CNN model converges based on the loss value of the image convolution filter compression. If not, proceed to step 27; if converge, end the first CNN model training.

一个实施例中,可以预先设置有第一损失阈值。若图像卷积滤波压缩的损失值低于第一损失阈值,则确定第一CNN模型收敛。若图像卷积滤波压缩的损失值不低于第一损失阈值,则确定第一CNN模型不收敛。In one embodiment, a first loss threshold may be set in advance. If the loss value of the image convolution filter compression is lower than the first loss threshold, it is determined that the first CNN model converges. If the loss value of the image convolution filter compression is not lower than the first loss threshold, it is determined that the first CNN model does not converge.

步骤27,调整预设的第一CNN模型中的参数,返回步骤24。Step 27: Adjust parameters in the preset first CNN model, and return to step 24.

第一CNN模型训练的电子设备和压缩图像的电子设备,可以为同一台设备,也可以为不同的设备。The electronic device for training the first CNN model and the electronic device for compressing images may be the same device or different devices.

步骤103,存储网络压缩数据。Step 103: Store network compression data.

本申请实施例中,若待压缩图像为独立的一张图像,在获取到网络压缩数据后,直接存储得到的网络压缩数据。若待压缩图像为位于文档中的图像,则在获取到网络压缩数据后,将得到的网络压缩数据存储在文档中。例如,待压缩图像1位于PDF文档f1中,则在得到待压缩图像1的网络压缩数据1后,将网络压缩数据1存储在PDF文档f1中。In the embodiment of the present application, if the image to be compressed is an independent image, after obtaining the network compressed data, the obtained network compressed data is directly stored. If the image to be compressed is an image located in a document, after obtaining the network compressed data, the obtained network compressed data is stored in the document. For example, if the image 1 to be compressed is located in the PDF document f1, after obtaining the network compressed data 1 of the image 1 to be compressed, the network compressed data 1 is stored in the PDF document f1.

本申请实施例中,采用第一CNN模型压缩得到的网络压缩数据,并不是图像,采用图像处理软件并不能直接打开网络压缩数据得到图像。为便于查看,参考图3,图3为本申请实施例提供图像压缩方法的第二种流程示意图,基于图1,该方法包括如下步骤。In the embodiment of the present application, the network compressed data obtained by using the first CNN model compression is not an image, and image processing software cannot directly open the network compressed data to obtain an image. For ease of reference, reference is made to FIG. 3, which is a schematic flowchart of a second method for providing an image compression method according to an embodiment of the present application. Based on FIG. 1, the method includes the following steps.

步骤301,获取待压缩图像。Step 301: Obtain an image to be compressed.

步骤301与步骤101相同。Step 301 is the same as step 101.

步骤302,利用CNN模型对待压缩图像进行压缩,得到网络压缩数据。Step 302: Compress the image to be compressed using the CNN model to obtain network compressed data.

步骤302即为利用第一CNN模型对待压缩图像进行卷积滤波压缩,得到网络压缩数据。Step 302 is to use the first CNN model to perform convolution filtering and compression on the image to be compressed to obtain network compressed data.

其中,第一CNN模型用于对待压缩图像进行卷积滤波压缩,得到网络压缩数据。第一CNN模型和第二CNN模型利用预设的训练集训练获得,训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于分辨率阈值的图像,第二CNN模型用于对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。The first CNN model is used to perform convolution filter compression on the image to be compressed to obtain network compressed data. The first CNN model and the second CNN model are obtained by training with a preset training set. The training set includes multiple low-resolution images with a resolution lower than the resolution threshold, and the resolution corresponding to the low-resolution image is higher than the resolution threshold. Image, the second CNN model is used to decompress the network compressed data by convolution filtering to obtain a decompressed image.

步骤302与步骤102相同。Step 302 is the same as step 102.

步骤303,对待压缩图像进行尺寸压缩,得到尺寸压缩图像。Step 303: Size-compress the image to be compressed to obtain a size-compressed image.

例如,对100*100像素的图像进行尺寸压缩,得到50*50像素的图像。该50*50像素的图像即为尺寸压缩图像。For example, size compression is performed on an image of 100 * 100 pixels to obtain an image of 50 * 50 pixels. The 50 * 50 pixel image is a size-compressed image.

步骤304,存储网络压缩数据,并存储尺寸压缩图像与预设标识的对应关系。其中,预设标识用于指示存在待压缩图像的网络压缩数据。Step 304: Store the network compressed data, and store the correspondence between the size compressed image and the preset identifier. The preset identifier is used to indicate that there is network compressed data of the image to be compressed.

在本申请实施例中,在得到尺寸压缩图像后,可以先存储尺寸压缩图像,在得到网络压缩数据后,再存储尺寸压缩图像对应的预设标识。也可以先得到网络压缩数据,在得到尺寸压缩图像后,直接存储尺寸压缩图像与预设标识的对应关系。本申请实施例对此不进行限定。In the embodiment of the present application, after obtaining the size-compressed image, the size-compressed image may be stored first, and after obtaining the network-compressed data, the preset identifier corresponding to the size-compressed image may be stored. It is also possible to first obtain network compressed data, and after obtaining the size compressed image, directly store the correspondence between the size compressed image and the preset identifier. This embodiment of the present application does not limit this.

在本申请实施例中,既存储了网络压缩数据,还存储了尺寸压缩图像,若电子设备中未存储第二CNN模型,则无法通过网络压缩数据打开图像,此时可打开尺寸压缩图像,以避免用户无法查看图像的问题。In the embodiment of the present application, both network compressed data and size compressed images are stored. If the second CNN model is not stored in the electronic device, the image cannot be opened through the network compressed data. At this time, the size compressed image can be opened to Avoid issues where users cannot view images.

基于上述图像压缩方法实施例,本申请实施例还提供了一种图像解压缩方法。参考图4,图4为本申请实施例提供的图像解压缩方法的第一种流程示意图,该方法包括如下步骤。Based on the foregoing embodiment of the image compression method, an embodiment of the present application further provides an image decompression method. Referring to FIG. 4, FIG. 4 is a first schematic flowchart of an image decompression method provided by an embodiment of the present application. The method includes the following steps.

步骤401,获取目标图像的网络压缩数据。Step 401: Obtain network compressed data of a target image.

本申请实施例中,目标图像为用户需要打开的图像。目标图像可以为独立的一张图像,也可以为位于文档中的图像。这里的文档包括但不限于PDF文档、Word文档、Excel文档、WPS文档。In the embodiment of the present application, the target image is an image that the user needs to open. The target image can be an independent image or an image located in a document. The documents here include but are not limited to PDF documents, Word documents, Excel documents, WPS documents.

若用户需要打开一文档,则文档中的图像均可作为目标图像。If the user needs to open a document, all the images in the document can be used as the target image.

步骤402,利用CNN模型对网络压缩数据进行解压缩,得到解压缩图像。Step 402: Decompress the network compressed data using a CNN model to obtain a decompressed image.

步骤402即为利用第二卷积神经网络模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。Step 402 is to use the second convolutional neural network model to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image.

其中,第二CNN模型用于对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。第二CNN模型和第一CNN模型利用预设的训练集训练获得,训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于分辨率阈值的图像,第一CNN模型用于对待压缩图像进行卷积滤波压缩,得到网络压缩数据。The second CNN model is used to perform convolution filtering and decompression on network compressed data to obtain a decompressed image. The second CNN model and the first CNN model are obtained by training using a preset training set. The training set includes multiple low-resolution images with a resolution lower than the resolution threshold, and the resolution corresponding to the low-resolution image is higher than the resolution threshold. Image, the first CNN model is used to perform convolution filter compression on the image to be compressed to obtain network compressed data.

在本申请的一个实施例中,第二CNN模型的训练可参考图2所示的第一CNN模型的训练流程。第二CNN模型的训练流程与第一CNN模型的训练流程的区别在于:获取多张低分辨率图像对应的网络压缩数据,将训练集中的每个低分辨率图像对应的网络压缩数据分别输入第二CNN模型进行卷积滤波解压缩处理,得到解压缩图像,基于多个高分辨率图像和解压缩图像,确定图像卷积滤波解压缩的损失值。In an embodiment of the present application, the training of the second CNN model may refer to the training process of the first CNN model shown in FIG. 2. The difference between the training process of the second CNN model and the training process of the first CNN model lies in: obtaining network compression data corresponding to multiple low-resolution images, and inputting network compression data corresponding to each low-resolution image in the training set into the The two CNN models perform convolution filtering and decompression processing to obtain decompressed images. Based on multiple high-resolution images and decompressed images, the loss value of image convolution filtering and decompression is determined.

第二CNN模型训练的电子设备和解压缩图像的电子设备,可以为同一台设备,也可以为不同的设备。The electronic device for training the second CNN model and the electronic device for decompressing the image may be the same device or different devices.

步骤403,输出解压缩图像。Step 403: Output a decompressed image.

本申请实施例中,利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练第二CNN模型,使得第二CNN模型更为适应于将网络压缩数据解压缩为图像,得到分辨率较高的解压缩图像,甚至,得到分辨率高于原图像(如低分率图像)的分辨率的解压缩图像。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。In the embodiment of the present application, the second CNN model is trained by using multiple images below the resolution threshold and multiple images above the resolution threshold, so that the second CNN model is more suitable for decompressing network compressed data into an image. Decompressed images with higher resolution are obtained, and even decompressed images with higher resolution than the original image (such as low-resolution images) are obtained. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

本申请实施例中,网络压缩数据为利用卷积滤波压缩得到的数据,因此,网络压缩数据并不是图像数据,采用图像处理软件并不能直接打开网络压缩数据得到图像。为便于查看,参考图5,图5为本申请实施例提供的图像解压缩方法的第二种流程示意图,基于图4,该方法包括如下步骤。In the embodiment of the present application, the network compressed data is data obtained by using convolution filter compression. Therefore, the network compressed data is not image data. Using image processing software cannot directly open the network compressed data to obtain an image. For ease of reference, reference is made to FIG. 5, which is a schematic flowchart of a second method of the image decompression method provided by an embodiment of the present application. Based on FIG. 4, the method includes the following steps.

步骤501,获取目标图像的尺寸压缩图像。Step 501: Obtain a size-compressed image of a target image.

步骤502,判断是否存储有尺寸压缩图像对应的预设标识。若存储有,则执行步骤503。若未存储,则执行步骤506。其中,预设标识用于指示存在目标图像的网络压缩数据。Step 502: Determine whether a preset identifier corresponding to the size-compressed image is stored. If it is stored, step 503 is performed. If not, step 506 is performed. The preset identifier is used to indicate that there is network compressed data of the target image.

本申请实施例中,若存储有尺寸压缩图像对应的预设标识,则确定存在目标图像的网络压缩数据,为了提高用户查看压缩图像时所查看到的图像的分辨率,执行步骤503。若未存储尺寸压缩图像对应的预设标识,则确定不存在目标图像的网络压缩数据,执行步骤506,以保证用户能够查看到图像。In the embodiment of the present application, if a preset identifier corresponding to the size compressed image is stored, it is determined that network compression data of the target image exists. In order to improve the resolution of the image viewed by the user when viewing the compressed image, step 503 is performed. If the preset identifier corresponding to the size compressed image is not stored, it is determined that there is no network compressed data of the target image, and step 506 is performed to ensure that the user can view the image.

步骤503,获取网络压缩数据。Step 503: Obtain network compressed data.

步骤504,利用CNN模型对网络压缩数据进行解压缩,得到解压缩图像。Step 504: Decompress the network compressed data by using a CNN model to obtain a decompressed image.

步骤504即为利用第二卷积神经网络模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。Step 504 is to use the second convolutional neural network model to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image.

其中,第二CNN模型用于对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。第二CNN模型和第一CNN模型利用预设的训练集训练获得,训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于分辨率阈值的图像,第一CNN模型用于对待压缩图像进行卷积滤波压缩,得到网络压缩数据。The second CNN model is used to perform convolution filtering and decompression on network compressed data to obtain a decompressed image. The second CNN model and the first CNN model are obtained by training using a preset training set. The training set includes multiple low-resolution images with a resolution lower than the resolution threshold, and the resolution corresponding to the low-resolution image is higher than the resolution threshold Image, the first CNN model is used to perform convolution filter compression on the image to be compressed to obtain network compressed data.

步骤505,输出解压缩图像。Step 505: Output a decompressed image.

步骤503-505与步骤401-403相同。Steps 503-505 are the same as steps 401-403.

步骤506,输出尺寸压缩图像。Step 506: Output the compressed image.

在本申请的一个实施例中,若无法得到解压缩图像,例如因不存在第二CNN模型,而无法对网络压缩数据进行解压缩,得到解压缩图像,则直接输出尺寸压缩图像,以保证用户查看图像。In an embodiment of the present application, if a decompressed image cannot be obtained, for example, because there is no second CNN model, network compression data cannot be decompressed to obtain a decompressed image, a size-compressed image is directly output to ensure the user View the image.

在本申请的一个实施例中,上述第一CNN模型和第二CNN模型可以联合训练得到。具体地,第一CNN模型和第二CNN模型的联合训练可以包括如下步骤。In an embodiment of the present application, the first CNN model and the second CNN model may be jointly trained. Specifically, the joint training of the first CNN model and the second CNN model may include the following steps.

步骤a1,获取预设的第一CNN模型和第二CNN模型。初始化第一CNN模型和第二CNN模型中的参数,初始化的参数可以根据实际需要和经验进行设置。Step a1: Obtain a preset first CNN model and a second CNN model. Initialize the parameters in the first CNN model and the second CNN model. The initialized parameters can be set according to actual needs and experience.

步骤a2,获取预设的训练集。训练集中包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的且分辨率高于分辨率阈值的高分辨率图像。Step a2: Obtain a preset training set. The training set includes multiple low-resolution images with a resolution below the resolution threshold, and high-resolution images corresponding to the low-resolution image and with a resolution above the resolution threshold.

步骤a3、进行第一次前向计算,具体包括:将训练集中的每个低分辨率图像分别输入预设的第一CNN模型进行卷积滤波压缩处理,得到每个低分辨率图像对应的网络压缩数据。Step a3. Perform the first forward calculation, which specifically includes: inputting each low-resolution image in the training set into a preset first CNN model and performing convolution filtering and compression processing to obtain a network corresponding to each low-resolution image. Compressed data.

一个可选的实施例中,在得到一低分辨率图像对应的网络压缩数据后,判断该网络压缩数据的数据量小于预设数据量。若小于预设数据量,则执行步骤a4。若大于等于预设数据量,则执行步骤a7。In an optional embodiment, after obtaining network compressed data corresponding to a low-resolution image, it is determined that the data amount of the network compressed data is less than a preset data amount. If it is less than the preset data amount, step a4 is performed. If it is greater than or equal to the preset data amount, step a7 is performed.

步骤a4,进行第二次前向计算,具体包括:将每个低分辨率图像对应的网络压缩数据分别输入预设的第二CNN模型进行卷积滤波解压缩处理,得到每个低分辨率图像对应的解压缩图像。Step a4, performing a second forward calculation, which specifically includes: inputting network compression data corresponding to each low-resolution image into a preset second CNN model and performing convolution filtering and decompression processing to obtain each low-resolution image The corresponding decompressed image.

步骤a5,基于每个低分辨率图像对应的高分辨率图像和解压缩图像,确定图像损失值。Step a5: Determine an image loss value based on the high-resolution image and the decompressed image corresponding to each low-resolution image.

本申请实施例中,可以计算低分辨率图像对应的高分辨率图像和解压缩图像的相似度,将计算得到的相似度的倒数作为图像损失值。相似度越大,图像损失值越小。相似度越小,图像损失值越大。In the embodiment of the present application, the similarity between the high-resolution image and the decompressed image corresponding to the low-resolution image may be calculated, and the reciprocal of the calculated similarity is used as the image loss value. The greater the similarity, the smaller the image loss value. The smaller the similarity, the larger the image loss value.

本申请实施例中,还可以使用MSE公式作为损失函数,计算低分辨率图像对应的高分辨率图像和解压缩图像的均方误差,得到图像损失值。具体的可参考相关技术中对MSE描述,此处不再赘述。In the embodiment of the present application, the MSE formula can also be used as a loss function to calculate the mean square error between the high-resolution image and the decompressed image corresponding to the low-resolution image to obtain the image loss value. For details, refer to the description of MSE in related technologies, and details are not described herein again.

步骤a6、基于图像损失值,确定预设的第一CNN模型和第二CNN模型是否收敛。如果不收敛,进入步骤a7;如果收敛,结束训练。Step a6: Determine whether the preset first CNN model and the second CNN model converge based on the image loss value. If not, proceed to step a7; if converge, end training.

一个实施例中,可以预先设置有第二损失阈值。若图像损失值低于第二损失阈值,则确定第一CNN模型和第二CNN模型收敛。若图像损失值不低 于第二损失阈值,则确定第一CNN模型和第二CNN模型不收敛。In one embodiment, a second loss threshold may be set in advance. If the image loss value is lower than the second loss threshold, it is determined that the first CNN model and the second CNN model converge. If the image loss value is not lower than the second loss threshold, it is determined that the first CNN model and the second CNN model do not converge.

步骤a7,调整预设的第一CNN模型和第二CNN模型中的参数,返回步骤a3。Step a7: Adjust the parameters in the preset first CNN model and the second CNN model, and return to step a3.

采用上述步骤a1-a7训练得到的第一CNN模型压缩图像得到网络压缩数据,网络压缩数据的数据量小于待压缩图像的数据量,减少了图像占用的存储空间。另外,采用上述步骤a1-a7训练得到的第二CNN模型解压缩网络压缩数据得到解压缩图像。由于采用是低分辨率图像和高分辨率图像训练得到的第二CNN模型,因此,解压缩图像的分辨率高于等于待压缩图像(即原始图像)的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。The compressed image of the first CNN model obtained by training in steps a1 to a7 above is used to obtain network compressed data. The amount of data of the network compressed data is less than that of the image to be compressed, which reduces the storage space occupied by the image. In addition, the second CNN model trained in the above steps a1-a7 is used to decompress the network compressed data to obtain a decompressed image. Since the second CNN model obtained by training the low-resolution image and the high-resolution image is used, the resolution of the decompressed image is higher than or equal to that of the image to be compressed (that is, the original image). This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

基于上述图像压缩方法实施例,本申请实施例还提供了一种图像压缩装置。参考图6,图6为本申请实施例提供的图像压缩装置的第一种结构示意图,该装置包括如下模块。Based on the foregoing embodiment of the image compression method, an embodiment of the present application further provides an image compression device. Referring to FIG. 6, FIG. 6 is a schematic diagram of a first structure of an image compression apparatus according to an embodiment of the present application. The apparatus includes the following modules.

获取模块601,用于获取待压缩图像;An acquisition module 601, configured to acquire an image to be compressed;

第一压缩模块602,用于利用第一CNN模型对待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,第一CNN模型和第二CNN模型利用预设的训练集训练获得,训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于分辨率阈值的图像,第二CNN模型用于对网络压缩数据进行卷积滤波解压缩,得到解压缩图像;A first compression module 602 is configured to perform convolution filtering and compression on an image to be compressed by using a first CNN model to obtain network compressed data. The first CNN model and the second CNN model are obtained by training using a preset training set. Multiple low-resolution images with a resolution lower than the resolution threshold and images with a resolution higher than the resolution threshold corresponding to the low-resolution image. The second CNN model is used to perform convolution filtering and decompression on network compressed data to obtain Decompress the image;

第一存储模块603,用于存储网络压缩数据。The first storage module 603 is configured to store network compressed data.

在本申请的一个实施例中,参考图7所示的图像压缩装置,基于图6,还可以包括:In an embodiment of the present application, referring to the image compression device shown in FIG. 7, based on FIG. 6, it may further include:

第二压缩模604,用于在获取到待压缩图像之后,对待压缩图像进行尺寸压缩,得到尺寸压缩图像;A second compression module 604, configured to perform size compression on the image to be compressed after obtaining the image to be compressed to obtain a size-compressed image;

第二存储模块605,用于在得到网络压缩数据后,存储尺寸压缩图像与预设标识的对应关系;预设标识用于指示存在待压缩图像的网络压缩数据。The second storage module 605 is configured to store the correspondence between the size-compressed image and a preset identifier after the network compressed data is obtained; the preset identifier is used to indicate that there is network compressed data of the image to be compressed.

在本申请的一个实施例中,待压缩图像位于PDF文档中;或者In an embodiment of the present application, the image to be compressed is located in a PDF document; or

待压缩图像位于Word文档中;或者The image to be compressed is in a Word document; or

待压缩图像位于Excel文档中;或者The image to be compressed is in an Excel document; or

待压缩图像位于WPS文档中。The image to be compressed is located in a WPS document.

本申请实施例提供了一种图像压缩装置,利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。An embodiment of the present application provides an image compression apparatus, which uses a plurality of images below a resolution threshold and a plurality of images above a resolution threshold to train a CNN model. The CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

基于上述图像解压缩方法实施例,本申请实施例还提供了一种图像解压缩装置。参考图8,图8为本申请实施例提供的图像解压缩装置的第一种结构示意图,该装置包括如下模块。Based on the foregoing embodiment of the image decompression method, an embodiment of the present application further provides an image decompression device. Referring to FIG. 8, FIG. 8 is a schematic diagram of a first structure of an image decompression device provided by an embodiment of the present application. The device includes the following modules.

获取模块801,用于获取目标图像的网络压缩数据;An obtaining module 801, configured to obtain network compressed data of a target image;

解压缩模块802,用于利用第二CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,第二CNN模型和第一CNN模型利用预设的训练集训练获得,训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于分辨率阈值的图像,第一CNN模型用于对待压缩图像压缩进行卷积滤波压缩,得到网络压缩数据;The decompression module 802 is configured to perform convolution filtering and decompression on the network compressed data by using the second CNN model to obtain a decompressed image. The second CNN model and the first CNN model are obtained by training using a preset training set. Including multiple low-resolution images with a resolution lower than the resolution threshold and images with a resolution higher than the resolution threshold corresponding to the low-resolution image, the first CNN model is used to perform convolution filter compression on the image to be compressed to obtain Network compressed data;

输出模块803,用于输出解压缩图像。An output module 803 is configured to output a decompressed image.

在本申请的一个实施例中,获取模块801,具体可以用于获取目标图像的尺寸压缩图像;判断是否存储有尺寸压缩图像对应的预设标识;预设标识用于指示存在目标图像的网络压缩数据;若存储有,则获取网络压缩数据。In an embodiment of the present application, the obtaining module 801 may be specifically configured to obtain a size-compressed image of a target image; determine whether a preset identifier corresponding to the size-compressed image is stored; the preset identifier is used to indicate that network compression of the target image exists Data; if stored, get network compressed data.

在本申请的一个实施例中,输出模块803,还可用于若未存储尺寸压缩图像对应的预设标识,则输出尺寸压缩图像。In an embodiment of the present application, the output module 803 may be further configured to output a size-compressed image if a preset identifier corresponding to the size-compressed image is not stored.

本申请实施例提供了一种图像解压缩装置,利用多张低于分辨率阈值的 图像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。An embodiment of the present application provides an image decompression apparatus, which uses a plurality of images below a resolution threshold and a plurality of images above a resolution threshold to train a CNN model. The CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

本申请实施例还提供了一种图像压缩方法。该方法包括如下步骤。An embodiment of the present application further provides an image compression method. The method includes the following steps.

步骤110,获取待压缩图像。Step 110: Obtain an image to be compressed.

步骤120,利用第一CNN模型对待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,第一CNN模型和第二CNN模型利用预设的训练集训练获得,训练集包括多张样本图像,第二CNN模型用于对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。Step 120: Use the first CNN model to perform convolution filtering and compression on the compressed image to obtain network compression data. The first CNN model and the second CNN model are obtained by training using a preset training set, where the training set includes multiple sample images The second CNN model is used to perform convolution filtering and decompression on network compressed data to obtain a decompressed image.

步骤130,存储网络压缩数据。Step 130: Store network compression data.

在本申请的一个实施例中,上述图像压缩方法还可以包括:In an embodiment of the present application, the image compression method may further include:

在获取到待压缩图像之后,对待压缩图像进行尺寸压缩,得到尺寸压缩图像;After obtaining the image to be compressed, the image to be compressed is subjected to size compression to obtain a size-compressed image;

在得到网络压缩数据后,存储尺寸压缩图像与预设标识的对应关系;预设标识用于指示存在待压缩图像的网络压缩数据。After the network compressed data is obtained, the correspondence between the size-compressed image and the preset identifier is stored; the preset identifier is used to indicate that there is network compressed data of the image to be compressed.

在本申请的一个实施例中,待压缩图像位于PDF文档中;或者待压缩图像位于Word文档中;或者待压缩图像位于Excel文档中;或者待压缩图像位于WPS文档中。In one embodiment of the present application, the image to be compressed is located in a PDF document; or the image to be compressed is located in a Word document; or the image to be compressed is located in an Excel document; or the image to be compressed is located in a WPS document.

本申请实施例提供了一种图像压缩方法,利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值 的图像训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。An embodiment of the present application provides an image compression method. A CNN model is trained by using multiple images below a resolution threshold and multiple images above a resolution threshold. The CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

本申请实施例还提供了一种图像解压缩方法。该方法包括如下步骤。An embodiment of the present application further provides an image decompression method. The method includes the following steps.

步骤210,获取目标图像的网络压缩数据。Step 210: Obtain network compressed data of the target image.

步骤220,利用第二CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,第二CNN模型和第一CNN模型利用预设的训练集训练获得,训练集包括多张样本图像,第一CNN模型用于对待压缩图像压缩进行卷积滤波压缩,得到网络压缩数据。Step 220: Use the second CNN model to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; wherein the second CNN model and the first CNN model are obtained by training using a preset training set, and the training set includes multiple samples Image, the first CNN model is used to perform convolution filter compression on the image to be compressed, to obtain network compressed data.

步骤230,输出解压缩图像。Step 230: Output a decompressed image.

在本申请的一个实施例中,获取目标图像的网络压缩数据的步骤,可以包括:In an embodiment of the present application, the step of obtaining network compressed data of a target image may include:

获取目标图像的尺寸压缩图像;Obtain the size-compressed image of the target image;

判断是否存储有尺寸压缩图像对应的预设标识;预设标识用于指示存在目标图像的网络压缩数据;Determine whether a preset identifier corresponding to the size compressed image is stored; the preset identifier is used to indicate the presence of network compressed data of the target image;

若存储有,则获取网络压缩数据。If it is stored, the network compressed data is obtained.

在本申请的一个实施例中,上述图像解压缩方法还可以包括:In an embodiment of the present application, the image decompression method may further include:

若未存储尺寸压缩图像对应的预设标识,则输出尺寸压缩图像。If the preset identifier corresponding to the size-compressed image is not stored, the size-compressed image is output.

本申请实施例提供了一种图像解压缩方法,利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。An embodiment of the present application provides an image decompression method, which uses multiple images below a resolution threshold and multiple images above a resolution threshold to train a CNN model. The CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

在本申请的一个实施例中,上述第一CNN模型和第二CNN模型可以联合训练得到。具体地,第一CNN模型和第二CNN模型的联合训练可以包括如下步骤。In an embodiment of the present application, the first CNN model and the second CNN model may be jointly trained. Specifically, the joint training of the first CNN model and the second CNN model may include the following steps.

步骤b1,获取预设的第一CNN模型和第二CNN模型。初始化第一CNN模型和第二CNN模型中的参数,初始化的参数可以根据实际需要和经验进行设置。Step b1: Obtain a preset first CNN model and a second CNN model. Initialize the parameters in the first CNN model and the second CNN model. The initialized parameters can be set according to actual needs and experience.

步骤b2,获取预设的训练集。训练集中包括多张样本图像。Step b2: Obtain a preset training set. The training set includes multiple sample images.

步骤b3、进行第一次前向计算,具体包括:将训练集中的每个样本图像分别输入预设的第一CNN模型进行卷积滤波压缩处理,得到每个样本图像对应的网络压缩数据。Step b3: Perform the first forward calculation, which specifically includes: inputting each sample image in the training set into a preset first CNN model and performing convolution filtering and compression processing to obtain network compression data corresponding to each sample image.

一个可选的实施例中,在得到一样本图像对应的网络压缩数据后,判断该网络压缩数据的数据量小于预设数据量。若小于预设数据量,则执行步骤b4。若大于等于预设数据量,则执行步骤b7。In an optional embodiment, after obtaining network compressed data corresponding to a sample image, it is determined that the data amount of the network compressed data is less than a preset data amount. If it is less than the preset data amount, step b4 is performed. If it is greater than or equal to the preset data amount, step b7 is performed.

步骤b4,进行第二次前向计算,具体包括:将每个样本图像对应的网络压缩数据分别输入预设的第二CNN模型进行卷积滤波解压缩处理,得到每个样本图像对应的解压缩图像。Step b4, performing a second forward calculation, which specifically includes: inputting network compression data corresponding to each sample image into a preset second CNN model and performing convolution filtering and decompression processing to obtain a decompression corresponding to each sample image. image.

步骤b5,基于每个样本图像和对应的解压缩图像,确定图像损失值。Step b5: Determine an image loss value based on each sample image and the corresponding decompressed image.

本申请实施例中,可以计算样本图像和对应的解压缩图像的相似度,将计算得到的相似度的倒数作为图像损失值。相似度越大,图像损失值越小。相似度越小,图像损失值越大。In the embodiment of the present application, the similarity between the sample image and the corresponding decompressed image may be calculated, and the reciprocal of the calculated similarity is used as the image loss value. The greater the similarity, the smaller the image loss value. The smaller the similarity, the larger the image loss value.

本申请实施例中,还可以使用MSE公式作为损失函数,计算样本图像和对应的解压缩图像的均方误差,得到图像损失值。具体的可参考相关技术中对MSE描述,此处不再赘述。In the embodiment of the present application, the MSE formula can also be used as a loss function to calculate the mean square error between the sample image and the corresponding decompressed image to obtain the image loss value. For details, refer to the description of MSE in related technologies, and details are not described herein again.

步骤b6、基于图像损失值,确定预设的第一CNN模型和第二CNN模型是否收敛。如果不收敛,进入步骤b7;如果收敛,结束训练。Step b6: Determine whether the preset first CNN model and the second CNN model converge based on the image loss value. If not, proceed to step b7; if converge, end training.

一个实施例中,可以预先设置有第三损失阈值。若图像损失值低于第三损失阈值,则确定第一CNN模型和第二CNN模型收敛。若图像损失值不低 于第三损失阈值,则确定第一CNN模型和第二CNN模型不收敛。In one embodiment, a third loss threshold may be set in advance. If the image loss value is lower than the third loss threshold, it is determined that the first CNN model and the second CNN model converge. If the image loss value is not lower than the third loss threshold, it is determined that the first CNN model and the second CNN model do not converge.

步骤b7,调整预设的第一CNN模型和第二CNN模型中的参数,返回步骤b3。Step b7: Adjust the parameters in the preset first CNN model and the second CNN model, and return to step b3.

采用上述步骤b1-b7训练得到的第一CNN模型压缩图像得到网络压缩数据,网络压缩数据的数据量小于待压缩图像的数据量,减少了图像占用的存储空间。另外,采用上述步骤b1-b7训练得到的第二CNN模型解压缩网络压缩数据得到解压缩图像。由于采用多个样本图像训练得到的第二CNN模型,因此,解压缩图像的分辨率比较接近于待压缩图像(即原始图像)的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。The first CNN model obtained by training in steps b1 to b7 is used to compress the image to obtain network compressed data. The amount of network compressed data is less than the amount of data to be compressed, which reduces the storage space occupied by the image. In addition, the second CNN model trained in the above steps b1-b7 is used to decompress the network compressed data to obtain a decompressed image. Because the second CNN model is obtained by training with multiple sample images, the resolution of the decompressed image is relatively close to the resolution of the image to be compressed (that is, the original image). This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

本申请实施例还提供了一种图像压缩装置。该装置包括:获取模块310、第一压缩模块320和第一存储模块330。An embodiment of the present application further provides an image compression device. The device includes an acquisition module 310, a first compression module 320, and a first storage module 330.

获取模块310,用于获取待压缩图像;An obtaining module 310, configured to obtain an image to be compressed;

第一压缩模块320,用于利用第一CNN模型对待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,第一CNN模型和第二CNN模型利用预设的训练集训练获得,训练集包括多张样本图像,第二CNN模型用于对网络压缩数据进行卷积滤波解压缩,得到解压缩图像;A first compression module 320 is configured to perform convolution filtering and compression on a compressed image using a first CNN model to obtain network compressed data; wherein the first CNN model and the second CNN model are obtained by training using a preset training set, and the training set includes Multiple sample images, the second CNN model is used to decompress the network compressed data by convolution filtering to obtain the decompressed image;

第一存储模块330,用于存储网络压缩数据。The first storage module 330 is configured to store network compressed data.

在本申请的一个实施例中,上述图像压缩装置还可以包括:In an embodiment of the present application, the image compression apparatus may further include:

第二压缩模块,用于在获取到待压缩图像之后,对待压缩图像进行尺寸压缩,得到尺寸压缩图像;A second compression module, configured to compress the size of the image to be compressed after obtaining the image to be compressed to obtain a size-compressed image;

第二存储模块,用于在得到网络压缩数据后,存储尺寸压缩图像与预设标识的对应关系;预设标识用于指示存在待压缩图像的网络压缩数据。The second storage module is configured to store the correspondence between the size-compressed image and the preset identifier after the network compressed data is obtained; the preset identifier is used to indicate that there is network compressed data of the image to be compressed.

在本申请的一个实施例中,待压缩图像位于PDF文档中;或者待压缩图像位于Word文档中;或者待压缩图像位于Excel文档中;或者待压缩图像位于WPS文档中。In one embodiment of the present application, the image to be compressed is located in a PDF document; or the image to be compressed is located in a Word document; or the image to be compressed is located in an Excel document; or the image to be compressed is located in a WPS document.

本申请实施例提供了一种图像压缩装置,利用多张低于分辨率阈值的图 像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。An embodiment of the present application provides an image compression device, which trains a CNN model by using multiple images below a resolution threshold and multiple images above a resolution threshold. The CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

本申请实施例还提供了一种图像解压缩装置。该装置包括:获取模块410、解压缩模块420、输出模块430。An embodiment of the present application further provides an image decompression device. The device includes: an acquisition module 410, a decompression module 420, and an output module 430.

获取模块410,用于获取目标图像的网络压缩数据;An obtaining module 410, configured to obtain network compressed data of a target image;

解压缩模块420,用于利用第二CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,第二CNN模型和第一CNN模型利用预设的训练集训练获得,训练集包括多张样本图像,第一CNN模型用于对待压缩图像压缩进行卷积滤波压缩,得到网络压缩数据;The decompression module 420 is configured to perform convolution filtering and decompression on the network compressed data by using the second CNN model to obtain a decompressed image. The second CNN model and the first CNN model are obtained by training using a preset training set. Including multiple sample images, the first CNN model is used to perform convolution filter compression on the compressed image to be compressed to obtain network compressed data;

输出模块430,用于输出解压缩图像。The output module 430 is configured to output a decompressed image.

在本申请的一个实施例中,获取模块410,具体可以用于获取目标图像的尺寸压缩图像;判断是否存储有尺寸压缩图像对应的预设标识;预设标识用于指示存在目标图像的网络压缩数据;若存储有,则获取网络压缩数据。In an embodiment of the present application, the obtaining module 410 may be specifically configured to obtain the size-compressed image of the target image; determine whether a preset identifier corresponding to the size-compressed image is stored; the preset identifier is used to indicate that network compression of the target image exists Data; if stored, get network compressed data.

在本申请的一个实施例中,输出模块430,还可以用于若未存储尺寸压缩图像对应的预设标识,则输出尺寸压缩图像。In an embodiment of the present application, the output module 430 may be further configured to output a size-compressed image if a preset identifier corresponding to the size-compressed image is not stored.

本申请实施例提供了一种图像解压缩装置,利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。An embodiment of the present application provides an image decompression device, which uses a plurality of images below a resolution threshold and a plurality of images above a resolution threshold to train a CNN model. The CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

基于上述图像压缩方法实施例,本申请实施例还提供了一种电子设备,如图9所示,包括处理器901、通信接口902、存储器903和通信总线904,其中,处理器901,通信接口902,存储器903通过通信总线904完成相互间的通信,Based on the foregoing embodiment of the image compression method, an embodiment of the present application further provides an electronic device, as shown in FIG. 9, including an processor 901, a communication interface 902, a memory 903, and a communication bus 904. Among them, the processor 901, the communication interface 902. The memory 903 completes communication with each other through the communication bus 904.

存储器903,用于存放计算机程序;The memory 903 is configured to store a computer program;

处理器901,用于执行存储器903上所存放的程序时,实现上述图像压缩方法。其中,图像压缩方法包括:The processor 901 is configured to implement the foregoing image compression method when executing a program stored in the memory 903. Among them, the image compression method includes:

获取待压缩图像;Obtain the image to be compressed;

利用第一CNN模型对待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,第一CNN模型和第二CNN模型利用预设的训练集训练获得,训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于分辨率阈值的图像,第二CNN模型用于对网络压缩数据进行卷积滤波解压缩,得到解压缩图像;The first CNN model is used to perform convolution filtering and compression on the compressed image to obtain network compressed data. The first CNN model and the second CNN model are obtained by training using a preset training set, and the training set includes multiple resolutions lower than the resolution. Threshold low-resolution images, and images corresponding to low-resolution images with a resolution higher than the resolution threshold, the second CNN model is used to perform convolution filtering and decompression on network compressed data to obtain decompressed images;

存储网络压缩数据。Storage network compresses data.

本申请实施例提供了一种电子设备,利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进卷积滤波行解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。An embodiment of the present application provides an electronic device for training a CNN model by using multiple images below a resolution threshold and multiple images above a resolution threshold. The CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to decompress the network compressed data into a convolution filter to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

基于上述图像解压缩方法实施例,本申请实施例还提供了一种电子设备,如图10所示,包括处理器1001、通信接口1002、存储器1003和通信总线1004,其中,处理器1001,通信接口1002,存储器1003通过通信总线1004完成相互间的通信,Based on the foregoing embodiment of the image decompression method, an embodiment of the present application further provides an electronic device. As shown in FIG. 10, the electronic device includes a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004. The processor 1001, The interface 1002 and the memory 1003 complete communication with each other through the communication bus 1004.

存储器1003,用于存放计算机程序;A memory 1003, configured to store a computer program;

处理器1001,用于执行存储器1003上所存放的程序时,实现上述图像解压缩方法。其中,图像解压缩方法包括:The processor 1001 is configured to implement the foregoing image decompression method when executing a program stored in the memory 1003. The image decompression method includes:

获取目标图像的网络压缩数据;Obtain the network compressed data of the target image;

利用第二CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,第二CNN模型和第一CNN模型利用预设的训练集训练获得,训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于分辨率阈值的图像,第一CNN模型用于对待压缩图像压缩进行卷积滤波压缩,得到网络压缩数据;The second CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; wherein the second CNN model and the first CNN model are obtained by training using a preset training set, and the training set includes multiple resolutions lower than The low-resolution image with a resolution threshold and the image with a resolution higher than the resolution threshold corresponding to the low-resolution image, the first CNN model is used to perform convolution filter compression on the compressed image compression to obtain network compressed data;

输出解压缩图像。Output decompressed image.

本申请实施例提供了一种电子设备,利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。An embodiment of the present application provides an electronic device for training a CNN model by using multiple images below a resolution threshold and multiple images above a resolution threshold. The CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

基于上述图像压缩方法实施例,本申请实施例还提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总完成相互间的通信,Based on the foregoing embodiment of the image compression method, an embodiment of the present application further provides an electronic device including a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory always perform mutual communication through communication.

存储器,用于存放计算机程序;Memory for storing computer programs;

处理器,用于执行存储器上所存放的程序时,实现上述图像压缩方法。其中,图像压缩方法包括:The processor is configured to implement the foregoing image compression method when executing a program stored in the memory. Among them, the image compression method includes:

获取待压缩图像;Obtain the image to be compressed;

利用第一卷积神经网络模型对待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,第一卷积神经网络模型和第二卷积神经网络模型利用预设的训练集训练获得,训练集包括多张样本图像,第二卷积神经网络模型用于 对网络压缩数据进行卷积滤波解压缩,得到解压缩图像;The first convolutional neural network model is used to perform convolution filtering and compression on the compressed image to obtain network compressed data. Among them, the first convolutional neural network model and the second convolutional neural network model are obtained by training using a preset training set. Including multiple sample images, the second convolutional neural network model is used to decompress the network compressed data by convolution filtering to obtain a decompressed image;

存储网络压缩数据。Storage network compresses data.

本申请实施例提供了一种电子设备,利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。An embodiment of the present application provides an electronic device for training a CNN model by using multiple images below a resolution threshold and multiple images above a resolution threshold. The CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

基于上述图像解压缩方法实施例,本申请实施例还提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器,通信接口,存储器通过通信总完成相互间的通信,Based on the foregoing embodiment of the image decompression method, an embodiment of the present application further provides an electronic device including a processor, a communication interface, a memory, and a communication bus. The processor, the communication interface, and the memory always perform communication with each other through communication. ,

存储器,用于存放计算机程序;Memory for storing computer programs;

处理器,用于执行存储器上所存放的程序时,实现上述图像解压缩方法。其中,图像解压缩方法包括:The processor is configured to implement the foregoing image decompression method when executing a program stored in the memory. The image decompression method includes:

获取目标图像的网络压缩数据;Obtain the network compressed data of the target image;

利用第二卷积神经网络模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,第二卷积神经网络模型和第一卷积神经网络模型利用预设的训练集训练获得,训练集包括多张样本图像,第一卷积神经网络模型用于对待压缩图像压缩进行卷积滤波压缩,得到网络压缩数据;Use the second convolutional neural network model to decompress the network compressed data to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network model are obtained by training using a preset training set, The training set includes multiple sample images, and the first convolutional neural network model is used to perform convolution filter compression on the compressed image compression to obtain network compressed data;

输出解压缩图像。Output decompressed image.

本申请实施例提供了一种电子设备,利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像训练CNN模型。采用CNN模型对图像进行卷积滤波压缩,得到分辨率较小的网络压缩数据,以减少占用的存储空间。之后,再利用CNN模型对网络压缩数据进行卷积滤波解压缩,得到解压缩图像。由于CNN模型是利用多张低于分辨率阈值的图像和多张高于分辨率阈值的图像 训练得到的,因此采用CNN模型可得到分辨率较高的解压缩图像,甚至,解压缩图像的分辨率高于原图像的分辨率。这有效提高了用户查看压缩图像时所查看到的图像的分辨率,提高了用户体验。An embodiment of the present application provides an electronic device for training a CNN model by using multiple images below a resolution threshold and multiple images above a resolution threshold. The CNN model is used to perform convolution filtering and compression on the image to obtain network compression data with a smaller resolution to reduce the occupied storage space. Then, the CNN model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image. Since the CNN model is trained using multiple images below the resolution threshold and multiple images above the resolution threshold, the CNN model can be used to obtain a higher resolution decompressed image, and even the resolution of the decompressed image The rate is higher than the resolution of the original image. This effectively improves the resolution of the image viewed by the user when viewing the compressed image, and improves the user experience.

上述通信总线可以是PCI(Peripheral Component Interconnect,外设部件互连标准)总线或EISA(Extended Industry Standard Architecture,扩展工业标准结构)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。、The above communication bus may be a PCI (Peripheral Component Interconnect, Peripheral Component Interconnect Standard) bus or an EISA (Extended Industry Standard Architecture, Extended Industry Standard Architecture) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. ,

上述通信接口用于上述电子设备与其他设备之间的通信。The communication interface is used for communication between the electronic device and other devices.

上述存储器可以包括RAM(Random Access Memory,随机存取存储器),也可以包括NVM(Non-Volatile Memory,非易失性存储器),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。The foregoing memory may include RAM (Random Access Memory, Random Access Memory), and may also include NVM (Non-Volatile Memory, non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the foregoing processor.

上述处理器可以是通用处理器,包括CPU(Central Processing Unit,中央处理器)、NP(Network Processor,网络处理器)等;还可以是DSP(Digital Signal Processing,数字信号处理器)、ASIC(Application Specific Integrated Circuit,专用集成电路)、FPGA(Field-Programmable Gate Array,现场可编程门阵列)或其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。The above processor may be a general-purpose processor, including a CPU (Central Processing Unit), a NP (Network Processor), etc .; it may also be a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

基于上述图像压缩方法实施例,本申请实施例还提供了一种机器可读存储介质,机器可读存储介质内存储有计算机程序,计算机程序被处理器执行时实现上述任一图像压缩方法。Based on the embodiment of the image compression method described above, the embodiment of the present application further provides a machine-readable storage medium. A computer program is stored in the machine-readable storage medium. When the computer program is executed by a processor, any one of the foregoing image compression methods is implemented.

基于上述图像解压缩方法实施例,本申请实施例还提供了一种机器可读存储介质,机器可读存储介质内存储有计算机程序,计算机程序被处理器执行时实现上述任一图像解压缩方法。Based on the embodiment of the image decompression method described above, the embodiment of the present application further provides a machine-readable storage medium. A computer program is stored in the machine-readable storage medium. When the computer program is executed by a processor, any of the foregoing image decompression methods is implemented .

基于上述图像压缩方法实施例,本申请实施例还提供了一种计算机程序,计算机程序被处理器执行时实现上述任一图像压缩方法。Based on the foregoing embodiment of the image compression method, an embodiment of the present application further provides a computer program that implements any one of the foregoing image compression methods when the computer program is executed by a processor.

基于上述图像解压缩方法实施例,本申请实施例还提供了一种计算机程序,计算机程序被处理器执行时实现上述任一图像解压缩方法。Based on the foregoing embodiment of the image decompression method, an embodiment of the present application further provides a computer program that implements any one of the foregoing image decompression methods when the computer program is executed by a processor.

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来 将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations There is any such actual relationship or order among them. Moreover, the terms "including", "comprising", or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device that includes a series of elements includes not only those elements but also those that are not explicitly listed Or other elements inherent to such a process, method, article, or device. Without more restrictions, the elements defined by the sentence "including a ..." do not exclude the existence of other identical elements in the process, method, article, or equipment including the elements.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于图像压缩装置实施例、图像解压缩装置实施例、电子设备实施例、机器可读存储介质实施例、计算机程序实施例而言,由于其基本相似于图像压缩方法和图像解压缩方法实施例,所以描述的比较简单,相关之处参见图像压缩方法和图像解压缩方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, the image compression device embodiment, the image decompression device embodiment, the electronic device embodiment, the machine-readable storage medium embodiment, and the computer program embodiment are basically similar to the image compression method and the image decompression method. For example, the description is relatively simple. For related points, refer to the description of the image compression method and image decompression method embodiments.

以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。The above descriptions are merely preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any modification, equivalent replacement, and improvement made within the spirit and principle of this application are included in the protection scope of this application.

Claims (28)

一种图像压缩方法,其特征在于,所述方法包括:An image compression method, wherein the method includes: 获取待压缩图像;Obtain the image to be compressed; 利用第一卷积神经网络模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一卷积神经网络模型和第二卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第二卷积神经网络模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;The first convolutional neural network model is used to perform convolution filtering and compression on the image to be compressed, to obtain network compressed data; wherein the first convolutional neural network model and the second convolutional neural network model use a preset training set. Obtained through training, the training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images with a resolution higher than the resolution threshold corresponding to the low-resolution images, and the second convolutional neural network The model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; 存储所述网络压缩数据。The network compressed data is stored. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, further comprising: 在获取到所述待压缩图像之后,对所述待压缩图像进行尺寸压缩,得到尺寸压缩图像;After obtaining the image to be compressed, performing size compression on the image to be compressed to obtain a size-compressed image; 在得到所述网络压缩数据后,存储所述尺寸压缩图像与预设标识的对应关系;所述预设标识用于指示存在所述待压缩图像的网络压缩数据。After the network compressed data is obtained, the correspondence between the size compressed image and a preset identifier is stored; the preset identifier is used to indicate the presence of the network compressed data of the image to be compressed. 根据权利要求1或2所述的方法,其特征在于,所述待压缩图像位于PDF文档中;或者所述待压缩图像位于Word文档中;或者所述待压缩图像位于Excel文档中;或者所述待压缩图像位于WPS文档中。The method according to claim 1 or 2, wherein the image to be compressed is located in a PDF document; or the image to be compressed is located in a Word document; or the image to be compressed is located in an Excel document; or The image to be compressed is located in a WPS document. 一种图像解压缩方法,其特征在于,所述方法包括:An image decompression method, wherein the method includes: 获取目标图像的网络压缩数据;Obtain the network compressed data of the target image; 利用第二卷积神经网络模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二卷积神经网络模型和第一卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第一卷积神经网络模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;The second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network model use preset training. Obtained from training set, the training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images corresponding to a low-resolution image with a resolution higher than the resolution threshold, the first convolutional nerve The network model is used to perform convolution filter compression on the image to be compressed to obtain the network compression data; 输出所述解压缩图像。The decompressed image is output. 根据权利要求4所述的方法,其特征在于,所述获取目标图像的网络压缩数据的步骤,包括:The method according to claim 4, wherein the step of obtaining network compressed data of a target image comprises: 获取目标图像的尺寸压缩图像;Obtain the size-compressed image of the target image; 判断是否存储有所述尺寸压缩图像对应的预设标识;所述预设标识用于指示存在所述目标图像的网络压缩数据;Determining whether a preset identifier corresponding to the compressed image of the size is stored; the preset identifier is used to indicate that network compression data of the target image exists; 若存储有,则获取所述网络压缩数据。If stored, the network compressed data is obtained. 根据权利要求5所述的方法,其特征在于,所述方法还包括:The method according to claim 5, further comprising: 若未存储所述尺寸压缩图像对应的所述预设标识,则输出所述尺寸压缩图像。If the preset identifier corresponding to the size-compressed image is not stored, the size-compressed image is output. 一种图像压缩装置,其特征在于,所述装置包括:An image compression device, wherein the device includes: 获取模块,用于获取待压缩图像;An acquisition module for acquiring an image to be compressed; 第一压缩模块,用于利用第一卷积神经网络模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一卷积神经网络模型和第二卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第二卷积神经网络模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;A first compression module, configured to perform convolution filtering and compression on the image to be compressed using a first convolutional neural network model to obtain network compressed data; wherein the first convolutional neural network model and the second convolutional neural network The model is obtained by training using a preset training set, where the training set includes multiple low-resolution images with a resolution lower than the resolution threshold and images with a resolution higher than the resolution threshold corresponding to the low-resolution image. The second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; 第一存储模块,用于存储所述网络压缩数据。The first storage module is configured to store the network compressed data. 根据权利要求7所述的装置,其特征在于,所述装置还包括:The apparatus according to claim 7, further comprising: 第二压缩模块,用于在获取到所述待压缩图像之后,对所述待压缩图像进行尺寸压缩,得到尺寸压缩图像;A second compression module, configured to compress the image to be compressed after obtaining the image to be compressed to obtain a size-compressed image; 第二存储模块,用于在得到所述网络压缩数据后,存储所述尺寸压缩图像与预设标识的对应关系;所述预设标识用于指示存在所述待压缩图像的网络压缩数据。A second storage module is configured to store the correspondence between the size compressed image and a preset identifier after the network compressed data is obtained, where the preset identifier is used to indicate the existence of network compressed data of the image to be compressed. 根据权利要求7或8所述的装置法,其特征在于,所述待压缩图像位于PDF文档中;或者所述待压缩图像位于Word文档中;或者所述待压缩图 像位于Excel文档中;或者所述待压缩图像位于WPS文档中。The device method according to claim 7 or 8, wherein the image to be compressed is located in a PDF document; or the image to be compressed is located in a Word document; or the image to be compressed is located in an Excel document; or The image to be compressed is described in a WPS document. 一种图像解压缩装置,其特征在于,所述装置包括:An image decompression device, wherein the device includes: 获取模块,用于获取目标图像的网络压缩数据;An acquisition module for acquiring network compressed data of a target image; 解压缩模块,用于利用第二卷积神经网络模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二卷积神经网络模型和第一卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第一卷积神经网络模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;A decompression module, configured to perform convolution filtering and decompression on the network compressed data using a second convolutional neural network model to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network The model is obtained by training using a preset training set, where the training set includes multiple low-resolution images with a resolution lower than the resolution threshold and images with a resolution higher than the resolution threshold corresponding to the low-resolution image. The first convolutional neural network model is used to perform convolution filter compression on the image to be compressed to obtain the network compression data; 输出模块,用于输出所述解压缩图像。An output module, configured to output the decompressed image. 根据权利要求10所述的装置,其特征在于,所述获取模块,具体用于获取目标图像的尺寸压缩图像;判断是否存储有所述尺寸压缩图像对应的预设标识;所述预设标识用于指示存在所述目标图像的网络压缩数据;若存储有,则获取所述网络压缩数据。The device according to claim 10, wherein the obtaining module is specifically configured to obtain a size-compressed image of the target image; determine whether a preset identifier corresponding to the size-compressed image is stored; Indicating that the network compressed data of the target image exists; if stored, obtaining the network compressed data. 根据权利要求11所述的装置,其特征在于,所述输出模块,还用于若未存储所述尺寸压缩图像对应的所述预设标识,则输出所述尺寸压缩图像。The device according to claim 11, wherein the output module is further configured to output the size-compressed image if the preset identifier corresponding to the size-compressed image is not stored. 一种图像压缩方法,其特征在于,所述方法包括:An image compression method, wherein the method includes: 获取待压缩图像;Obtain the image to be compressed; 利用第一卷积神经网络模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一卷积神经网络模型和第二卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第二卷积神经网络模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;The first convolutional neural network model is used to perform convolution filtering and compression on the image to be compressed, to obtain network compressed data; wherein the first convolutional neural network model and the second convolutional neural network model use a preset training set. Obtained through training, the training set includes multiple sample images, and the second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; 存储所述网络压缩数据。The network compressed data is stored. 一种图像解压缩方法,其特征在于,所述方法包括:An image decompression method, wherein the method includes: 获取目标图像的网络压缩数据;Obtain the network compressed data of the target image; 利用第二卷积神经网络模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二卷积神经网络模型和第一卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第一卷积神经网络模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;The second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network model use preset training. The training set is obtained, the training set includes multiple sample images, and the first convolutional neural network model is used to perform convolution filter compression on the compressed image to be compressed to obtain the network compressed data; 输出所述解压缩图像。The decompressed image is output. 一种图像压缩装置,其特征在于,所述装置包括:An image compression device, wherein the device includes: 获取模块,用于获取待压缩图像;An acquisition module for acquiring an image to be compressed; 第一压缩模块,用于利用第一卷积神经网络模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一卷积神经网络模型和第二卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第二卷积神经网络模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;A first compression module, configured to perform convolution filtering and compression on the image to be compressed using a first convolutional neural network model to obtain network compressed data; wherein the first convolutional neural network model and the second convolutional neural network The model is obtained by training using a preset training set, where the training set includes multiple sample images, and the second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; 第一存储模块,用于存储所述网络压缩数据。The first storage module is configured to store the network compressed data. 一种图像解压缩装置,其特征在于,所述装置包括:An image decompression device, wherein the device includes: 获取模块,用于获取目标图像的网络压缩数据;An acquisition module for acquiring network compressed data of a target image; 解压缩模块,用于利用第二卷积神经网络模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二卷积神经网络模型和第一卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第一卷积神经网络模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;A decompression module, configured to perform convolution filtering and decompression on the network compressed data using a second convolutional neural network model to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network The model is obtained by training using a preset training set, where the training set includes multiple sample images, and the first convolutional neural network model is used to perform convolution filtering and compression compression on a compressed image to obtain the network compressed data; 输出模块,用于输出所述解压缩图像。An output module, configured to output the decompressed image. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口、所述存储器通过所述通信总线完成相互间的通信;An electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; 所述存储器,用于存放计算机程序;The memory is used to store a computer program; 所述处理器,用于执行所述存储器上所存放的程序,实现:The processor is configured to execute a program stored in the memory to implement: 获取待压缩图像;Obtain the image to be compressed; 利用第一卷积神经网络模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一卷积神经网络模型和第二卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第二卷积神经网络模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;The first convolutional neural network model is used to perform convolution filtering and compression on the image to be compressed, to obtain network compressed data; wherein the first convolutional neural network model and the second convolutional neural network model use a preset training set. Obtained through training, the training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images with a resolution higher than the resolution threshold corresponding to the low-resolution images, and the second convolutional neural network The model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; 存储所述网络压缩数据。The network compressed data is stored. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口、所述存储器通过所述通信总线完成相互间的通信;An electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; 所述存储器,用于存放计算机程序;The memory is used to store a computer program; 所述处理器,用于执行所述存储器上所存放的程序,实现:The processor is configured to execute a program stored in the memory to implement: 获取目标图像的网络压缩数据;Obtain the network compressed data of the target image; 利用第二卷积神经网络模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二卷积神经网络模型和第一卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第一卷积神经网络模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;The second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network model use preset training. Obtained from training set, the training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images corresponding to a low-resolution image with a resolution higher than the resolution threshold, the first convolutional nerve The network model is used to perform convolution filter compression on the image to be compressed to obtain the network compression data; 输出所述解压缩图像。The decompressed image is output. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口、所述存储器通过所述通信总线完成相互间的通信;An electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; 所述存储器,用于存放计算机程序;The memory is used to store a computer program; 所述处理器,用于执行所述存储器上所存放的程序,实现:The processor is configured to execute a program stored in the memory to implement: 获取待压缩图像;Obtain the image to be compressed; 利用第一卷积神经网络模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一卷积神经网络模型和第二卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第二卷积神经网络模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;The first convolutional neural network model is used to perform convolution filtering and compression on the image to be compressed, to obtain network compressed data; wherein the first convolutional neural network model and the second convolutional neural network model use a preset training set. Obtained through training, the training set includes multiple sample images, and the second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; 存储所述网络压缩数据。The network compressed data is stored. 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口、所述存储器通过所述通信总线完成相互间的通信;An electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; 所述存储器,用于存放计算机程序;The memory is used to store a computer program; 所述处理器,用于执行所述存储器上所存放的程序,实现:The processor is configured to execute a program stored in the memory to implement: 获取目标图像的网络压缩数据;Obtain the network compressed data of the target image; 利用第二卷积神经网络模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二卷积神经网络模型和第一卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第一卷积神经网络模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;The second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network model use preset training. The training set is obtained, the training set includes multiple sample images, and the first convolutional neural network model is used to perform convolution filter compression on the compressed image to be compressed to obtain the network compressed data; 输出所述解压缩图像。The decompressed image is output. 一种机器可读存储介质,其特征在于,所述机器可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现:A machine-readable storage medium, characterized in that a computer program is stored in the machine-readable storage medium, and the computer program is implemented when executed by a processor: 获取待压缩图像;Obtain the image to be compressed; 利用第一卷积神经网络模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一卷积神经网络模型和第二卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的 低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第二卷积神经网络模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;The first convolutional neural network model is used to perform convolution filtering and compression on the image to be compressed, to obtain network compressed data; wherein the first convolutional neural network model and the second convolutional neural network model use a preset training set. Obtained through training, the training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images with a resolution higher than the resolution threshold corresponding to the low-resolution images, and the second convolutional neural network The model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; 存储所述网络压缩数据。The network compressed data is stored. 一种机器可读存储介质,其特征在于,所述机器可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现:A machine-readable storage medium, characterized in that a computer program is stored in the machine-readable storage medium, and the computer program is implemented when executed by a processor: 获取目标图像的网络压缩数据;Obtain the network compressed data of the target image; 利用第二卷积神经网络模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二卷积神经网络模型和第一卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第一卷积神经网络模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;The second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network model use preset training. Obtained from training set, the training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images corresponding to a low-resolution image with a resolution higher than the resolution threshold, the first convolutional nerve The network model is used to perform convolution filter compression on the image to be compressed to obtain the network compression data; 输出所述解压缩图像。The decompressed image is output. 一种机器可读存储介质,其特征在于,所述机器可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现:A machine-readable storage medium, characterized in that a computer program is stored in the machine-readable storage medium, and the computer program is implemented when executed by a processor: 获取待压缩图像;Obtain the image to be compressed; 利用第一卷积神经网络模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一卷积神经网络模型和第二卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第二卷积神经网络模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;The first convolutional neural network model is used to perform convolution filtering and compression on the image to be compressed, to obtain network compressed data; wherein the first convolutional neural network model and the second convolutional neural network model use a preset training set. Obtained through training, the training set includes multiple sample images, and the second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; 存储所述网络压缩数据。The network compressed data is stored. 一种机器可读存储介质,其特征在于,所述机器可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现:A machine-readable storage medium, characterized in that a computer program is stored in the machine-readable storage medium, and the computer program is implemented when executed by a processor: 获取目标图像的网络压缩数据;Obtain the network compressed data of the target image; 利用第二卷积神经网络模型对所述网络压缩数据进行卷积滤波解压缩, 得到解压缩图像;其中,所述第二卷积神经网络模型和第一卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第一卷积神经网络模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;Convolutional filtering and decompression of the network compressed data using a second convolutional neural network model to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network model use preset training The training set is obtained, the training set includes multiple sample images, and the first convolutional neural network model is used to perform convolution filter compression on the compressed image to be compressed to obtain the network compressed data; 输出所述解压缩图像。The decompressed image is output. 一种计算机程序,其特征在于,所述计算机程序被处理器执行时实现:A computer program, characterized in that the computer program is implemented when executed by a processor: 获取待压缩图像;Obtain the image to be compressed; 利用第一卷积神经网络模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一卷积神经网络模型和第二卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第二卷积神经网络模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;The first convolutional neural network model is used to perform convolution filtering and compression on the image to be compressed, to obtain network compressed data; wherein the first convolutional neural network model and the second convolutional neural network model use a preset training set. Obtained through training, the training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images with a resolution higher than the resolution threshold corresponding to the low-resolution images, and the second convolutional neural network The model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; 存储所述网络压缩数据。The network compressed data is stored. 一种计算机程序,其特征在于,所述计算机程序被处理器执行时实现:A computer program, characterized in that the computer program is implemented when executed by a processor: 获取目标图像的网络压缩数据;Obtain the network compressed data of the target image; 利用第二卷积神经网络模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二卷积神经网络模型和第一卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张分辨率低于分辨率阈值的低分辨率图像,以及低分辨率图像对应的分辨率高于所述分辨率阈值的图像,所述第一卷积神经网络模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;The second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network model use preset training. Obtained from training set, the training set includes multiple low-resolution images with a resolution lower than a resolution threshold, and images corresponding to a low-resolution image with a resolution higher than the resolution threshold, the first convolutional nerve The network model is used to perform convolution filter compression on the image to be compressed to obtain the network compression data; 输出所述解压缩图像。The decompressed image is output. 一种计算机程序,其特征在于,所述计算机程序被处理器执行时实现:A computer program, characterized in that the computer program is implemented when executed by a processor: 获取待压缩图像;Obtain the image to be compressed; 利用第一卷积神经网络模型对所述待压缩图像进行卷积滤波压缩,得到网络压缩数据;其中,所述第一卷积神经网络模型和第二卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第二卷积神经网络模型用于对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;The first convolutional neural network model is used to perform convolution filtering and compression on the image to be compressed, to obtain network compressed data; wherein the first convolutional neural network model and the second convolutional neural network model use a preset training set. Obtained through training, the training set includes multiple sample images, and the second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; 存储所述网络压缩数据。The network compressed data is stored. 一种计算机程序,其特征在于,所述计算机程序被处理器执行时实现:A computer program, characterized in that the computer program is implemented when executed by a processor: 获取目标图像的网络压缩数据;Obtain the network compressed data of the target image; 利用第二卷积神经网络模型对所述网络压缩数据进行卷积滤波解压缩,得到解压缩图像;其中,所述第二卷积神经网络模型和第一卷积神经网络模型利用预设的训练集训练获得,所述训练集包括多张样本图像,所述第一卷积神经网络模型用于对待压缩图像压缩进行卷积滤波压缩,得到所述网络压缩数据;The second convolutional neural network model is used to perform convolution filtering and decompression on the network compressed data to obtain a decompressed image; wherein the second convolutional neural network model and the first convolutional neural network model use preset training. The training set is obtained, the training set includes multiple sample images, and the first convolutional neural network model is used to perform convolution filter compression on the compressed image to be compressed to obtain the network compressed data; 输出所述解压缩图像。The decompressed image is output.
PCT/CN2019/106149 2018-09-19 2019-09-17 Image compression and decompression method and apparatus, electronic device, and storage medium Ceased WO2020057492A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811095462.0 2018-09-19
CN201811095462.0A CN110933432A (en) 2018-09-19 2018-09-19 Image compression method, image decompression method, image compression device, image decompression device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2020057492A1 true WO2020057492A1 (en) 2020-03-26

Family

ID=69855970

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/106149 Ceased WO2020057492A1 (en) 2018-09-19 2019-09-17 Image compression and decompression method and apparatus, electronic device, and storage medium

Country Status (2)

Country Link
CN (1) CN110933432A (en)
WO (1) WO2020057492A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107018422A (en) * 2017-04-27 2017-08-04 四川大学 Still image compression method based on depth convolutional neural networks
CN107155110A (en) * 2017-06-14 2017-09-12 福建帝视信息科技有限公司 A kind of picture compression method based on super-resolution technique
CN107481295A (en) * 2017-08-14 2017-12-15 哈尔滨工业大学 The image compression system of convolutional neural networks based on dynamic byte length distribution
CN107563965A (en) * 2017-09-04 2018-01-09 四川大学 Jpeg compressed image super resolution ratio reconstruction method based on convolutional neural networks
CN107578377A (en) * 2017-08-31 2018-01-12 北京飞搜科技有限公司 A kind of super-resolution image reconstruction method and system based on deep learning
US20180131946A1 (en) * 2016-11-07 2018-05-10 Electronics And Telecommunications Research Institute Convolution neural network system and method for compressing synapse data of convolution neural network
JP2018132855A (en) * 2017-02-14 2018-08-23 国立大学法人電気通信大学 Image style conversion apparatus, image style conversion method and image style conversion program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9838686B2 (en) * 2013-07-12 2017-12-05 Intel Corporation Techniques for inclusion of thumbnail images in compressed video data
CN105611303B (en) * 2016-03-07 2019-04-09 京东方科技集团股份有限公司 Image compression system, decompression system, training method and device, display device
CN107547773B (en) * 2017-07-26 2020-01-03 新华三技术有限公司 Image processing method, device and equipment
CN108012157B (en) * 2017-11-27 2020-02-04 上海交通大学 Method for constructing convolutional neural network for video coding fractional pixel interpolation
CN108062780B (en) * 2017-12-29 2019-08-09 百度在线网络技术(北京)有限公司 Image compression method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180131946A1 (en) * 2016-11-07 2018-05-10 Electronics And Telecommunications Research Institute Convolution neural network system and method for compressing synapse data of convolution neural network
JP2018132855A (en) * 2017-02-14 2018-08-23 国立大学法人電気通信大学 Image style conversion apparatus, image style conversion method and image style conversion program
CN107018422A (en) * 2017-04-27 2017-08-04 四川大学 Still image compression method based on depth convolutional neural networks
CN107155110A (en) * 2017-06-14 2017-09-12 福建帝视信息科技有限公司 A kind of picture compression method based on super-resolution technique
CN107481295A (en) * 2017-08-14 2017-12-15 哈尔滨工业大学 The image compression system of convolutional neural networks based on dynamic byte length distribution
CN107578377A (en) * 2017-08-31 2018-01-12 北京飞搜科技有限公司 A kind of super-resolution image reconstruction method and system based on deep learning
CN107563965A (en) * 2017-09-04 2018-01-09 四川大学 Jpeg compressed image super resolution ratio reconstruction method based on convolutional neural networks

Also Published As

Publication number Publication date
CN110933432A (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN108681743B (en) Image object recognition method and device, storage medium
CN110298790A (en) A kind of pair of image carries out the processing method and processing device of super-resolution rebuilding
CN108022212A (en) High-resolution pictures generation method, generating means and storage medium
CN109859143B (en) Hyperspectral image panchromatic sharpening method, device and electronic device
CN110310229A (en) Image processing method, image processing apparatus, terminal device and readable storage medium
CN110136057B (en) Image super-resolution reconstruction method, device and electronic equipment
CN110428382B (en) Efficient video enhancement method and device for mobile terminal and storage medium
CN110288530A (en) A processing method and device for super-resolution reconstruction of an image
US12400295B2 (en) Image processing device and method
CN107277615A (en) Live stylized processing method, device, computing device and storage medium
CN107277391A (en) Image switching network processing method, server, computing device and storage medium
CN115035565A (en) Multi-scale small target detection method, device and equipment for imitating visual cortex
CN108898549A (en) Image processing method, picture processing unit and terminal device
CN114638375A (en) Video generation model training method, video generation method and device
CN113643180B (en) Image registration method, device, equipment and medium
CN118505571A (en) Image restoration method and device based on text prompt
CN106250871A (en) City management case classification method and device
CN111339809A (en) Classroom behavior analysis method and device, and electronic equipment
CN112530027A (en) Three-dimensional point cloud repairing method and device and electronic equipment
CN116597293A (en) Multi-mode scene recognition method, device, computer equipment and storage medium
WO2020057492A1 (en) Image compression and decompression method and apparatus, electronic device, and storage medium
CN113486939B (en) Picture processing method, device, terminal and storage medium
JP7064050B2 (en) Focal determination method, device, computer equipment and storage medium based on image conversion
CN111402276B (en) Binary image generation method and device, electronic equipment and readable storage medium
CN112530003A (en) Three-dimensional human hand reconstruction method and device and electronic equipment

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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 23.06.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19863306

Country of ref document: EP

Kind code of ref document: A1