Example¶
Encoding an image into a .cool
bitstream¶
Encoding an image with CoolChic requires to specify
The input image path
-i
and output bitstream path-o
A working directory
--workdir
where logs are written.The encoder configuration
--enc_cfg
for the training options.The decoder configuration
--dec_cfg
for the neural networks architecture.
(venv) ~/Cool-Chic$ python coolchic/encode.py \
-i=image.png -o=./bitstream.cool --workdir=./dummy_workdir \
--enc_cfg=cfg/enc/fast.cfg --dec_cfg=cfg/dec/lop.cfg
More details on encoding images with Cool-chic is available in the encoder documentation.
Decoding a .cool
bitstream¶
Decoding an image with CoolChic requires to specify
The input bitstream path
-i
and the decoded image path-o
(venv) ~/Cool-Chic$ python coolchic/decode.py -i=bitstream.cool -o=decoded_image.ppm
Note that Cool-Chic outputs either PPM or YUV files.
More details on decoding images with Cool-chic is available in the decoder documentation.