The Fashion Trend Analyzer is designed to identify and record seasonal costume patterns among different age groups and genders.
- Detection Model: YOLOv8 segmentation model.
- Tracking Algorithm: ByteTrack Algorithm.
- Count: Records the number of people entering (IN) and leaving (OUT).
When a person is entering:
- Segmentation Mask Retrieval: The system fetches the segmentation mask.
- Body Division:
- The detected person image is divided into three sections based on predefined ratios:
- Head Part
- Upper Costume Part
- Lower Costume Part
- The detected person image is divided into three sections based on predefined ratios:
- Models:
- Uses two separate models for age and gender prediction.
- Due to real-time application needs, a lightweight model ("coffee model") is employed.
- For enhanced speed, the model is quantized to INT8.
- Age Categories:
- The age model can predict the following age categories: '(0-2)', '(4-6)', '(8-12)', '(15-20)', '(25-32)', '(38-43)', '(48-53)', '(60-100)'.
- Gender Prediction:
- The gender model can predict whether the detected person is Male or Female.
- Algorithm: Uses KMeans algorithm-based method for identify colours.
- Steps:
- Image Conversion: Converts from BGR to RGB using OpenCV.
- Preprocessing:The black background pixels in the pixel mask are removed.
- K-Means Clustering: Groups similar pixels (colors) into clusters.
- Cluster Analysis: Retrieves the cluster centers representing the most common colors.
- Pixel Count: Calculates the number of pixels in each cluster.
- Percentage Calculation: Determines the percentage of each color cluster in the image.
- Most Common Color Values: Generates a list of common RGB color values along with their respective percentages.
- RGB2HSV: Converts the RGB color values to the HSV color format.
- Determine Respective Color: Based on the HSV values, the respective color is determined.
- Excel: All the records are saved in an Excel file.
- Database: Records are also stored in a MySQL database for reference.
- The details, including segmentation masks, are displayed in an OpenCV window.