Home

Awesome

<p align="center"> <img src="ICELUT/ICELUT_logo.png" height=110> </p>

Taming Lookup Tables for Efficient Image Retouching (ECCV2024)

Paper

:star: If ICELUT is helpful to your images or projects, please help star this repo. Thanks! :hugs:

TODO

Requirements and Dependencies

How to run the codes

1. Install the tilinear interpolation package

1.1 For GPU User

    $ls /usr/local/
    $cd trilinear_cpp
    $vim setup.sh
    export CUDA_HOME=/usr/local/your_cuda_version && python setup.py install
    $sh setup.sh

1.2 For CPU User

    $cd trilinear_cpp
    $python setup.py

ATTENTION: If you follow the CPU install instruction with the GPU in your device, the default programme will still install the GPU version. If you want to only install the CPU version, please follow this step:

    $vim setup.py
    # line 5
    if torch.cuda.is_available():

    # substitute line 5 with :
    # if False

2. Inference the demo images

    $python inference_demo.py

3. Training

Prepare the datasets

Please refer to 3D LUT to prepare the FiveK datasets.

Training model

    $python train_ICELUT.py

4. Transfer to LUTs

    $python transfer2LUT.py

5. Optional: Check the retouched results

The retouched images generated by running inference_demo.py will be saved in the default dir: ./test_image_output

6. Optional: Check the total LUT size

cd ./ICELUT
du -sh *.npy
% output
52K     Basis_lut.npy
204K    classifier_int8.npy
164K    Model_lsb_fp32.npy
164K    Model_msb_fp32.npy

Note that we use 10 Basis in codes rather than 20 in the paper. So the storage could be smaller (588KB v.s. 780KB).

Acknowledgement

This project is based on CLUT. Thanks for these awesome codes!