Skip to content

[CVPR 2024 Highlight] - Stationary Representations: Optimally Approximating Compatibility and Implications for Improved Model Replacements (notable top 2.8%)

License

Notifications You must be signed in to change notification settings

miccunifi/iamcl2r

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo contains the source code of the Python package iamcl2r and it is the official implementation of:
Stationary Representations: Optimally Approximating Compatibility and Implications for Improved Model Replacements, Niccolò Biondi, Federico Pernici, Simone Ricci, Alberto Del Bimbo at CVPR2024.
Our paper has been selected as Poster Highlight (notable top 2.8%).
Arxiv link: https://arxiv.org/abs/2405.02581

The repo also contains several examples on Google Colab and IPython Notebook.
See NOTEBOOKS.md for more details. We only support PyTorch for now.

See our paper for a detailed description of $d$-Simplex-HOC and the Improved Asynchronous Model Compatible Lifelong Learning Representation ($\text{IAM-CL}^2\text{R}$) scenario.

Repository Overview

There are several directories in this repo:

Quickstart

  1. Installation
    Installing iamcl2r is simply

    git clone https://github.com/miccunifi/iamcl2r
    cd iamcl2r
    make install

    This creates a virtual enviroment and installs all the required dependencies.

    Create the .env file (Optional but suggested)

    Create an .env file to automatically export your env vars before launching training. An example of an .env file is

    WANDB_USERNAME=<your wandb username>
    WANDB_API_KEY=<your wandb private api key> 
    WANDB_ENTITY=<wandb entity>
    WANDB_PROJECT=<wandb project name>

    The .env file is not released for security reasons.


  1. Download the pretrained models
    These models are used to replace the fine-tuned model in a $\text{IAM-CL}^2\text{R}$ training.
    make download-pretrained-models

  1. Run $\text{IAM-CL}^2\text{R}$ training
    We only support $d$-Simplex-HOC and ER baseline for now.

    # d-Simplex-HOC training
    make run CONFIG=configs/hoc_7tasks.yaml
    make run CONFIG=configs/hoc_31tasks.yaml
    
    # ER baseline training
    make run CONFIG=configs/er_7tasks.yaml
    make run CONFIG=configs/er_31tasks.yaml
  2. Run a compatibility evaluation
    Customize the configuration file eval.yaml by changing the checkpoint_path line

    ...
    checkpoint_path: <FOLDER_PATH>
    ...

    After that, you can evaluate the compatibility of the models which checkpoints are in the <FOLDER_PATH> you have specified above.

    make run CONFIG=configs/eval.yaml

(back to top)

Released results

We have released some experimental results obtained using the code in the repo. See NOTEBOOKS.md for more details.

(back to top)

Citation

If you use this code in your research, please kindly cite the following paper:

@inproceedings{biondi2024stationary,
  title={Stationary Representations: Optimally Approximating Compatibility and Implications for Improved Model Replacements},
  author={Biondi, Niccolò and Pernici, Federico and Ricci, Simone and Del Bimbo, Alberto},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2024},
}

(back to top)

Contact

For help, new features, or reporting bugs associated with this repo, please open a GitHub issue or contact us if you have any questions.

  • Niccolò Biondi <niccolo.biondi (at) unifi.it>Twitter URL Google Scholar Citations
  • Federico Pernici <federico.pernici (at) unifi.it> Twitter URL Google Scholar Citations
  • Simone Ricci <simone.ricci (at) unifi.it>Google Scholar Citations
  • Alberto Del Bimbo <alberto.delbimbo (at) unifi.it>Google Scholar Citations

(back to top)

About

[CVPR 2024 Highlight] - Stationary Representations: Optimally Approximating Compatibility and Implications for Improved Model Replacements (notable top 2.8%)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published