This project reproduced the base model of the paper "Context-adaptive Entropy Model for End-to-end Optimized Image Compression".
This project can only run on Linux and Mac OS, not on Windows, because the tensorflow compression package cannot be installed in the Windows environment.
Python > 3.6
Run the below command to install the tensorflow package
pip install tensorflow==1.15
Run the below command to install the tensorflow-compression package
pip install tensorflow_compression
python model.py --verbose train --train_glob="pictures/*.jpg"
If you want to compress or decompress an image, the simplest way is to run test.py
Or
python model.py --checkpoint_dir train compress pictures/image4.jpg compressed.tfci
python model.py decompress compressed.tfci reconstruction.png