This repository provides a Python script that analyzes the variability of skin tones across a dataset using Principal Component Analysis (PCA). The code processes images stored in folders categorized by skin tones and evaluates both RGB and Color Cube (RGB + HSV + YCbCr) color representations. The results are visualized using violin plots to assess the principal components across different skin tones.

# Notes

**Ensure that you run the skin tone detection code on the dataset first, which sorts the images into the appropriate folders.**

**The PCA analysis focuses on the variability of the dataset across different skin tones, using both RGB and Color Cube feature representations.**

**This code can be extended to analyze other features or use additional color spaces.**


# Requirements
You can install the required dependencies by running:

'''
pip install -r requirements.txt

'''


# Dataset Structure

/path/to/dataset
    /Brown
        image1.png
        image2.jpg
        ...
    /Light
        image1.png
        image2.jpg
        ...
    /Tan
    /Intermediate
    /Dark
    /Very_Light


# Usage

data_path = "Give Dataset Path"

```
 python script_name.py
```

