This project focuses on finding color details of handbags and their logos. The project is done in 3 steps:
- Handbag and logo detection using Google vision APIs
- Segmenting the detected region into superpixels (cluster based on color similarity and physical proximity). And then averaging the color in each superpixel.
- Clustering the superpixels by using K-means clustering to find clusters by color similarity and finding the average cluster colors and the proportion of pixels assigned to them.
Below features have been calculated for all handbags:
- Logo size : size of the logo
- Logo contrast : contrast ratio of the most dominant color of logo to handbag
- Logo conspicuousness : contrast ratio * relative size of the logo
- Total number of colors in the handbag
- Color Entropy of Handbag : to calculate the distribution of the colors
- google-cloud-vision==2.0.0
- google-auth-oauthlib==0.4.1
- scikit-image==0.16.2
- webcolors==1.9.1
- pandas==1.1.0
- numpy==1.19.1
- sklearn==0.23.1
- PIL==7.2.0
- cv2==3.4.2
python main.py
--dir_path
--bag_segments
--bag_cluster_size
--logo_segments
--logo_cluster_size