GitHub - Orange-OpenSource/Cool-Chic: Low-complexity neural image & video codec. (original) (raw)

Forks Stargazers Issues BSD-3 License PyTorch

Cool-chic (pronounced /kul Κƒik/ as in French πŸ₯–πŸ§€πŸ·) is a low-complexity neural image codec based on overfitting.

🎲 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..

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} }

Cool-chic Logo