ColorSense is an image processing application that allows users to upload an image, apply a segmentation algorithm based on k-means clustering, and customize the color of each segment using RGB values. The result is a transformed image with a unique and personalized look.
-
Image Upload: Users can easily upload their images through the user-friendly interface.
-
K-Means Segmentation: The application utilizes the k-means clustering algorithm to segment the uploaded image into a specified number of clusters.
-
Color Customization: Users can interactively customize the color of each segment by entering RGB values.
-
Preview: A preview is provided to visualize the changes made to the image.
-
Dockerized: The entire application is containerized using Docker, ensuring easy deployment and consistent behavior across different environments.
-
Kubernetes Provisioning: For those interested in deploying the application on Kubernetes, instructions are provided in the Kubernetes section.
Before running ColorSense, ensure you have the following dependencies installed:
- Docker
- Docker Compose
-
Clone the Repository:
git clone https://github.com/sanchi-t/ColorSense.git
-
Navigate to the Project Directory:
cd colorsense
-
Build and Run the Docker Containers:
docker-compose up --build
-
Access the Application:
Open your web browser and go to http://localhost:5000 to use ColorSense.
If you are interested in deploying ColorSense on Kubernetes, follow the steps below:
-
Apply Kubernetes Manifests:
cd kubernetes
kubectl apply -f kubernetes/
-
Access the Application:
Once the pods are running, the application will be accessible. You can find the service details using:
kubectl get svc colorsense-service
Access the application using the provided
EXTERNAL-IP
.
-
Segmentation:
- Enter the number of segments for k-means clustering.
-
Upload Image:
- Click on the "Upload" button to select and upload an image.
-
Color Customization:
- For each segment, enter RGB values to customize the color.
- Changes will be reflected after you click on detect object button.
-
Save or Download:
- Once satisfied with the customization, save or download the transformed image by right-clicking it.
If you want to contribute to ColorSense, follow these steps:
- Fork the repository.
- Create a new branch for your feature:
git checkout -b feature-name
. - Make your changes and commit them:
git commit -m 'Add some feature'
. - Push to the branch:
git push origin feature-name
. - Submit a pull request.
- The ColorSense project is built using Flask, k-means clustering, and Docker.
Feel free to customize this README according to your specific project details and needs.