{"id":22206382,"url":"https://github.com/manik2000/unsupervised-ml-image-compression","last_synced_at":"2026-04-26T20:31:48.765Z","repository":{"id":155219818,"uuid":"590973395","full_name":"Manik2000/unsupervised-ml-image-compression","owner":"Manik2000","description":"Web application enabling compression of images using unsupervised machine learning algorithm.","archived":false,"fork":false,"pushed_at":"2024-09-23T11:46:55.000Z","size":21050,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T04:46:48.237Z","etag":null,"topics":["clustering","docker","pca","python","streamlit-application","unsupervised-machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Manik2000.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":"2023-01-19T16:37:44.000Z","updated_at":"2024-09-23T11:59:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"f19bacdd-0f6d-431e-8dd3-95a9ea48f8d3","html_url":"https://github.com/Manik2000/unsupervised-ml-image-compression","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Manik2000/unsupervised-ml-image-compression","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manik2000%2Funsupervised-ml-image-compression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manik2000%2Funsupervised-ml-image-compression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manik2000%2Funsupervised-ml-image-compression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manik2000%2Funsupervised-ml-image-compression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Manik2000","download_url":"https://codeload.github.com/Manik2000/unsupervised-ml-image-compression/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Manik2000%2Funsupervised-ml-image-compression/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32312225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T19:15:34.056Z","status":"ssl_error","status_checked_at":"2026-04-26T19:15:15.467Z","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":["clustering","docker","pca","python","streamlit-application","unsupervised-machine-learning"],"created_at":"2024-12-02T18:11:36.442Z","updated_at":"2026-04-26T20:31:48.749Z","avatar_url":"https://github.com/Manik2000.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Images compression using unsupervised ML\n\nThis project is focused on applying PCA and clustering methods (mini batch K-means) to image compression problem.\n\n`scikit-learn` implementations of both algorithms are used. More on how these methods can be used to compress images can be found in the [notebooks](notebooks/) directory. \n\n**Note:** Python \u003e= 3.10 is required!\n\n### Web application\n\nWeb application is deployed on Streamlit Community Cloud.\nYou can experiment and have fun on your own [here :fire:](https://unsupervised-ml-image-compression.streamlit.app/).\n\n### Results\n\nBelow you can see an examplary output of using clustering for image compression.\n\n|Original image | Compressed image with K = 10 | Compressed image with K = 50 |\n|---| --- | ---|\n|![](images/drops.jpg)| ![](images/k_10.png)| ![](images/k_50.png)|\n||||\n\n\n### Project structure\n\n```\n.\n├── Dockerfile \u003c- Dockerfile for building the image\n├── Main_page.py \u003c- main Python file defining Streamlit app\n├── README.md\n├── images \u003c- directory with sample images\n├── notebooks \n│   ├── clustering.ipynb \u003c- notebook showcasing clustering compression\n│   └── pca.ipynb \u003c- notebook showcasing PCA compression\n├── pages\n│   ├── Clustering_compression.py \u003c- sybpage with clustering compression\n│   └── PCA_compression.py \u003c- subpage with PCA compression\n├── requirements.txt \u003c- required packages\n└── scripts\n    ├── __init__.py \u003c- makes scripts a module\n    ├── cluster_compression.py \u003c- ClusterCompressor class\n    ├── pca_compression.py \u003c- PCACompressor class\n    └── utils.py \u003c- uitilty functions for image to array and array to image conversion\n```\n\n### Running the application\n\nClone this repository and navigate to the root directory of the project.\n\n* Python virtual environment\n\n    1. Create a virtual environment (below named env) and activate it\n    ```bash\n    python3 -m venv env\n    source env/Scripts/activate # bash\n    env\\Scripts\\activate # on Windows\n    ```\n    2. Install required packages\n    ```bash\n    pip install -r requirements.txt\n    ```\n    3. Run the application\n    ```bash\n    streamlit run Main_page.py\n    ```\n\nAlternatilvely, if you have Make installed, you can use use command `make streamlit`.\n\n* Docker\n\n    1. Build docker image (named `my_app_image`)\n    ```bash\n    docker build -t my_app_image .\n    ```\n    2. Run the container\n    ```bash\n    docker run -p 8501:8501 my_app_image\n    ```\nAlternatilvely, if you have Make installed, you can use use command `make docker-all`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanik2000%2Funsupervised-ml-image-compression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanik2000%2Funsupervised-ml-image-compression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanik2000%2Funsupervised-ml-image-compression/lists"}