Encoder configuration¶

As with conventional codecs, there is a trade-off between Cool-chic encoding time and compression performance. The encoding settings of Cool-chic are set in a configuration file. Examples of such configuration files are located in cfg/enc/. They include the following parameters:

Parameters relative to the encoder configuration¶

Parameter

Role

Example value

recipe

Training preset

c3x

start_lr

Initial learning rate

1e-2

n_itr

Number of training iterations

1e4`

n_train_loops

Number of independent encodings

1`

Tip

Each parameter listed in the configuration file can be overridden through a command line argument:

(venv) ~/Cool-Chic python coolchic/encode.py \
  --enc_cfg=example.cfg   # example.cfg has start_lr=1e-2
  --start_lr=1e-3         # This override the value present in example.cfg

Some existing configuration files¶

Some configuration files are proposed in cfg/enc/:

Existing encoder configuration files.¶

Name

Description

fast.cfg

Reasonable compression performance & fast training

medium.cfg

Balance compression performance & training duration

slow.cfg

Best performance at the cost of a longer training

Recipes¶

Cool-chic encoding works with tweakable recipes i.e. different training parameters. Currently available recipes are:

All recipes feature a decreasing learning rate starting from start_lr.

The number of iterations in the first (and longest) phase of the c3x recipe is set using n_itr.

In order to circumvent some training irregularities, it is possible to perform several independent encoding, keeping only the best one. We call that a training loop. The number of training loops is set by n_train_loops.