Deep Learning-Based Intra-Frame Lossless Compression Method for Video
By employing a deep learning-based intra-frame lossless compression method, which utilizes multi-scale anomaly response maps and high-order residual probability fields for adaptive compression, this method solves the problem of poor image restoration quality in embedded satellite communication systems using traditional methods, achieving efficient lossless compression and accurate restoration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QINGDAO WANDAO (BEIJING) INFORMATION TECH CO LTD
- Filing Date
- 2026-03-04
- Publication Date
- 2026-05-26
AI Technical Summary
Traditional lossless compression methods are ineffective in processing high-frequency textures, complex boundaries, and subtle details in embedded satellite communication systems, which affects image restoration quality and the accuracy of downstream analysis tasks.
A deep learning-based intra-frame lossless compression method is adopted. High-scoring regions are selected by multi-scale anomaly response maps and compression difficulty scoring matrices. A high-order residual probability field is generated by a weak prediction region modeling network and arithmetic coding is performed to generate the final compressed bitstream.
It significantly improves the compression ratio, ensures pixel-level restoration accuracy, and is suitable for edge computing platforms, remote sensing, security monitoring, and satellite communication scenarios.
Smart Images

Figure CN121771395B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image compression technology, and more specifically to a lossless intra-frame compression method for video based on deep learning. Background Technology
[0002] In recent years, with the increasing deployment density of remote sensing satellites, drone swarms, and multi-source image acquisition terminals in scenarios such as military reconnaissance, emergency rescue, and remote sensing mapping, the transmission frequency of video frame data between distributed terminals has grown exponentially. To ensure communication latency and data consistency between multi-source acquisition devices, intra-frame compression and decompression operations are typically required on edge computing platforms, and these operations must meet the requirements of lossless compression, low latency, and no inter-frame dependency.
[0003] Especially in embedded satellite communication systems, traditional lossless compression methods based on predictive residuals or transform coding often suffer from unstable compression ratios, decoding anomalies, or loss of detail when dealing with intra-frame features such as high-frequency textures, complex boundaries, and subtle details, due to limitations in hardware computing power, communication windows, and power consumption. This severely impacts image restoration quality and the accuracy of downstream analysis tasks (such as target recognition and matching correction). This problem is particularly pronounced in scenarios with multi-source heterogeneous data. Summary of the Invention
[0004] The purpose of this invention is to provide a lossless intra-frame compression method for video based on deep learning, in order to address the shortcomings of the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a deep learning-based intra-frame lossless compression method for video, comprising:
[0006] Acquire the video frame images to be compressed and construct the multi-scale anomaly response map M of the current frame;
[0007] The multi-scale anomaly response map M is subjected to regional dynamic difficulty scoring, and a compressed difficulty score matrix D for each image block within the frame is generated. Each element in D represents the prediction complexity and residual uncertainty of the corresponding image block.
[0008] Based on the compressed difficulty rating matrix D, high-rated regions are selected and input into the weak prediction region modeling network, and its high-order residual probability field R is output.
[0009] Based on the high-order residual probability field R, intra-frame lossless compression coding is performed on the original image to generate the final compressed bitstream C.
[0010] At the decoding end, the image is reconstructed based on the shared high-order residual probability field R and the compressed bitstream C, and the restored image I′ is output to make it consistent with the original image I pixel by pixel.
[0011] Preferably, constructing the multi-scale anomaly response map M of the current frame includes:
[0012] An image pyramid is constructed on the video frame images to be compressed to obtain sub-image sequences at multiple scales, so as to preserve the local texture and edge features of the original image at different resolutions;
[0013] The abnormal response features within each scale of the sub-images are extracted based on a fusion of channel attention and spatial attention.
[0014] The abnormal response features at all scales are fused and weighted to generate an anomaly candidate map at a unified scale.
[0015] Based on the suppressed anomaly candidate map, residual amplification and local contrast enhancement are used to output the final multi-scale anomaly response map M.
[0016] Preferably, the multi-scale anomaly response map M is subjected to regional dynamic difficulty scoring, and a compressed difficulty scoring matrix D for each image patch within the frame is generated, including:
[0017] The multi-scale anomaly response map M is divided into fixed-size image block units, and the division method adopts non-overlapping grid division, with the image block size set to 16×16 pixels.
[0018] Statistical calculations are performed on the abnormal response values within each image block to extract the mean, variance, and maximum value of the local response, and a 3D local anomaly description vector is constructed.
[0019] The description vector is input into a pre-trained compression difficulty scoring network, which outputs the compression difficulty score of the current image patch.
[0020] Based on the scoring results of all image patches, a compression difficulty scoring matrix D is constructed, which is consistent with the number of image patches.
[0021] Preferably, the description vector is input into a pre-trained compression difficulty scoring network, and the compression difficulty score of the current image patch is output, including:
[0022] The local anomaly response description vector extracted from each image patch is normalized so that the values of all dimensions are mapped to the range of 0 to 1.
[0023] The normalized description vector is input into a pre-trained compressed difficulty scoring network, which includes two fully connected hidden layers with ReLU activation functions and a sigmoid output layer.
[0024] The scoring network is trained using the cross-entropy loss function, and the label data comes from the amount of encoding bits required for each image block in the actual compression process.
[0025] The compression difficulty score of the current image patch is obtained through forward propagation.
[0026] Preferably, based on the compressed difficulty rating matrix D, high-rated regions are selected and input into the weak prediction region modeling network, outputting its high-order residual probability field R, including:
[0027] Threshold analysis was performed on all elements in the compression difficulty rating matrix D, and the regions corresponding to image patches with rating values greater than 0.75 were selected and marked as regions with high prediction uncertainty.
[0028] The region with high prediction uncertainty is located in the original video frame and the corresponding pixel region is extracted as a subset of the input image.
[0029] The extracted image subset is input into the weak prediction region modeling network, which consists of two convolutional residual structures and a dual-channel self-attention mechanism, and outputs pixel-level high-dimensional residual features.
[0030] Based on the residual features, a Gaussian mixture distribution fitting method is used to generate the high-order residual probability value corresponding to each pixel, and a high-order residual probability field R is constructed.
[0031] Preferably, the original image is subjected to intra-frame lossless compression coding based on a high-order residual probability field R to generate the final compressed bitstream C, including:
[0032] Align the original video frame image with the per-pixel residual distribution provided by the high-order residual probability field R to determine the residual probability density function parameters corresponding to each pixel position in the image;
[0033] Based on the true value of a pixel and its corresponding residual probability distribution, the negative log-likelihood of the residual value of each pixel is calculated as the encoding cost, and the minimum redundancy representation sequence of the entire frame image is constructed.
[0034] The sequence with minimized redundancy is input into a context-based arithmetic encoder, and the symbol coding interval is dynamically adjusted using the probability estimate of the residual per pixel.
[0035] Perform the arithmetic encoding process and output the final compressed bitstream C.
[0036] Preferably, the reconstruction based on the shared high-order residual probability field R and the compressed bitstream C, outputting the restored image I′, includes:
[0037] The compressed bitstream C is received and the high-order residual probability field R is consistent with that of the encoder. Arithmetic decoding operation is performed on C to dynamically restore the residual information sequence according to the residual probability distribution of each pixel.
[0038] For each pixel location, based on the Gaussian mixture distribution parameters of the corresponding location in R, its residual value is recovered and mapped to the corresponding pixel value;
[0039] The restored pixel values are rearranged according to the spatial order during encoding to construct a complete two-dimensional image matrix, forming the restored image I′.
[0040] Perform a pixel consistency check to ensure that all pixel values in I′ are completely consistent with the original image I before encoding.
[0041] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0042] 1. This invention provides a deep learning-based intra-frame lossless compression method for video. It combines multi-scale anomaly response modeling, a compression difficulty scoring mechanism, and high-order residual probability prediction to effectively identify structurally complex and texture-delicate weakly predictable regions in images. Targeted probabilistic modeling and arithmetic coding are then applied to these regions, significantly improving the compression ratio while ensuring pixel-level restoration accuracy. By constructing a high-order residual probability field and a context-dependent entropy coding process, this invention achieves higher information entropy approximation efficiency in complex image scenes, effectively alleviating the compression failure problem of traditional compression methods in edge detail regions.
[0043] 2. This invention introduces a region compression difficulty awareness mechanism, enabling compression resources to be adaptively allocated to high-complexity regions, thereby optimizing the utilization of compression resources. Simultaneously, the weak prediction region modeling network and residual probability distribution estimation algorithm proposed in this invention have good scalability and embedded adaptability, and can be deployed in edge computing platforms or low-power devices. They are widely applicable to image processing scenarios with high requirements for compression quality and real-time performance, such as remote sensing, security monitoring, and satellite communication. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0045] Figure 1 This is a flowchart of the deep learning-based intra-frame lossless compression method for video according to the present invention.
[0046] Figure 2 This is a flowchart of the compression difficulty score output method of the present invention. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] For examples, please refer to Figure 1 , 2 As shown in this embodiment, the deep learning-based intra-frame lossless compression method for video includes:
[0049] Obtain the video frame image to be compressed and construct the multi-scale anomaly response map M of the current frame.
[0050] To achieve high-precision intra-frame lossless compression of video frames, it is necessary to first perform feature structure analysis on the video frames to be compressed, and construct a multi-scale anomaly response map M that can characterize anomaly regions at different spatial scales. Specifically, this includes:
[0051] First, an image pyramid construction operation is performed on the video frame images to be compressed. Taking the original image as the first scale, it is sequentially downsampled by a factor of 2 to obtain image sequences at scales 2 to N, for a total of N scales. The downsampling operation uses bilinear interpolation with a Gaussian kernel to ensure that edge structures are not overly smoothed. Each scale image retains its original pixel values without quantization or normalization to avoid affecting subsequent texture determination.
[0052] The maximum scale N of the image pyramid is limited by the minimum side length L of the input image, which cannot be less than 32 pixels. Specifically, the value is: Round down to the nearest integer.
[0053] For each scale of image obtained above, anomaly response modeling is performed using a deep feature extraction network with a unified architecture. The network structure consists of channel attention units and spatial attention units connected in series. Specifically, the channel attention units use a channel fusion representation obtained through average pooling and max pooling, which is input to a two-layer fully connected network to generate channel weighted coefficients, thereby improving the response capability in significant texture dimensions.
[0054] The spatial attention unit constructs a two-dimensional attention matrix based on the spatial information of the feature map. This matrix generates a response enhancement mask for a specific region through convolution operations, thereby highlighting the locations of texture abrupt changes and areas with blurred boundaries.
[0055] Ultimately, each scale image is mapped to an anomaly response feature map with the same number of channels (e.g., 64 dimensions), and its tensor dimension is... ,in and Let be the height and width of the image at scale k.
[0056] To integrate the information redundancy and complementary characteristics across different scales, the anomalous response features of the aforementioned N scales are fused. First, the features at each scale are upsampled to the original image resolution, and channel dimension alignment is performed to ensure spatial consistency in the fusion calculation. Then, a weighted summation method is used for fusion, with the weights calculated based on the response variance at each scale. The specific formula is as follows: In the formula, This represents the pixel variance of the feature map of the anomaly response at the k-th scale. This represents the pixel variance of the anomaly response feature map at the i-th scale.
[0057] The fused feature map is processed by the ReLU activation function and then anomaly candidate response map is extracted through a 3×3 convolution layer. Each pixel value reflects the probability score that the location belongs to the anomaly region.
[0058] After obtaining anomaly candidate maps at a uniform scale, a non-maximum suppression method is introduced to remove duplicate responses and pseudo-anomaly regions. Specifically, for each anomaly candidate region, only the pixel position with the largest response value is retained within a 5×5 neighborhood, while the rest are suppressed to zero, thereby reducing regional overlap interference.
[0059] Finally, to further amplify the response in weak anomaly regions and enhance local contrast, residual amplification and local contrast enhancement operations are performed. Residual amplification uses an exponential transformation based on the difference between the original image and the candidate image to boost the response gradient. Local contrast enhancement is calculated based on the local maximum-minimum response ratio. The output is a multi-scale anomaly response map M, with the same dimensions as the original input image.
[0060] The multi-scale anomaly response map M is subjected to regional dynamic difficulty scoring, and a compressed difficulty score matrix D for each image block within the frame is generated. Each element in D represents the prediction complexity and residual uncertainty of the corresponding image block.
[0061] Statistical features extracted from the multi-scale anomaly response map M are used in conjunction with a deep learning scoring network to generate a compressed difficulty score matrix D, which guides the subsequent residual probability modeling process. Specifically, this includes:
[0062] The multi-scale anomaly response map M is divided into several fixed-size image block units. A non-overlapping grid partitioning method is used, with each image block size set to 16 pixels × 16 pixels. Assuming the input image resolution is H × W, the image is divided into (H ÷ 16) × (W ÷ 16) image blocks. Each image block is numbered according to its spatial position in the original image, and this number is used for row and column mapping in the subsequent scoring matrix.
[0063] For each image patch, the local response value within that region is extracted from the anomaly response map M, and statistical feature calculations are performed based on that region to obtain three-dimensional descriptive variables:
[0064] The mean local response μ represents the average response value of all pixels within that region;
[0065] The local response variance σ² represents the degree of dispersion of pixel response values;
[0066] The maximum local response value m represents the most significant anomalous response in that image patch.
[0067] The three statistics mentioned above are combined to construct a three-dimensional descriptive vector V=[μ,σ²,m], which serves as the representation of the abnormal features of each image patch.
[0068] To enhance the scoring network's generalization ability across different images, the description vector V is normalized. The min-max normalization method is used to scale each feature dimension to the range of 0 to 1. The normalization formula is as follows: ;in, This represents the i-th dimension of the description vector. and These represent the minimum and maximum values of this dimension in the training set, respectively. The normalized description vector is input into a pre-trained compressed difficulty scoring network. The scoring network is a feedforward neural network with the following structure:
[0069] Layer 1: From the input layer to the hidden layer, fully connected, with 32 neurons and ReLU activation function;
[0070] Layer 2: Hidden layer to hidden layer, fully connected, with 16 neurons and ReLU activation function;
[0071] Layer 3: From hidden layer to output layer, fully connected, with an output node of 1, and the activation function is Sigmoid, used to output normalized score values.
[0072] The score ranges from [0,1]. A higher score indicates that the image block may retain more residual information after compression, resulting in higher encoding costs.
[0073] The scoring network is trained using supervised learning, and the loss function chosen is the binary classification cross-entropy loss function, which takes the following form: Where y is the target label of the sample, and p is the predicted probability output by the model.
[0074] The training sample labels are derived from measurements of the number of bits required to encode each image block in numerous actual compression experiments. The number of bits encoded for each block is normalized and converted into a difficulty score label y. Blocks with a large number of bits have labels close to 1, indicating that they are difficult to compress; blocks with a small number of bits have labels close to 0, indicating that they are easy to compress.
[0075] A scoring operation is performed on all image patches in the image to obtain their compression difficulty scores. Based on the spatial arrangement of each image patch in the original image, all scores are sequentially filled into a two-dimensional matrix D, the size of which is the same as the number of image patch divisions. Each element D(i,j) in matrix D represents the predicted compression complexity and residual uncertainty of the image patch in the i-th row and j-th column of the original image. This matrix serves as the key input for the subsequent residual modeling network.
[0076] Based on the compressed difficulty rating matrix D, high-rated regions are selected and input into the weak prediction region modeling network, and its high-order residual probability field R is output.
[0077] After obtaining the compression difficulty score matrix D, regions with high compression complexity are selected, and their high-order residual feature distributions are learned through a deep neural network. Finally, a high-order residual probability field R for adaptive entropy encoding is constructed. Specifically, this includes:
[0078] First, a threshold analysis operation is performed on all scores in the compression difficulty rating matrix D, with a threshold of 0.75. For each position (i,j) in D, if its corresponding score D(i,j) > 0.75, the image patch corresponding to that position is marked as a region of high prediction uncertainty. This threshold is set based on compression performance statistics during the training phase, representing the top 25% of regions with the largest compression residual fluctuations in the current frame image. The set of image patches selected through this operation is defined as B, which is the set of location indices for all high-scoring patches.
[0079] For each image patch index (i,j) in set B, locate its corresponding spatial region in the original video frame image I. Each image patch is 16×16 pixels in size, so the original pixel range corresponding to patch (i,j) is: x∈[16i,16(i+1)),y∈[16j,16(j+1)). Extract and stitch together the pixel regions corresponding to all high-scoring image patches to form an image subset Isub, which serves as the input image set for subsequent residual feature modeling.
[0080] A subset of images, Isub, is input into a weak prediction region modeling network. This network is specifically designed to model high-order residual features of unpredictable regions, and its structure includes:
[0081] Convolutional Residual Unit: Two consecutive 2D convolutional layers, each with a kernel size of 3×3 and 64 and 64 channels respectively, using ReLU activation function. This structure is used to extract local contextual residual features and preserves edge information from the original input through a residual connection mechanism.
[0082] Dual-channel self-attention mechanism: Channel attention and spatial attention are fused together. Channel attention obtains channel weighting coefficients through global average pooling and fully connected mapping, while spatial attention extracts spatial response masks through a single 7×7 convolution. After fusion, the input feature map is reweighted to enhance high-response regions.
[0083] The overall network output is a residual feature tensor with dimensions H′×W′×C, where H′ and W′ represent the size of the input image subset, and C is the number of output channels, which is set to 32.
[0084] Using the residual feature tensor from the above output as input, a Gaussian mixture modeling method is employed to fit the residual probability distribution of each pixel. The specific method is as follows:
[0085] For each pixel location (x, y), the residual modeling is expressed as a mixture probability density function of K Gaussian components: Where: r represents the actual residual value of the pixel; This represents the weight of the k-th Gaussian component at pixel (x, y); and Here, represents the mean and variance of the k-th component, respectively; K is the number of Gaussian components, set to 3. The network is trained using maximum likelihood estimation, and the generating function of the above parameters is learned by fitting the residual distribution of the training data. Finally, the set of mixture Gaussian distribution parameters corresponding to all pixel positions constitutes the higher-order residual probability field R.
[0086] Based on the high-order residual probability field R, intra-frame lossless compression coding is performed on the original image to generate the final compressed bitstream C.
[0087] To achieve intra-frame lossless compression coding of the original video frame images, a residual probability modeling and context-adaptive arithmetic coding method is employed to generate a compressed bitstream with minimal redundancy. Specifically, this includes:
[0088] The original video frame image I is pixel-level aligned with the per-pixel residual probability model provided by the higher-order residual probability field R. Each pixel position (x, y) in the higher-order residual probability field R corresponds to a set of Gaussian mixture distribution parameters, including:
[0089] Mixed weight vector The sum of the weights of all components is 1.
[0090] Mean of each component ;
[0091] Variance of each component .
[0092] The residual value is defined as the difference between the original pixel value and the predicted pixel value. However, since this method uses intra-frame compression, the predicted value is always zero, so the residual is the original pixel value. This structure ensures that each pixel value has a well-defined probability density function.
[0093] For each pixel location (x, y) in the original image, obtain its true pixel value I(x, y), and substitute it into the corresponding residual mixture Gaussian probability density function to calculate the probability of that value occurring: ;in, Let r = I(x,y) represent the standard Gaussian probability density function. Then, taking the negative logarithm of this probability value yields the encoding cost: The encoded values L(x,y) of all pixel positions are constructed into a one-dimensional sequence S={L1,L2,…,LM} according to the image scanning order, where M is the total number of pixels in the image. This sequence represents the information redundancy that needs to be minimized during the encoding process.
[0094] The sequence S is input into an arithmetic encoder based on context modeling. The context modeling method uses a sliding window structure, taking the true values of the three neighboring pixels to the left, top, and top left of each pixel as the context state, and fine-tunes the probability of the current pixel residual to enhance local spatial consistency modeling.
[0095] Specifically, for the current encoded pixel, its probability distribution parameters are jointly input into a lightweight neural network by the original values provided by the higher-order residual probability field R and the context state for re-estimation, generating a dynamic probability prediction value Padj(x,y). The arithmetic encoder adjusts the symbol encoding interval boundary of the current pixel in real time according to this dynamic probability, forming a precise interval division within the continuous compressed domain, ensuring that it approaches the optimal information entropy limit.
[0096] Finally, the standard arithmetic coding process is performed, encoding all pixels sequentially, mapping consecutive coding intervals to a binary bitstream, and generating the final compressed bitstream C. This bitstream satisfies the following characteristics:
[0097] Information entropy is close to the theoretical lower bound;
[0098] Retain all original image pixel information;
[0099] At the decoding end, the same high-order residual probability field R can be used to losslessly reconstruct the image I′ pixel by pixel with the arithmetic decoder, ensuring that I′=I.
[0100] At the decoding end, the image is reconstructed based on the shared high-order residual probability field R and the compressed bitstream C, and the restored image I′ is output to make it consistent with the original image I pixel by pixel.
[0101] At the decoding end, the compressed bitstream C and the higher-order residual probability field R transmitted from the encoding end are received first. The higher-order residual probability field R is generated at the encoding end and maintains complete structural and numerical consistency at the decoding end. Each pixel position in R contains parameters of its residual probability model, including:
[0102] The number of components K in the Gaussian mixture distribution is set to 3;
[0103] Mixed weights for each component mean With variance .
[0104] Based on these parameters, the residual probability density function for each pixel location is constructed.
[0105] Subsequently, an arithmetic decoding operation is performed on the compressed bitstream C, dynamically recovering the original residual value sequence using the probability model of each pixel. The arithmetic decoder parses the binary interval values in the bitstream and combines them with the probability density estimate of the current pixel to gradually map out the symbol corresponding to each pixel, i.e., the residual value.
[0106] This process is performed pixel-by-pixel to ensure consistency with the sequence order during encoding.
[0107] After parsing the residual value of each pixel, the decoder uses this residual and the known prediction reference value to calculate the true value of the corresponding pixel. Since this method is intra-frame compression, the prediction reference value is always zero, so the reconstructed value of each pixel is equal to its residual value itself.
[0108] That is, for each pixel position (x,y), calculate: I′(x,y)=r(x,y); where r(x,y) is the residual value obtained after arithmetic decoding, and I′(x,y) is the pixel value in the reconstructed image.
[0109] All the pixel values obtained from the above decoding are arranged according to the scanning order during the encoding of the original image (e.g., from left to right, from top to bottom) and filled into a two-dimensional matrix. The size of this matrix is the same as that of the original image, denoted as H×W, where H is the image height and W is the image width.
[0110] The final reconstructed two-dimensional image matrix is the restored image I′, where each element I′(x,y) is the decoded and restored pixel value.
[0111] To ensure lossless compression, pixel-level consistency checks are performed between the reconstructed image I′ and the original image I before encoding. The check is performed pixel-by-pixel; if any pixel position (x,y) satisfies I′(x,y)≠I(x,y), the reconstruction is considered to have failed.
[0112] In this method, since the residual probability field R and the arithmetic coding process are both deterministic processes and no quantization or approximation operations are introduced, the decoded image I′ is guaranteed to be pixel-by-pixel identical to the original image I, satisfying the definition of lossless compression.
[0113] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A deep learning based lossless compression method for video frames, characterized in that: include: Acquire the video frame images to be compressed and construct the multi-scale anomaly response map M of the current frame; The multi-scale anomaly response map M is subjected to regional dynamic difficulty scoring, and a compressed difficulty score matrix D for each image patch within the frame is generated. Each element in D represents the prediction complexity and residual uncertainty of the corresponding image patch, specifically including: The multi-scale anomaly response map M is divided into fixed-size image patch units using a non-overlapping grid partitioning method, with each image patch size set to 16×16 pixels. Statistical calculations are performed on the anomaly response values within each image patch to extract the mean, variance, and maximum value of the local response, constructing a 3D local anomaly description vector. The description vector is input into a pre-trained compression difficulty scoring network, which outputs the compression difficulty score value of the current image patch. Based on the scoring results of all image patches, a compression difficulty scoring matrix D is constructed according to the spatial arrangement order of each image patch in the original image. Each element in the compression difficulty scoring matrix D corresponds to the compression difficulty score value of an image patch, and the number of matrix elements is the same as the number of image patches. The process involves inputting the description vector into a pre-trained compression difficulty scoring network and outputting the compression difficulty score of the current image patch. This includes: normalizing the local anomaly response description vector extracted from each image patch, mapping all dimensions to the range of 0 to 1; inputting the normalized description vector into the pre-trained compression difficulty scoring network, which includes two fully connected hidden layers with ReLU activation functions and a sigmoid output layer; training the scoring network using a cross-entropy loss function, with label data derived from the amount of encoded bits required for each image patch during real compression; and obtaining the compression difficulty score of the current image patch through forward propagation. Based on the compressed difficulty rating matrix D, high-rated regions are selected and input into the weak prediction region modeling network, and its high-order residual probability field R is output. Based on the high-order residual probability field R, intra-frame lossless compression coding is performed on the video frame image to be compressed to generate the final compressed bitstream C. At the decoding end, the compressed bitstream C is reconstructed based on the shared high-order residual probability field R, and the restored image I′ is output to make it consistent with the image of the video frame to be compressed pixel by pixel.
2. The deep learning based intra-frame lossless compression method of claim 1, wherein: The construction of the multi-scale anomaly response map M of the current frame includes: An image pyramid is constructed on the video frame images to be compressed to obtain sub-image sequences at multiple scales, so as to preserve the local texture and edge features of the video frame images to be compressed at different resolutions; The abnormal response features within each scale of the sub-images are extracted based on a fusion of channel attention and spatial attention. The abnormal response features at all scales are fused and weighted to generate an anomaly candidate map at a unified scale. Based on the suppressed anomaly candidate map, residual amplification and local contrast enhancement are used to output the final multi-scale anomaly response map M.
3. The deep learning based intra-frame lossless compression method of claim 1, wherein: Based on the compressed difficulty rating matrix D, high-rated regions are selected and input into the weak prediction region modeling network, outputting its high-order residual probability field R, including: Threshold analysis was performed on all elements in the compression difficulty rating matrix D, and the regions corresponding to image blocks with rating values greater than 0.75 were selected and marked as high-rated regions. The high-scoring regions are located in the original video frames and their corresponding pixel regions are extracted and used as a subset of the input image. The extracted image subset is input into the weak prediction region modeling network, which consists of two convolutional residual structures and a dual-channel self-attention mechanism, and outputs pixel-level high-dimensional residual features. Based on the residual features, a Gaussian mixture distribution fitting method is used to generate the high-order residual probability value corresponding to each pixel, and a high-order residual probability field R is constructed.
4. The deep learning based intra-frame lossless compression method of claim 3, wherein: Based on the high-order residual probability field R, intra-frame lossless compression encoding is performed on the video frame images to be compressed, generating the final compressed bitstream C, including: Align the original video frame image with the per-pixel residual probability distribution provided by the high-order residual probability field R to determine the residual probability density function parameters corresponding to each pixel position in the image; Based on the true value of a pixel and its corresponding residual probability distribution, the negative log-likelihood of the residual value of each pixel is calculated as the encoding cost, and the minimum redundancy representation sequence of the entire frame image is constructed. The minimum redundancy representation sequence is input into a context-based arithmetic encoder, and the symbol encoding interval is dynamically adjusted using the probability estimate of the residual per pixel. Perform the arithmetic encoding process and output the final compressed bitstream C.
5. The deep learning based intra-frame lossless compression method of claim 4, wherein: The reconstruction is based on the shared high-order residual probability field R and the compressed bitstream C, outputting the restored image I′, including: The compressed bitstream C and the high-order residual probability field R consistent with the encoder are received, and an arithmetic decoding operation is performed on C to dynamically restore the residual information sequence according to the residual probability distribution of each pixel. For each pixel location, based on the Gaussian mixture distribution parameters of the corresponding location in R, its residual value is recovered and mapped to the corresponding pixel value; The restored pixel values are rearranged according to the spatial order during encoding to construct a complete two-dimensional image matrix, forming the restored image I′. Perform a pixel consistency check to ensure that all pixel values in I′ are completely consistent with the video frame image to be compressed before encoding.