Home

Awesome

LIC-TCM (TensorFlow 2)

<img src="https://colab.research.google.com/assets/colab-badge.svg" align="center">

This repository provides a TensorFlow implementation of LIC-TCM based on:

LIC_TCM net arch

LIC_TCM net arch

<p align="center"><em>Image source: https://arxiv.org/abs/2303.14978.pdf</em></p>

Updates

10/06/2023

  1. Initial release of this project

Acknowledgment

This project is based on:

Pretrained Models/ Performance

We trained LIC-TCM (large) on the whole ImageNet dataset (not a 300k images subset) using the same configuration described in Section 4.1.1.

We did not apply advanced data pre-processing techniques that are commonly used today - further tuning of hyperparameters and fine-tuning of the model to high-resolution image datasets might provide better results.

<p align="center"> <img src="./res/doc/figures/LIC_TCM_perf.png" alt="Image description" width="50%" /> </p>

We release a single pre-trained model (λ=0.0067) as proof of functional correctness: download.

Currently, we have only tested training/ inference using tf.config.experimental.enable_tensor_float_32_execution(False), see here for more information. To enable TensorFloat-32 on supported hardware, go to lsk2023.py, l. 51 and set tf.config.experimental.enable_tensor_float_32_execution(True).

Quality Assertions

We have taken great care to provide exact reimplementations of LIC-TCM (small, medium, large).

LIC-TCMModel params (official)Model params (reimpl)
large76.57 (75.89)76.56
medium59.13 (58.72)59.13
small45.18 (44.96)45.17

The model params (in millions) shown here are re-calculated using Deepspeed Profiler/ get_model_profile(), see here for more information. We generally find that there is a slight discrepancy to the officially reported numbers, which are denoted as (x) for the sake of completeness.

File Structure

 res
     ├── doc/                                       # addtional resources
     ├── eval/                                      # sample images + reconstructions
     ├── train_lsk2023/                             # model checkpoints + tf.summaries
     ├── lsk2023/                                   # saved model
 swin-transformers-tf/                              # extended swin-transformers-tf implementation 
     ├── changelog.txt                              # summary of changes made to the original work
     ├── ...   
 arch_ops.py                                        # partial translation of compressai.layers, tcm
 config.py                                          # model-dependent configurations
 lsk2023.py                                         # core of this repo

License

Apache License 2.0