{"id":19401108,"url":"https://github.com/google-research/compressive-visual-representations","last_synced_at":"2025-04-24T07:30:33.994Z","repository":{"id":45139108,"uuid":"418626490","full_name":"google-research/compressive-visual-representations","owner":"google-research","description":"Tensorflow 2 implementations of the C-SimCLR and C-BYOL self-supervised visual representation methods from \"Compressive Visual Representations\" (NeurIPS 2021)","archived":false,"fork":false,"pushed_at":"2022-01-18T10:16:37.000Z","size":54,"stargazers_count":37,"open_issues_count":0,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-03T01:01:51.777Z","etag":null,"topics":["deep-learning","machine-learning","self-supervised-learning","tensorflow","visual-representation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google-research.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-18T18:42:27.000Z","updated_at":"2025-01-15T02:54:30.000Z","dependencies_parsed_at":"2022-09-11T19:20:26.634Z","dependency_job_id":null,"html_url":"https://github.com/google-research/compressive-visual-representations","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-research%2Fcompressive-visual-representations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-research%2Fcompressive-visual-representations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-research%2Fcompressive-visual-representations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google-research%2Fcompressive-visual-representations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google-research","download_url":"https://codeload.github.com/google-research/compressive-visual-representations/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250582779,"owners_count":21453912,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","machine-learning","self-supervised-learning","tensorflow","visual-representation"],"created_at":"2024-11-10T11:17:13.664Z","updated_at":"2025-04-24T07:30:33.687Z","avatar_url":"https://github.com/google-research.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compressive Visual Representations\n\nThis repository contains the source code for our paper,\n[Compressive Visual Representations](https://arxiv.org/abs/2109.12909).\nWe developed information-compressed versions of the SimCLR and BYOL\nself-supervised learning algorithms, which we call C-SimCLR and C-BYOL, using\nthe Conditional Entropy Bottleneck, and achieved significant improvements in\naccuracy and robustness, yielding linear evaluation performance competitive with\nfully supervised models.\n\n![cvr_perf](https://user-images.githubusercontent.com/4847452/144777161-d8d5ec7a-dc4e-4f45-a9c2-f57c2661d8eb.png)\n\nWe include implementations of the C-SimCLR and C-BYOL algorithms developed in\nour paper, as well as SimCLR and BYOL baselines.\n\n## Getting Started\n\nInstall the necessary dependencies with `pip install -r requirements.txt`.\nWe recommend creating a new virtual environment.\n\nTo train a model with C-SimCLR on ImageNet run\n`bash scripts/csimclr.sh`. And to train a model with C-BYOL, run\n`bash scripts/cbyol.sh`.\n\nRefer to the scripts for further configuration options, and also to train the\ncorresponding SimCLR and BYOL baselines.\n\nThese command lines use the hyperparameters used to train the models in our\npaper. In particular, we used a batch size of 4096 using 32 Cloud TPUs.\nUsing different accelerators will require changing the batch size.\nTo get started with Google Cloud TPUs, we recommend following this\n[tutorial](https://cloud.google.com/tpu/docs/tutorials/mnist).\n\n## Checkpoints\n\nThe following table contains pretrained checkpoints for C-SimCLR, C-BYOL and\nalso their respective baselines, SimCLR and BYOL. All models are trained on\nImageNet. The Top-1 accuracy is obtained by training a linear classifier on top\nof a ``frozen'' backbone, following standard self-supervised learning evaluation\nprotocol.\n\n| Algorithm | Backbone     | Training epochs | ImageNet Top-1 | Checkpoint |\n|-----------|:------------:|:---------------:|:--------------:|:-----:|\n| SimCLR    | ResNet 50    | 1000            | 70.8           | [link](https://storage.googleapis.com/rl-infra-public/compressive-visual-representations/checkpoints_linear_eval/simclr/resnet50/checkpoint.tar.gz)      |\n| SimCLR    | ResNet 50 2x | 1000            | 74.6           | [link](https://storage.googleapis.com/rl-infra-public/compressive-visual-representations/checkpoints_linear_eval/simclr/resnet50-2x/checkpoint.tar.gz)      |\n| C-SimCLR  | ResNet 50    | 1000            | 71.7           | [link](https://storage.googleapis.com/rl-infra-public/compressive-visual-representations/checkpoints_linear_eval/simclr/resnet50/checkpoint.tar.gz)      |\n| C-SimCLR  | ResNet 50 2x | 1000            | 75.0           | [link](https://storage.googleapis.com/rl-infra-public/compressive-visual-representations/checkpoints_linear_eval/simclr/resnet50-2x/checkpoint.tar.gz)      |\n| BYOL      | ResNet 50    | 1000            | 74.3           | [link](https://storage.googleapis.com/rl-infra-public/compressive-visual-representations/checkpoints_linear_eval/byol/resnet50/checkpoint.tar.gz)      |\n| BYOL      | ResNet 50 2x | 1000            | 77.2           | [link](https://storage.googleapis.com/rl-infra-public/compressive-visual-representations/checkpoints_linear_eval/byol/resnet50-2x/checkpoint.tar.gz)      |\n| C-BYOL    | ResNet 50    | 1000            | 75.8           | [link](https://storage.googleapis.com/rl-infra-public/compressive-visual-representations/checkpoints/cbyol/resnet50/1000_epochs/checkpoint.tar.gz)      |\n| C-BYOL    | ResNet 50 2x | 1000            | 78.9           | [link](https://storage.googleapis.com/rl-infra-public/compressive-visual-representations/checkpoints_linear_eval/cbyol/resnet50-2x/checkpoint.tar.gz)      |\n| C-BYOL    | ResNet 101   | 1000            | 77.8           | [link](https://storage.googleapis.com/rl-infra-public/compressive-visual-representations/checkpoints_linear_eval/cbyol/resnet101/checkpoint.tar.gz)      |\n| C-BYOL    | ResNet 152   | 1000            | 78.7           | [link](https://storage.googleapis.com/rl-infra-public/compressive-visual-representations/checkpoints_linear_eval/cbyol/resnet152/checkpoint.tar.gz)      |\n| C-BYOL    | ResNet 50    | 1500            | 76.0           | [link](https://storage.googleapis.com/rl-infra-public/compressive-visual-representations/checkpoints_linear_eval/cbyol/resnet50/1500_epochs/checkpoint.tar.gz)      |\n\n## Reference\n\nIf you use C-SimCLR or C-BYOL, please use the following BibTeX entry.\n```\n@InProceedings{lee2021compressive,\n  title={Compressive Visual Representations},\n  author={Lee, Kuang-Huei and Arnab, Anurag and Guadarrama, Sergio and Canny, John and Fischer, Ian},\n  booktitle={NeurIPS},\n  year={2021}\n}\n```\n\n## Credits\n\nThis repository is based on [SimCLR](https://github.com/google-research/simclr).\nWe also match our BYOL implementation in Tensorflow 2 to the original\nimplementation of\n[BYOL](https://github.com/deepmind/deepmind-research/tree/master/byol) in JAX.\n\n\n*Disclaimer: This is not an official Google product.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle-research%2Fcompressive-visual-representations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle-research%2Fcompressive-visual-representations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle-research%2Fcompressive-visual-representations/lists"}