{'fraction_non_alphanumeric': 0.018628912071535022, 'fraction_numerical': 0.0037257824143070045, 'mean_word_length': 5.132420091324201, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Piecewise 2D autoregression for predictive image coding

We propose an on-line piecewise two-dimensional autoregression algorithm (P2AR) for modeling and coding of images. The algorithm assumes no stationarity of the source. The resulting P2AR predictor can be loosely considered as a universal parametric image model in the sense that no prior knowledge about the image are assumed. The predictor parameters are causal and dynamically adapted to the source, hence suits one-pass image coding with no side information. The good fit of the model to a variety of images is demonstrated by its superior performance when being used in lossless image coding. We reduced the bit rate of the benchmark lossless image codec CALIC by three percent averaging over the JPEG set of test images, simply by replacing the context-sensitive, non-linear GAP predictor of CALIC with the P2AR predictor. The performance margin gets much larger when the source is highly nonstationary. In order to make on-line 2D autoregression computationally feasible, we developed a novel and efficient algorithm for computing and updating covariances of regression variables on a pixel-by-pixel basis. This algorithm can also be applied in image segmentation, texture classification, and other image analysis tasks that require heavy computations of second order statistics.