{"id":24437221,"url":"https://github.com/chaganti-reddy/ispso","last_synced_at":"2026-02-28T07:08:50.388Z","repository":{"id":159306919,"uuid":"634513482","full_name":"Chaganti-Reddy/ISPSO","owner":"Chaganti-Reddy","description":"Image Segmentation Using Particle Swarm Optimization \u0026 K-means Clustering Algorithm","archived":false,"fork":false,"pushed_at":"2025-05-14T06:37:11.000Z","size":3749,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T09:49:07.198Z","etag":null,"topics":["dockerization","flask-application","image-segmentation","particle-swarm-optimization","python3"],"latest_commit_sha":null,"homepage":"https://github.com/Chaganti-Reddy/ISPSO","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/Chaganti-Reddy.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,"zenodo":null}},"created_at":"2023-04-30T11:27:27.000Z","updated_at":"2025-06-17T14:44:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"224fdea3-7f09-40fa-88f5-c63d83c0f903","html_url":"https://github.com/Chaganti-Reddy/ISPSO","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Chaganti-Reddy/ISPSO","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaganti-Reddy%2FISPSO","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaganti-Reddy%2FISPSO/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaganti-Reddy%2FISPSO/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaganti-Reddy%2FISPSO/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chaganti-Reddy","download_url":"https://codeload.github.com/Chaganti-Reddy/ISPSO/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chaganti-Reddy%2FISPSO/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29927263,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["dockerization","flask-application","image-segmentation","particle-swarm-optimization","python3"],"created_at":"2025-01-20T18:15:47.210Z","updated_at":"2026-02-28T07:08:50.373Z","avatar_url":"https://github.com/Chaganti-Reddy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image Segmentation Using PSO\n\n## Table of Content\n\n- [Flight Fare Prediction:](#flight-fare-prediction)\n  - [Table of Content](#table-of-content)\n  - [Overview](#overview)\n  - [What is this project about?](#motivation)\n  - [🔑 Prerequisites](#key-prerequisites)\n  - [📖 Data Preprocessing](#book-data-preprocessing)\n  - [🚀  Installation](#-installation)\n    - [💡 How to Run](#bulb-how-to-run)\n  - [Results](#results)\n  - [Directory Tree](#directory-tree)\n  - [Technologies Used](#technologies-used)\n  - [Future Scope](#future-scope)\n  - [👏 And it\u0026#39;s done!](#clap-and-its-done)\n  - [🙋 Citation](#raising_hand-citation)\n  - [❤️ Owner](#heart-owner)\n  - [👀 License](#eyes-license)\n\n## Overview\n\nThis is a Flask web app which shows the images after segmenting using PSO.\n\n## What is this project about?\n\nParticle Swarm Optimization (PSO) is a popular optimization technique inspired by the collective behavior of bird flocking or fish schooling. It is commonly used to solve optimization problems in various fields, including image processing.\n\nImage segmentation is the process of partitioning an image into multiple segments or regions based on certain criteria, such as color, texture, or intensity. It is a fundamental task in computer vision, and it has various applications, including object recognition, image analysis, and medical imaging.\n\nPSO can be used for image segmentation because it is a powerful optimization technique that can find the optimal segmentation parameters by searching the solution space efficiently. PSO-based image segmentation algorithms typically define the fitness function based on the similarity of the segmented\n\n\u003cimg src=\"assets/WDPM.png\"  width=\"400\" height=\"300\"\u003e\n\nVelocity Vector Update Equation:\n\n$$\n\\begin{equation}\n\\mathbf{v_{id}}(t+1) = w \\mathbf{v_{id}}(t) + c_1 rand() \\left( \\mathbf{p_{id}}(t) - \\mathbf{x_{id}}(t) \\right) + c_2 rand() \\left( \\mathbf{v_{gd}}(t) - \\mathbf{x_{gd}}(t) \\right)\n\\end{equation}\n$$\n\nPosition Vector Update Equation:\n\n$$\n\\begin{equation}\n\\mathbf{x_{id}}(t+1) = \\mathbf{x_{id}}(t) + \\mathbf{v_{id}}(t+1)\n\\end{equation}\n$$\n\nInertia Weight:\n\n$$\n\\begin{equation}\nw = w_{max} - \\frac{w_{max} - w_{min}}{iter_{max}} \\times iter\n\\end{equation}\n$$\n\n\u003chr\u003e\n\n## 🔑 Prerequisites\n\nAll the dependencies and required libraries are included in the file \u003ccode\u003erequirements.txt \u003c/code\u003e [See here](requirements.txt)\n\n## 📖 Data Preprocessing\n\nData pre-processing is an important step for the creation of a machine learning\nmodel. Initially, data may not be clean or in the required format for the model which\ncan cause misleading outcomes. In pre-processing of data, we transform data into our\nrequired format. It is used to deal with noises, duplicates, and missing values of the\ndataset. Data pre-processing has the activities like importing datasets, splitting\ndatasets, attribute scaling, etc. Preprocessing of data is required for improving the\naccuracy of the model.\n\n## 🚀\u0026nbsp; Installation\n\nThe Code is written in Python 3.9. If you don\u0026rsquo;t have Python installed you can find it [here](https://www.python.org/downloads/). If you are using a lower version of Python you can upgrade using the pip package, ensuring you have the latest version of pip. To install the required packages and libraries, run this command in the project directory after [cloning](https://www.howtogeek.com/451360/how-to-clone-a-github-repository/) the repository:\n\n1. Clone the repo\n\n```bash\ngit clone https://github.com/Chaganti-Reddy/ISPSO.git\n```\n\n2. Change your directory to the cloned repo\n\n```bash\ncd ISPSO\n```\n\n3. Now, run the following command in your Terminal/Command Prompt to install the libraries required\n\n```bash\npython3 -m virtualenv my_env\n\nsource my_env/bin/activate\n\npip3 install -r requirements.txt\n```\n\n### 💡 How to Run\n\n1. Open terminal. Go into the cloned project directory and type the following command:\n\n   ```bash\n   python3 app.py\n   ```\n\n2. The other method is you can directly pull this project from my Dockerhub using:\n\n   ```bash\n   docker pull chagantireddy/ispso:latest\n   ```\n\n3. Then run using:\n\n   ```bash\n   docker run -it --rm -p 5000:5000 chagantireddy/ispso:latest\n   ```\n\n## Results\n\nColor Image\n\n\u003cimg src='assets/color.png' height=300 width=450\u003e\n\n\u003cbr\u003e\n\nGray Scale Image\n\n\u003cimg src='assets/gray.png' height=300 width=450\u003e\n\n\u003chr\u003e\n\n## Directory Tree\n\n```bash\n.\n├── app.py\n├── Dockerfile\n├── LICENSE\n├── pso.py\n├── Readme.md\n├── requirements.txt\n├── static\n│   ├── segmented_image.jpg\n│   └── temp.jpg\n├── templates\n│   ├── index.html\n│   └── result.html\n└── tests\n    ├── image.jpg\n    ├── lena.png\n    └── tst.jpg\n\n```\n\n## Technologies Used\n\n[\u003cimg target=\"_blank\" src=\"https://www.vectorlogo.zone/logos/numpy/numpy-ar21.svg\" width=170\u003e](https://numpy.org/) [\u003cimg target=\"_blank\" src=\"https://www.vectorlogo.zone/logos/python/python-ar21.svg\" width=170\u003e](https://www.python.org/) [\u003cimg target=\"_blank\" src=\"https://www.vectorlogo.zone/logos/docker/docker-ar21.svg\" width=170\u003e](https://www.docker.com/)[\u003cimg target=\"_blank\" src=\"https://www.vectorlogo.zone/logos/git-scm/git-scm-ar21.svg\" width=170\u003e](https://git-scm.com/)\n\n## Future Scope\n\n- To run it in more speed\n- Optimize Flask app.py\n- Optimize this Image Segmentation with different algorithm\n\n## 👏 And it's done!\n\nFeel free to mail me for any doubts/query\n✉️ chagantivenkataramireddy1@gmail.com\n\n---\n\n## 🙋 Citation\n\nYou are allowed to cite any part of the code or our dataset. You can use it in your Research Work or Project. Remember to provide credit to the Maintainer Chaganti Reddy by mentioning a link to this repository and his GitHub Profile.\n\nFollow this format:\n\n- Author's name - Chaganti Reddy\n- Date of publication or update in parentheses.\n- Title or description of document.\n- URL.\n\n## ❤️ Owner\n\nMade with ❤️\u0026nbsp; by [Chaganti Reddy](https://github.com/Chaganti-Reddy/)\n\n## 👀 License\n\nMIT © [Chaganti Reddy](https://github.com/Chaganti-Reddy/ISPSO/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaganti-reddy%2Fispso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaganti-reddy%2Fispso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaganti-reddy%2Fispso/lists"}