GitHub - Orange-OpenSource/Cool-Chic: Low-complexity neural image & video codec. (original) (raw)
Cool-chic (pronounced /kul Κik/ as in French π₯π§π·) is a low-complexity neural image codec based on overfitting.
- π Coding performance: Cool-chic offers visual quality similar to H.266/VVC with 30% less rate
- πͺΆ Lightweight decoder: Cool-chic decoder performs only 1000 multiplications per decoded pixel
- π Fast CPU-only decoder: Decode a 1280x720 image in 100 ms on CPU with our decoder written in C
π² Cool-chic 4.2.0: Common Randomness & Wasserstein Distance! π²
Cool-chic 4.2 focuses on perceptually-oriented image coding. This release draws heavily on the following paper: Good, Cheap, and Fast: Overfitted Image Compression with Wasserstein Distortion, BallΓ© et al..
- Wasserstein Distance as a distortion metric: use
--tune=wasserstein - Decoder-side common randomness for additional details in the decoded image
- Improved image coding performance: around -50% rate versus Cool-chic 4.1 for the same visual quality
- Low decoding complexity 1728 MAC / pixel
A pair of bitstreams in samples/bitstreams/ illustrates the benefits of the--tune=wasserstein options. See the decoding exampleto decode them and see the pictures.
Check-out the release history to see previous versions of Cool-chic.
Setup
See the Cool-chic setup documentation for additional details
We need to get these packages to compile the C API and bind it to python.
sudo add-apt-repository -y ppa:deadsnakes/ppa && sudo apt update sudo apt install -y build-essential python3.10-dev pip g++ git clone https://github.com/Orange-OpenSource/Cool-Chic.git && cd Cool-Chic
Install create and activate virtual env
python3.10 -m pip install virtualenv python3.10 -m virtualenv venv && source venv/bin/activate
Install Cool-chic
pip install -e .
Sanity check
python -m test.sanity_check
Encoding
See the example page for more encoding examples. A comprehensive description of the encoder parameters are available for image and video compression.
Encode an image using the default (fast) configuration
python coolchic/encode.py -i image.png -o ./bitstream.cool
Video requires to successively encode multiples frames.
python samples/encode.py -i myTestVideo_1920x1080_24p_yuv420_8b.yuv -o bitstream.cool
Decoding
Call the C decoder through a python wrapper to decode Cool-chic bitstreams.
Decoder outputs either PPM (image) or YUV (video) files
python coolchic/decode.py -i samples/bitstreams/a365_wd.cool -o a365_wd.ppm
Citation
If you use this project, please cite the original Cool-chic paper in your work.
@InProceedings{Ladune_2023_ICCV, author = {Ladune, Th'eo and Philippe, Pierrick and Henry, F'elix and Clare, Gordon and Leguay, Thomas}, title = {COOL-CHIC: Coordinate-based Low Complexity Hierarchical Image Codec}, booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)}, month = {October}, year = {2023}, pages = {13515-13522} }