A sophisticated color analysis tool that uses machine learning to identify and analyze the distribution of colors in images. This application provides a detailed breakdown of color composition in any uploaded image.
- Smart Color Analysis: Uses machine learning to accurately identify and classify colors
- Real-time Processing: Instant color distribution analysis
- Visual Color Swatches: See the actual colors alongside their percentages
- User-friendly Interface: Clean and intuitive design
- High Accuracy: Trained on a diverse dataset of color samples
- Support for Multiple Formats: Works with JPG, JPEG, and PNG images
The main interface of NP's Color Classifier showing the upload section and welcome message
Example of color analysis results showing the distribution of colors in an uploaded image
Demonstration of the image upload process and real-time analysis
- Frontend: Streamlit
- Machine Learning: scikit-learn
- Image Processing: OpenCV, PIL
- Data Processing: NumPy, Pandas
- Color Analysis: Matplotlib
- Random Forest Classifier
- Color histogram extraction
- HSV color space analysis
- Patch-based color distribution
- Python 3.8 or higher
- pip (Python package installer)
- Clone the repository:
git clone https://github.com/yourusername/color-classifier.git
cd color-classifier- Install the required dependencies:
pip install -r requirements.txt- Run the application:
streamlit run app.pycolor-classifier/
├── app.py # Main application file
├── requirements.txt # Python dependencies
├── ColorClassification_dataset/ # Training dataset
│ ├── red/ # Red color samples
│ ├── blue/ # Blue color samples
│ └── ... # Other color samples
├── uploads/ # Temporary storage for uploaded images
└── screenshots/ # Application screenshots
├── main_interface.png
├── color_analysis.png
└── upload_example.png
- Image Upload: Users can upload any JPG, JPEG, or PNG image
- Color Extraction: The application extracts color histograms from the image
- Analysis: The machine learning model analyzes the color distribution
- Results: A detailed breakdown of colors is displayed with percentages
- Accuracy: ~99.3% on test dataset
- Color Categories: 9 distinct color classes
- Processing Time: Near real-time analysis
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Namraa Patel
- GitHub: @yourusername
- Streamlit team for the amazing framework
- scikit-learn community for the machine learning tools
- OpenCV team for image processing capabilities