Results 1 to 3 of 3

Thread: How linear combinations of pixels used in PAQ8px bmp models were chosen?

  1. #1
    Member
    Join Date
    Sep 2018
    Location
    Latvia
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How linear combinations of pixels used in PAQ8px bmp models were chosen?

    Is there any theory or experiments that justify choice of linear combinations of pixel neighborhood used in PAQ8px image models?

    Currently, I am trying to implement part of im8bit model of PAQ8px in hardware (FPGA) for grayscale image compression. I am curios to understand, how these combinations were selected. Is it worth to run any tests, to look for any better sets of these linear combinations or not? Maybe I can use less number of these combinations and achieve similar results, thus saving hardware resources of FPGA. There is a lot to think about.

  2. #2
    Member
    Join Date
    Jun 2014
    Location
    Ro
    Posts
    23
    Thanks
    4
    Thanked 6 Times in 5 Posts
    Hey, here is an explanation on the subject. Of course, Marcio Pais can also give you details if you want something very specific.
    https://www.mdpi.com/2076-3417/9/13/2681 In the PDF, the explanations start at around page 5.

    Depending on which image types you are trying to compress, you can give up on a lot of models. Do you have a benchmark or target you are trying to achieve?

  3. Thanks:

    Shelwien (1st August 2019)

  4. #3
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,422
    Thanks
    222
    Thanked 1,051 Times in 564 Posts
    > I am curios to understand, how these combinations were selected.

    Logistic mixing makes sure that adding any predictions with any new context
    won't significantly hurt the overall result (so any new context normally improves it).
    Then we can use common sense - any adjacent pixels or pixel combinations
    can be used as context, but contexts with higher entropy would gather
    statistics slower, so won't improve compression if same context is not repeated frequently.
    AFAIK, in paq8 case, developers just add simple contexts one by one based on common sense
    or imagination, then tweak weights manually to improve compression, or discard
    the ideas that didn't work.

    > Is it worth to run any tests, to look for any better sets of these linear combinations or not?

    Very much yes.
    You can just take the modelling framework from paq8 - counters, mixers, APM, basic models.
    Even that is not perfect, but its easier than starting from nothing.
    Also there're some explanations here: http://mattmahoney.net/dc/dce.html#Section_43

    And then you can automate the process described above -
    gather some relevant image samples, design a quality metric
    (for example, it can be a linear mix of compressed size, compression time and used memory),
    then add contexts with optimized pixel weights to improve the metric.

    Just with that, its very likely to beat results of any paq model eventually,
    mostly because paq developers consider automated parameter optimization
    to be "impure" or something.

    Although of course, for some specific image types (eg. book scans)
    it may be better to build specific transformations (eg. OCR)
    or submodels (eg. match model) before applying plain context mixing.

Similar Threads

  1. About PAQ8 Models Training
    By masigabriel in forum Data Compression
    Replies: 4
    Last Post: 10th October 2016, 21:49
  2. A new algorithm for compression using order-n models
    By Christoph Diegelmann in forum Data Compression
    Replies: 18
    Last Post: 4th May 2016, 00:25
  3. JPG,GIF,MP3 to BMP, WAV
    By necros in forum Data Compression
    Replies: 8
    Last Post: 20th March 2016, 20:49
  4. Faster bmp.cfg for zpaq
    By Karhunen in forum Data Compression
    Replies: 4
    Last Post: 17th August 2015, 03:37
  5. One lossy BMP format that failed by a lot!
    By toi007 in forum The Off-Topic Lounge
    Replies: 0
    Last Post: 29th June 2011, 01:53

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •