Image semantic transmission method, device, equipment and storage medium
By using codebooks and preset feature processing models built on historical images in the image semantic transmission system, the coding, prediction and correction of feature vectors is solved, and the accuracy of image semantic transmission is improved. and stability.
Patent Information
- Application Number
- CN202410890938.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-07-04
AI Technical Summary
Existing image semantic transmission systems are susceptible to noise in wireless channels, resulting in low accuracy of image semantic transmission.
The codebook and preset feature processing model are constructed based on historical images, and feature vector encoding, prediction and correction are performed through the target encoder, target index converter and target decoder, and the codebook is used to assist in correcting the noise-contaminated feature vectors.
It improves the accuracy and stability of image semantic transmission, enhances the stability of encoding and decoding, and significantly improves the transmission efficiency.
Smart Images

Figure CN118470435B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image semantic transmission method, device, equipment and storage medium. Background Art
[0002] With the rapid development of mobile communication and Internet technology, the demand for high-speed, low-latency wireless access has increased dramatically. Traditional communication systems have approached the Shannon theoretical limit, so there is an urgent need for breakthroughs in new communication technologies. Generative semantic communication based on codebooks has attracted more and more attention because it only needs to send indexes. However, since the semantic relationship between feature vectors (the output of the semantic encoder after encoding the source) is not necessarily related to their corresponding index numbers, the performance of semantic communication systems based on codebook transmission indexes is also easily affected by channel noise. Therefore, as a second choice, the feature vector is directly transmitted at the transmitter, and codebook feature matching is performed at the receiver. However, the transmission of feature vectors will be contaminated by the noise of the physical channel. When the index is transmitted on the wireless channel, even a small error in the decoded index at the receiver may reduce the accuracy of image semantic transmission. Summary of the invention
[0003] The main purpose of the present application is to provide an image semantic transmission method, device, equipment and storage medium, aiming to solve the technical problem of low accuracy of existing image semantic transmission.
[0004] To achieve the above purpose, the present application proposes a method for image semantic transmission, the method comprising:
[0005] Constructing a codebook and a preset feature processing model based on historical images, wherein the preset feature processing model includes a target encoder, a target index converter and a target decoder, the target encoder is located at the image sending end, and the target index converter and the target decoder are located at the image receiving end;
[0006] Acquire the image to be transmitted;
[0007] Inputting the image to be transmitted into a target encoder in the preset feature processing model, and encoding the image by the target encoder to obtain a first feature vector;
[0008] Processing the first feature vector by using the target index converter and the codebook to obtain a second feature vector;
[0009] The second feature vector is decoded by the target decoder to obtain a target image.
[0010] In one embodiment, the step of processing the first feature vector by using the target index converter and the codebook to obtain a second feature vector includes:
[0011] Transmitting the first feature vector to the target index converter, predicting and correcting the first feature vector through the target index converter to obtain a corresponding target index;
[0012] The codebook is traversed according to the target index to obtain a second feature vector.
[0013] In one embodiment, the step of constructing a codebook and a preset feature processing model based on historical images includes:
[0014] Access historical imagery;
[0015] Preprocessing the historical image to obtain a processed historical image;
[0016] Input the processed historical images into the initial encoder and the initial decoder for training to obtain training results;
[0017] Constructing a target loss function based on the training result, and optimizing the initial encoder and the initial decoder based on the target loss function to obtain a target encoder and a target decoder;
[0018] A codebook and a target index converter are constructed based on the target encoder.
[0019] In one embodiment, the step of constructing a target loss function based on the training result, and optimizing the initial encoder and the initial decoder based on the target loss function to obtain a target encoder and a target decoder includes:
[0020] Constructing a first loss function and a second loss function based on the training results;
[0021] Construct the intermediate layer loss function;
[0022] The initial encoder is optimized by using the first loss function and the intermediate layer loss function to obtain a target encoder;
[0023] The initial decoder is optimized by using the second loss function and the intermediate layer loss function to obtain a target decoder.
[0024] In one embodiment, the step of constructing a codebook and a target index converter based on the target encoder is:
[0025] The processed historical image is encoded by the target encoder to obtain an encoding feature vector group;
[0026] Constructing a codebook based on the set of encoded feature vectors;
[0027] Obtaining index data and a quantization vector group according to the codebook;
[0028] Adding noise to the encoded feature vector group to obtain a noise feature vector;
[0029] Get weight parameters;
[0030] Constructing a converter loss function using the weight parameters, the index data, the quantization vector group, and the noise feature vector;
[0031] The initial index converter is optimized by the converter loss function to obtain a target index converter.
[0032] In one embodiment, the step of constructing a codebook based on the encoding feature vector group includes:
[0033] Get a preset quantization vector;
[0034] Perform nearest neighbor matching on each coded feature vector in the coded feature vector group and the preset quantization vector to obtain a matching vector;
[0035] A codebook is constructed based on the matching vector, and a codebook index corresponding to the codebook is set.
[0036] In one embodiment, the step of constructing the first loss function and the second loss function based on the training result includes:
[0037] Obtaining an average value between a predicted value and an actual value and a difference between the predicted value and the actual value according to the training result;
[0038] Constructing a first loss function by using the average value and the difference;
[0039] Obtaining a truth score value according to the training result;
[0040] A second loss function is constructed using the truth score value.
[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes an image semantic transmission device, the image semantic transmission device comprising:
[0042] A construction module, used to construct a codebook and a preset feature processing model based on historical images, wherein the preset feature processing model includes a target encoder, a target index converter and a target decoder, the target encoder is located at the image sending end, and the target index converter and the target decoder are located at the image receiving end;
[0043] An acquisition module, used for acquiring an image to be transmitted;
[0044] An input module, used for inputting the image to be transmitted into a target encoder in the preset feature processing model, and encoding the image by the target encoder to obtain a first feature vector;
[0045] A processing module, configured to process the first feature vector through the target index converter and the codebook to obtain a second feature vector;
[0046] A decoding module is used to decode the second feature vector through the target decoder to obtain a target image.
[0047] In addition, to achieve the above-mentioned purpose, the present application also proposes an image semantic transmission device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the image semantic transmission method described above.
[0048] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the image semantic transmission method described above are implemented.
[0049] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the image semantic transmission method described above are implemented.
[0050] One or more technical solutions proposed in this application have at least the following technical effects:
[0051] This embodiment constructs a codebook and a preset feature processing model based on historical images; obtains an image to be transmitted; inputs the image to be transmitted into a target encoder in the preset feature processing model, and obtains a first feature vector by encoding with the target encoder; processes the first feature vector with a target index converter and a codebook to obtain a second feature vector; decodes the second feature vector with a target decoder to obtain a target image, and uses the codebook and target index converter in the preset feature processing model, with the assistance of the codebook, to predict and correct the feature vector contaminated by noise, thereby solving the problem of feature vector being damaged by noise interference during transmission and improving the accuracy of image semantic transmission. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0054] Figure 1 A flowchart of the first embodiment of the image semantic transmission method of the present application is provided;
[0055] Figure 2 This is a structural block diagram of a communication system in an embodiment of the image semantic transmission method of the present application;
[0056] Figure 3 A flowchart of the second embodiment of the image semantic transmission method of the present application is provided;
[0057] Figure 4 A flowchart of the third embodiment of the image semantic transmission method of the present application is provided;
[0058] Figure 5 This is a schematic diagram of the module structure of the image semantic transmission device according to an embodiment of the present application;
[0059] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the image semantic transmission method in the embodiment of the present application.
[0060] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0061] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0062] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0063] The main solutions of the embodiments of this application are:
[0064] Constructing a codebook and a preset feature processing model based on historical images, wherein the preset feature processing model includes a target encoder, a target index converter and a target decoder, the target encoder is located at the image sending end, and the target index converter and the target decoder are located at the image receiving end;
[0065] Acquire the image to be transmitted;
[0066] Inputting the image to be transmitted into a target encoder in the preset feature processing model, and encoding the image by the target encoder to obtain a first feature vector;
[0067] Processing the first feature vector by using the target index converter and the codebook to obtain a second feature vector;
[0068] The second feature vector is decoded by the target decoder to obtain a target image.
[0069] In this embodiment, for the convenience of description, the following description is made by taking the image semantic transmission device as the execution subject.
[0070] Generative semantic communication based on codebooks has attracted more and more attention because it only needs to send the index feature (the index is a number, which corresponds to the feature vector stored in the codebook. Therefore, the transmission efficiency is very high). However, since the semantic relationship between feature vectors (the output of the semantic encoder after encoding the source) is not necessarily related to the corresponding index number, the performance of semantic communication systems based on codebook transmission indexes is also easily affected by channel noise. When the index is transmitted on a wireless channel, a small error in the decoded index at the receiver may lead to a catastrophic result in the final reconstruction. This is because each index corresponds to a large amount of semantic information (because the index corresponds to the feature vector in the codebook). As a second-best alternative, directly sending feature vectors (instead of indexes) at the transmitter and then matching codebook features at the receiver is also a good choice after balancing transmission efficiency and transmission stability (although the transmission of feature vectors is not as small and efficient as directly transmitting indexes, it is still a highly compressed information feature, so the transmission efficiency is also good. Then, with the assistance of the codebook, it also has a strong advantage in transmission stability). Of course, the transmission of feature vectors will also be contaminated by the noise of the physical channel. Although the impact is smaller than that caused by the index being contaminated, this kind of contamination also needs to be paid attention to. Therefore, how to improve the robustness of the system to noise needs to be considered.
[0071] This application provides a solution, which uses a target index converter to predict and correct the noise-contaminated feature vectors with the aid of a codebook, solving the problem that the feature vectors are damaged by noise interference during transmission, thereby affecting image generation. The codebook is a priori knowledge, and its size is fixed and limited, so it reduces the information understanding deviation between the sender and the receiver. This feature enhances the stability of the codec and significantly improves the transmission efficiency.
[0072] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an image semantic transmission device, etc. The following takes the image semantic transmission device as an example to illustrate this embodiment and the following embodiments.
[0073] Based on this, the present application embodiment provides an image semantic transmission method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the image semantic transmission method of the present application.
[0074] In this embodiment, the image semantic transmission method includes steps S10 to S50:
[0075] Step S10: constructing a codebook and a preset feature processing model based on historical images, wherein the preset feature processing model includes a target encoder, a target index converter and a target decoder, the target encoder is located at the image sending end, and the target index converter and the target decoder are located at the image receiving end.
[0076] It should be noted that the historical images are sample images of various categories collected in the early stage, and a codebook and a preset feature processing model can be constructed based on the historical images.
[0077] Codebook plays a key intermediary role in the field of machine learning and deep learning, especially in neural network models. In particular, in tasks involving data representation and compression, codebook is a fixed set of vectors that are learned during the training process and are used to approximate or represent multiple possible states or features of input data. For example, feature vectors can be obtained by feature extraction of historical images, and then codebooks can be constructed through feature vectors.
[0078] In a specific implementation, the target encoder is the generated optimal encoder, the target decoder is the generated optimal decoder, and the target index converter is the generated optimal index converter. The target encoder, target decoder, and target index converter can all be obtained through training.
[0079] like Figure 2 As shown, Figure 2 The structure diagram of the communication system in the image semantic method is as follows: h Input it into the target encoder in the preset feature processing model for encoding to obtain the encoded feature vector Z h , the encoded feature vector Z h When transmitted through a channel, there will be noise interference during the transmission process, so the encoded feature vector becomes a feature vector with noise interference , the feature vector with noise interference is input into the target index converter (V21T) for prediction and correction, so as to obtain the corresponding index (by some single index Composition, expressed as ), indexing the feature vector retrieved from the codebook , sent to the target decoder to generate a high-quality image with similar visual perception to the input image to be transmitted .
[0080] Step S20: Acquire the image to be transmitted.
[0081] It should be noted that the image to be transmitted is the image that currently needs to be transmitted through the communication system. The image to be transmitted may be images of various categories or multiple images of the same category, which can be selected according to user needs, and this embodiment does not limit this.
[0082] Step S30: inputting the image to be transmitted into a target encoder in the preset feature processing model, and encoding the image by the target encoder to obtain a first feature vector.
[0083] In a specific implementation, the preset feature processing model includes a target encoder, and therefore, the image to be transmitted may be first input into the target encoder for encoding to obtain a first feature vector.
[0084] The target encoder is the semantic encoder, and the first feature vector is composed of some single feature vectors.
[0085] Step S40: Processing the first feature vector through the target index converter and the codebook to obtain a second feature vector.
[0086] In a specific implementation, after the first eigenvector is obtained, the first eigenvector can be sent to a receiving end through a wireless channel, and the target index converter and the codebook at the receiving end process the first eigenvector, which may include converting, predicting, correcting, matching, etc. the first eigenvector, so as to obtain a second eigenvector. The second eigenvector is a eigenvector without noise pollution.
[0087] Step S50: decoding the second feature vector by the target decoder to obtain a target image.
[0088] It can be understood that the second feature vector can be decoded by the target decoder to generate a high-quality image with similar visual perception to the system input image, that is, a target image.
[0089] This embodiment constructs a codebook and a preset feature processing model based on historical images, wherein the preset feature processing model includes a target encoder, a target index converter and a target decoder, the target encoder is located at the image sending end, and the target index converter and the target decoder are located at the image receiving end; the image to be transmitted is obtained; the image to be transmitted is input into the target encoder in the preset feature processing model, and a first feature vector is obtained by encoding with the target encoder; the first feature vector is processed with the target index converter and the codebook to obtain a second feature vector; the second feature vector is decoded with the target decoder to obtain a target image, and with the assistance of the codebook, the target index converter is used to predict and correct the feature vector contaminated by noise, thereby solving the problem of feature vector being damaged by noise interference during transmission and improving the accuracy of image semantic transmission.
[0090] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , step S40 includes steps S401~S402:
[0091] Step S401: transmitting the first feature vector to the target index converter, predicting and correcting the first feature vector through the target index converter to obtain a corresponding target index.
[0092] It should be noted that the target index converter can predict and correct the first feature vector. Therefore, after the first feature vector is transmitted to the target index converter, the first feature vector can be predicted and corrected to obtain the corresponding target index. , the target index consists of some single index Composition, expressed as .
[0093] Step S402: traverse the codebook according to the target index to obtain a second feature vector.
[0094] It should be understood that the codebook can be traversed and searched through the target index to obtain a matching feature vector, that is, the second feature vector.
[0095] In this embodiment, the first feature vector is transmitted to the target index converter, and the first feature vector is predicted and corrected by the target index converter to obtain the corresponding target index; the second feature vector is obtained by traversing the code book according to the target index, and the noise-contaminated feature vector is predicted and corrected by the target index converter with the assistance of the code book, thereby solving the problem that the feature vector is damaged by noise interference during transmission, thereby affecting image generation.
[0096] Based on the first embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 , step S10 includes steps S101 to S105:
[0097] Step S101: Acquire historical images.
[0098] It should be noted that the historical images are sample images collected in the early stage and used for model construction.
[0099] Step S102: pre-processing the historical image to obtain a processed historical image.
[0100] In a specific implementation, the historical image may be preprocessed, such as normalization, classification, and grayscale processing, to obtain a processed historical image. The processed historical image is a task-related image.
[0101] Step S103: input the processed historical image into the initial encoder and the initial decoder for training to obtain a training result.
[0102] In a specific implementation, the processed historical images can be input into the initial encoder and the initial decoder for training, that is, the task-related images are trained end-to-end to obtain training results.
[0103] Step S104: constructing a target loss function based on the training result, and optimizing the initial encoder and the initial decoder based on the target loss function to obtain a target encoder and a target decoder.
[0104] It should be noted that a target loss function can be constructed based on the training results, so that the initial encoder and the initial decoder can be optimized by the target loss function to obtain the target encoder and the target decoder.
[0105] In a feasible implementation, step S104 may include steps A10-A13:
[0106] Step A10: constructing a first loss function and a second loss function based on the training results.
[0107] In a specific implementation, the first loss function and the second loss function may be constructed based on the training results. The training results may include predicted values for the processed historical images and may also include other values, which are not limited in this embodiment.
[0108] Furthermore, the step of constructing a first loss function and a second loss function based on the training result includes:
[0109] According to the training results, an average value between the predicted value and the actual value and a difference between the predicted value and the actual value are obtained; a first loss function is constructed by the average value and the difference; according to the training results, a truth score value is obtained; and a second loss function is constructed by the truth score value.
[0110] It should be noted that the predicted value can be obtained according to the training result, and the average value between the predicted value and the actual value and the difference between the predicted value and the actual value are calculated, so as to construct the first loss function through the average value and the difference, as shown in the following formula 1:
[0111] (Formula 1)
[0112] In the above formula 1, is the first loss function, is the L1 loss, which is the average of the absolute values between the predicted value and the actual value. is the perceptual loss, which is the difference between the predicted value and the actual value in the high-dimensional space, that is, the difference. It is a deep feature extractor, and the VGG19 model is used here.
[0113] In a specific implementation, the second loss function is obtained by using the adversarial neural network model, and the authenticity score value can be obtained through the training results, so as to construct the second loss function according to the authenticity score value. .
[0114] Step A11: Construct the intermediate layer loss function.
[0115] It should be noted that since the first loss function and the second loss function do not have sufficient constraints on the quantized features, a loss function of the middle layer of the network, namely the middle layer loss function, can be added. Specifically, the middle layer loss function can be constructed by obtaining the weight balance parameters of the gradient stop operator, the update rate of the target encoder and the codebook, and the feature vector encoded by the target encoder and the feature vector retrieved from the codebook by the index.
[0116] The intermediate layer loss function is constructed as follows:
[0117] (Formula 2)
[0118] In the above formula 2, sg(.) represents the gradient stop operator, represents the weight balancing parameter for the update rate of the target encoder and the codebook, is the feature vector encoded by the target encoder, is the feature vector retrieved from the codebook for the index.
[0119] Step A12: Optimize the initial encoder using the first loss function and the intermediate layer loss function to obtain a target encoder.
[0120] In a specific implementation, the initial encoder can be optimized by the first loss function and the intermediate layer loss function to obtain the target encoder, and the mean square error or mean absolute error between the predicted value and the actual value output by the initial encoder can be calculated by the first loss function and the intermediate layer loss function, so that the initial encoder can be optimized by the mean square error or the mean absolute error to obtain the target encoder.
[0121] Step A13: Optimize the initial decoder by using the second loss function and the intermediate layer loss function to obtain a target decoder.
[0122] In a specific implementation, the initial decoder can be optimized by the second loss function and the intermediate layer loss function to obtain the target encoder, and the mean square error or mean absolute error between the predicted value and the actual value output by the initial decoder can be calculated by the first loss function and the intermediate layer loss function, so that the initial decoder can be optimized by the mean square error or the mean absolute error to obtain the target decoder.
[0123] In a specific implementation, the total loss function can be constructed by the first loss function, the second loss function and the intermediate layer loss function. The total loss function is expressed as follows:
[0124] (Formula 3)
[0125] In the above formula 3, is the total loss function, is the first loss function, is the second loss function, is the loss function of the middle layer.
[0126] Step S105: constructing a codebook and a target index converter based on the target encoder.
[0127] In a specific implementation, a codebook and a target index converter may be constructed based on a target encoder. For example, the processed historical image is encoded by the target encoder to construct the codebook and the target index converter.
[0128] In a feasible implementation, step S105 may include steps B10-B16:
[0129] Step B10: Encode the processed historical image through the target encoder to obtain a set of encoded feature vectors.
[0130] It should be noted that the processed historical image can be encoded by a target encoder to obtain a set of encoded feature vectors.
[0131] Step B11: constructing a codebook based on the encoding feature vector group.
[0132] In a specific implementation, each encoded feature vector in the encoded feature vector group can be matched to construct a codebook, which is a semantic knowledge base of image high-dimensional space features.
[0133] Furthermore, the step of constructing a codebook based on the coding feature vector group includes: obtaining a preset quantization vector; performing nearest neighbor matching on each coding feature vector in the coding feature vector group and the preset quantization vector to obtain a matching vector; constructing a codebook based on the matching vector, and setting a codebook index corresponding to the codebook.
[0134] It should be noted that the preset quantization vector can be a quantization vector stored in the quantization module. In the quantization module, each coding feature vector in the coding feature vector group is nearest neighbor matched with the quantization vector in the quantization module to obtain a matching vector. For example, the similarity between each coding feature vector and the preset quantization vector is calculated, and the similarity is compared with a similarity threshold. The coding feature vector with a similarity greater than or equal to the similarity threshold is used as the matching vector, so as to construct a codebook based on the matching vector, place the matching vector at the corresponding position (i, j), and combine them to obtain a quantization output vector group for reconstruction, and output the codebook index corresponding to the matching vector for subsequent query use.
[0135] Step B12: Obtain index data and a quantization vector group according to the codebook.
[0136] In a specific implementation, index data and a quantization vector group may be obtained according to a codebook, and the index data and the quantization vector group may be used in a subsequent process of optimizing an initial index converter.
[0137] Step B13: adding noise to the encoded feature vector group to obtain a noise feature vector.
[0138] In a specific implementation, since the role of the target index converter is to use the global information of the noise-contaminated feature vector to predict the index from the codebook that is most similar to the original image semantics, noise can be added to the encoded feature vector group to obtain a noise feature vector.
[0139] Random noise may be added to the set of encoded feature vectors to obtain a noisy feature vector.
[0140] Step B14: Obtain weight parameters.
[0141] In a specific implementation, the weight parameter is the weight parameter for constructing the converter loss function, which can be set according to needs.
[0142] Step B15: construct a converter loss function using the weight parameters, the index data, the quantization vector group and the noise feature vector.
[0143] Both the index data and the quantization vector group can be obtained through the codebook, which can be regarded as the true value of the corresponding variable index and quantization vector. The input of the index converter is the damaged image feature vector and the output is the index. Therefore, the loss function of the converter can be constructed by the weight parameter, the true value of the index and quantization vector, and the noise feature vector. The converter loss function is constructed as follows:
[0144] (Formula 4)
[0145] In the above formula 4, is the converter loss function, is the weight parameter, is the truth value of the index, is the true value of the quantized vector, is the noise feature vector.
[0146] Step B16: Optimize the initial index converter by using the converter loss function to obtain a target index converter.
[0147] In the specific implementation, the initial index converter can be optimized through the converter loss function to obtain the target index converter. When training the initial index converter, the upstream and downstream Wang Lin parameters of the initial index converter are fixed, and only some parameters are updated to obtain the required feature vector-index converter. At the end of training, all parameters can be unfrozen to fine-tune the network.
[0148] This embodiment obtains historical images; preprocesses the historical images to obtain processed historical images; inputs the processed historical images into an initial encoder and an initial decoder for training to obtain training results; constructs a target loss function based on the training results, and optimizes the initial encoder and the initial decoder based on the target loss function to obtain a target encoder and a target decoder; constructs a codebook and a target index converter based on the target encoder, obtains a target codec and a codebook based on end-to-end training, and generates a target index converter with the assistance of the codebook to improve the effect of image semantic transmission.
[0149] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the image semantic transmission method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0150] This application also provides an image semantic transmission device, please refer to Figure 5 , the image semantic transmission device comprises:
[0151] The construction module 10 is used to construct a codebook and a preset feature processing model based on historical images, wherein the preset feature processing model includes a target encoder, a target index converter and a target decoder, the target encoder is located at the image sending end, and the target index converter and the target decoder are located at the image receiving end.
[0152] The acquisition module 20 is used to acquire the image to be transmitted.
[0153] The input module 30 is used to input the image to be transmitted into the target encoder in the preset feature processing model, and obtain a first feature vector by encoding with the target encoder.
[0154] The processing module 40 is configured to process the first feature vector through the target index converter and the codebook to obtain a second feature vector.
[0155] The decoding module 50 is used to decode the second feature vector through the target decoder to obtain a target image.
[0156] The image semantic transmission device provided by the present application adopts the image semantic transmission method in the above embodiment, which can solve the technical problem of low accuracy of existing image semantic transmission. Compared with the prior art, the beneficial effects of the image semantic transmission device provided by the present application are the same as the beneficial effects of the image semantic transmission method provided by the above embodiment, and other technical features in the image semantic transmission device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0157] The present application provides an image semantic transmission device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image semantic transmission method in the above-mentioned embodiment 1.
[0158] Reference below Figure 6, which shows a schematic diagram of the structure of an image semantic transmission device suitable for implementing the embodiment of the present application. The image semantic transmission device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The image semantic transmission device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0159] like Figure 6 As shown, the image semantic transmission device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the image semantic transmission device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the image semantic transmission device to communicate with other devices wirelessly or by wire to exchange data. Although the image semantic transmission device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0160] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0161] The image semantic transmission device provided by the present application adopts the image semantic transmission method in the above embodiment, which can solve the technical problem of low accuracy of existing image semantic transmission. Compared with the prior art, the beneficial effects of the image semantic transmission device provided by the present application are the same as the beneficial effects of the image semantic transmission method provided by the above embodiment, and other technical features in the image semantic transmission device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0162] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0163] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0164] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the image semantic transmission method in the above-mentioned embodiment.
[0165] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0166] The computer-readable storage medium may be included in the image semantic transmission device; or may exist independently without being assembled into the image semantic transmission device.
[0167] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the image semantic transmission device, the image semantic transmission device: constructs a codebook and a preset feature processing model based on historical images, wherein the preset feature processing model includes a target encoder, a target index converter, and a target decoder, the target encoder is located at the image sending end, and the target index converter and the target decoder are located at the image receiving end;
[0168] Acquire the image to be transmitted;
[0169] Inputting the image to be transmitted into a target encoder in the preset feature processing model, and encoding the image by the target encoder to obtain a first feature vector;
[0170] Processing the first feature vector by using the target index converter and the codebook to obtain a second feature vector;
[0171] The second feature vector is decoded by the target decoder to obtain a target image.
[0172] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0173] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0174] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0175] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned image semantic transmission method, and can solve the technical problem of low accuracy of existing image semantic transmission. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the image semantic transmission method provided by the above-mentioned embodiment, and will not be described in detail here.
[0176] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned image semantic transmission method when executed by a processor.
[0177] The computer program product provided by this application can solve the technical problem of low accuracy of existing image semantic transmission. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as those of the image semantic transmission method provided by the above embodiment, which will not be repeated here.
[0178] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for image semantic transmission, characterized in that: The image semantic transmission method comprises: Constructing a codebook and a preset feature processing model based on historical images, wherein the preset feature processing model includes a target encoder, a target index converter and a target decoder, the target encoder is located at the image sending end, and the target index converter and the target decoder are located at the image receiving end; Acquire the image to be transmitted; Inputting the image to be transmitted into a target encoder in the preset feature processing model, and encoding the image by the target encoder to obtain a first feature vector; Processing the first feature vector by using the target index converter and the codebook to obtain a second feature vector; Decoding the second feature vector by the target decoder to obtain a target image; The step of constructing a codebook and a preset feature processing model based on historical images includes: Access historical imagery; Preprocessing the historical image to obtain a processed historical image; Input the processed historical images into the initial encoder and the initial decoder for training to obtain training results; Constructing a first loss function and a second loss function based on the training results; Construct the intermediate layer loss function; The initial encoder is optimized by using the first loss function and the intermediate layer loss function to obtain a target encoder; The initial decoder is optimized by using the second loss function and the intermediate layer loss function to obtain a target decoder; The processed historical image is encoded by the target encoder to obtain an encoding feature vector group; Constructing a codebook based on the set of encoded feature vectors; Obtaining index data and a quantization vector group according to the codebook; Adding noise to the encoded feature vector group to obtain a noise feature vector; Get weight parameters; Constructing a converter loss function using the weight parameters, the index data, the quantization vector group, and the noise feature vector; The initial index converter is optimized by the converter loss function to obtain a target index converter.
2. The image semantic transmission method according to claim 1, characterized in that: The step of processing the first feature vector by using the target index converter and the codebook to obtain a second feature vector comprises: Transmitting the first feature vector to the target index converter, predicting and correcting the first feature vector through the target index converter to obtain a corresponding target index; The codebook is traversed according to the target index to obtain a second feature vector.
3. The image semantic transmission method according to claim 1, characterized in that: The step of constructing a codebook based on the encoding feature vector group comprises: Get a preset quantization vector; Perform nearest neighbor matching on each encoding feature vector in the encoding feature vector group and the preset quantization vector to obtain a matching vector; A codebook is constructed based on the matching vector, and a codebook index corresponding to the codebook is set.
4. The image semantic transmission method according to claim 1, characterized in that: The step of constructing a first loss function and a second loss function based on the training result comprises: Obtaining an average value between a predicted value and an actual value and a difference between the predicted value and the actual value according to the training result; Constructing a first loss function by using the average value and the difference; Obtaining a truth score value according to the training result; A second loss function is constructed using the truth score value.
5. An image semantic transmission device, characterized in that: The image semantic transmission device comprises: A construction module, used to construct a codebook and a preset feature processing model based on historical images, wherein the preset feature processing model includes a target encoder, a target index converter and a target decoder, the target encoder is located at the image sending end, and the target index converter and the target decoder are located at the image receiving end; An acquisition module, used for acquiring an image to be transmitted; An input module, used for inputting the image to be transmitted into a target encoder in the preset feature processing model, and encoding the image by the target encoder to obtain a first feature vector; A processing module, configured to process the first feature vector through the target index converter and the codebook to obtain a second feature vector; A decoding module, used for decoding the second feature vector through the target decoder to obtain a target image; The construction module is also used to obtain historical images; pre-process the historical images to obtain processed historical images; input the processed historical images into the initial encoder and the initial decoder for training to obtain training results; construct a first loss function and a second loss function based on the training results; construct an intermediate layer loss function; optimize the initial encoder by the first loss function and the intermediate layer loss function to obtain a target encoder; optimize the initial decoder by the second loss function and the intermediate layer loss function to obtain a target decoder; encode the processed historical images by the target encoder to obtain a coding feature vector group; construct a code book based on the coding feature vector group; obtain index data and a quantization vector group according to the code book; add noise to the coding feature vector group to obtain a noise feature vector; obtain weight parameters; construct a converter loss function by the weight parameters, the index data, the quantization vector group and the noise feature vector; optimize the initial index converter by the converter loss function to obtain a target index converter.
6. An image semantic transmission device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the image semantic transmission method according to any one of claims 1 to 4.
7. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the image semantic transmission method according to any one of claims 1 to 4 are implemented.
