{"id":20625719,"url":"https://github.com/toadharvard/svdi-cli","last_synced_at":"2025-03-07T13:19:08.392Z","repository":{"id":235613331,"uuid":"791022771","full_name":"toadharvard/svdi-cli","owner":"toadharvard","description":"Image compression and decompression using SVD","archived":false,"fork":false,"pushed_at":"2024-04-24T01:26:54.000Z","size":1234,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-25T01:08:25.525Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toadharvard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-04-24T00:33:11.000Z","updated_at":"2024-04-24T01:30:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"84a6220d-955e-4616-a855-fdcedc39af87","html_url":"https://github.com/toadharvard/svdi-cli","commit_stats":null,"previous_names":["toadharvard/svdi-cli"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toadharvard%2Fsvdi-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toadharvard%2Fsvdi-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toadharvard%2Fsvdi-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toadharvard%2Fsvdi-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toadharvard","download_url":"https://codeload.github.com/toadharvard/svdi-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242394440,"owners_count":20120941,"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":[],"created_at":"2024-11-16T13:10:43.905Z","updated_at":"2025-03-07T13:19:08.370Z","avatar_url":"https://github.com/toadharvard.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image compression and decompression using SVD\n\n## Installation\nInstall CLI using pipx:\n```bash\npipx install git+https://github.com/toadharvard/svdi-cli.git\n```\nOr\n```bash\npipx install svdi\n```\n\n## Usage example\n```bash\nsvdi compress --in-file=images/rafiq.bmp --out-file=images/liquidated.svdi --compression=3 --method=numpy\n\nsvdi decompress --in-file=images/liquidated.svdi --out-file=images/rafiq2.bmp\n\nls -l ./images\n```\n## Available SVD functions\n1. `rsvd` —  N Halko, P. G Martinsson, and J. A Tropp. Finding structure with randomness: Probabilistic algorithms for constructing approximate matrix decompositions. Siam Review, 53(2):217-288, 2011.\n2. `numpy` — NumPy's `np.linalg.svd` function.\n3. `pcafast` — H. Li, G. C. Linderman, A. Szlam, K. P. Stanton, Y. Kluger, and M. Tygert. Algorithm 971: An implementation of a randomized algorithm for principal component analysis. Acm Transactions on Mathematical Software, 43(3):1-14, 2017.\n4. `pi` — Power iterations method. URL: http://www.cs.yale.edu/homes/el327/datamining2013aFiles/07_singular_value_decomposition.pdf\n\n\n## Available commands\n```bash\nsvdi --help\nsvdi compress --help\nsvdi decompress --help\n```\n\n## SVDI Format\n\nThe CLI uses a simple binary format for storing SVD results in `.svdi` files.\n\nEach .svdi file consists of a header followed by the SVD results for each channel:\n\n1. Header\n   1. Signature: A fixed 4-byte sequence b'SVDI' to identify the file format.\n   2. Dimensions: Three 4-byte unsigned integers representing the shape of the matrices: m, n, and k.\n       * m: The number of rows in each U matrix.\n       * n: The number of columns in each Vh matrix.\n       * k: The size of each S vector, and the number of columns in U and rows in Vh.\n2. Channel Data\n   Repeated for each channel (**NUMBER_OF_CHANNELS**):\n      * U Matrix: A matrix of size m * k, with elements stored as 32-bit floats in row-major order.\n      * S Vector: A vector of length k, with elements stored as 32-bit floats.\n      * Vh Matrix: A matrix of size k * n, with elements stored as 32-bit floats in row-major order.\n\n## Licence\nSee the details of the license in the [LICENCE](./LICENCE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoadharvard%2Fsvdi-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoadharvard%2Fsvdi-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoadharvard%2Fsvdi-cli/lists"}