{"id":28276349,"url":"https://github.com/fl0wbar/eic-balle2017","last_synced_at":"2026-04-26T22:31:13.760Z","repository":{"id":240446151,"uuid":"521323689","full_name":"fl0wbar/EIC-Balle2017","owner":"fl0wbar","description":"Experiments of applying \"End-to-end optimized image compression\" Balle, 2017 on CLIC-2019 dataset","archived":false,"fork":false,"pushed_at":"2022-08-04T15:44:55.000Z","size":44054,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T16:42:56.497Z","etag":null,"topics":["compress-images","compression","deep-learning","hobby-project","image-compression","tensorflow","tensorflow-compression"],"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/fl0wbar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-04T15:42:09.000Z","updated_at":"2024-05-28T12:43:21.000Z","dependencies_parsed_at":"2024-05-18T23:38:50.643Z","dependency_job_id":null,"html_url":"https://github.com/fl0wbar/EIC-Balle2017","commit_stats":null,"previous_names":["fl0wbar/eic-balle2017"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fl0wbar/EIC-Balle2017","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fl0wbar%2FEIC-Balle2017","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fl0wbar%2FEIC-Balle2017/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fl0wbar%2FEIC-Balle2017/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fl0wbar%2FEIC-Balle2017/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fl0wbar","download_url":"https://codeload.github.com/fl0wbar/EIC-Balle2017/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fl0wbar%2FEIC-Balle2017/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32315711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T21:09:39.134Z","status":"ssl_error","status_checked_at":"2026-04-26T21:09:21.240Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["compress-images","compression","deep-learning","hobby-project","image-compression","tensorflow","tensorflow-compression"],"created_at":"2025-05-21T05:10:28.552Z","updated_at":"2026-04-26T22:31:13.754Z","avatar_url":"https://github.com/fl0wbar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EIC(Balle 2017)\n\n#### Experiments done in January 2019\n\nThe repo is a re-implementation of the model published\nin:\n\n\u003e \"End-to-end optimized image compression\"\u003cbr /\u003e\n\u003e J. Ballé, V. Laparra, E. P. Simoncelli\u003cbr /\u003e\n\u003e https://arxiv.org/abs/1611.01704\n\n#### Code for reproducing the results are modified from Tensorflow Compression (tensorflow 1.13 compatible commit)\n\n##### This directory contains Tensorflow Compression code modified to use range coding ops in the tensorflow.contrib.coder.python.ops in tensorflow 1.13\n\n##### Do not use with original Tensorflow Compression as it has fast custom kernels for range coding.\n\n##### This was done to avoid compilation issues.\n\n##### Please refer to README from Tensorflow \u003e 2.0 compatible Tensorflow Compression (https://github.com/tensorflow/compression) repo for better code for reproducing these results.\n\n##### This repo is a public backup of a hobby project.\n\n### CLIC Dataset\n\n#### For script options\n```bash\n$ python eeicballe17.py -h\n```\n\n#### Training\n```bash\n$ python eeicballe17.py -v --train_glob=\"./datasets/CLIC/professional/train/*.png\" --checkpoint_dir=./models/balle17CLIC train\n```\n\n#### Compressing and Decompressing single image using trained model\n- Compress using model trained on CLIC 2019\n```bash\n$ python eeicballe17.py --verbose --checkpoint_dir=./models/balle17CLIC compress ./tests/groundtruth/kodak/kodim01.png ./tests/reconCLIC/epoch30684/kodim01.tfic\n```\n- Compress using model trained on BSDS500\n```bash\n$ python eeicballe17.py --verbose --checkpoint_dir=./models/balle17BSDS500 compress ./tests/groundtruth/kodak/kodim01.png ./tests/reconBSDS500/kodim01_bsds.tfic\n```\n\n- Decompress using model trained on CLIC 2019\n```bash\n$ python eeicballe17.py --verbose --checkpoint_dir=./models/balle17CLIC decompress ./tests/reconCLIC/epoch30684/kodim01.tfic ./tests/reconCLIC/epoch30684/kodim01_recon.png\n```\n- Decompress using model trained on BSDS500\n```bash\n$ python eeicballe17.py --verbose --checkpoint_dir=./models/balle17BSDS500 decompress ./tests/reconBSDS500/kodim01_bsds.tfic ./tests/reconBSDS500/kodim01_recon.png\n```\n\n## Results on CLIC2019 dataset\n\n## Example\n\nOriginal | EIC\n:-------------------------:|:-------------------------:\n| \u003cimg src=\"./tests/groundtruth/kodak/kodim03.png\" width=\"512\"\u003e | \u003cimg src=\"./tests/reconCLIC/epoch124680/kodim03_recon.png\" width=\"512\"\u003e |\n\n```python\nOriginal: 491.1 kB\nEIC:  Compressed File size: 15.1 kB\n      Mean squared error: 29.7069\n      PSNR (dB): 33.40\n      Multiscale SSIM: 0.9706\n      Multiscale SSIM (dB): 15.32\n      Information content in bpp: 0.3120\n      Actual bits per pixel: 0.3148\n```\n\nThe image shown is an out-of-sample instance from the Kodak dataset. The EIC image is obtained by reconstruction via a learned model on CLIC-2019.\n\nNote that the learned model was not adapted in any way for evaluation on this image.\n\n#### bpp (bits-per-pixel)\n\n\u003cdiv align=\"left\"\u003e\n  \u003cimg src='results/bpp124749.png'/\u003e\n\u003c/div\u003e\n\n#### mse (mean-squared-error)\n\n\u003cdiv align=\"left\"\u003e\n  \u003cimg src='results/mse124749.png'/\u003e\n\u003c/div\u003e\n\n#### loss (mse + entropy coding auxiliary loss)\n\n\u003cdiv align=\"left\"\u003e\n  \u003cimg src='results/loss124749.png'/\u003e\n\u003c/div\u003e\n\n#### probabilty mass function plot of entropy coder\n\n\u003cdiv align=\"left\"\u003e\n  \u003cimg src='results/pmf124749.png', width=400px/\u003e\n\u003c/div\u003e\n\n\n#### tensorboard model graph\n\n\u003cdiv align=\"left\"\u003e\n  \u003cimg src='results/tfgraph30808.png'/\u003e\n\u003c/div\u003e\n\n## Citation\n\n\u003e \"End-to-end optimized image compression\"\u003cbr /\u003e\n\u003e J. Ballé, V. Laparra, E. P. Simoncelli\u003cbr /\u003e\n\u003e https://arxiv.org/abs/1611.01704\n\n\u003e \"Efficient nonlinear transforms for lossy image compression\"\u003cbr /\u003e\n\u003e J. Ballé\u003cbr /\u003e\n\u003e https://arxiv.org/abs/1802.00847\n\nIf you use this library for research purposes, please cite:\n```\n@software{tfc_github,\n  author = \"Ballé, Johannes and Hwang, Sung Jin and Johnston, Nick\",\n  title = \"{T}ensor{F}low {C}ompression: Learned Data Compression\",\n  url = \"http://github.com/tensorflow/compression\",\n  version = \"1.2b1 (beta)\",\n  year = \"2018\",\n}\n```\nIn the above BibTeX entry, names are top contributors sorted by number of\ncommits. Please adjust version number and year according to the version that was\nactually used.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffl0wbar%2Feic-balle2017","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffl0wbar%2Feic-balle2017","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffl0wbar%2Feic-balle2017/lists"}