Menu

Menu

Close

Close

project image

AI Fashion-Music Curator

is an innovative IoT and machine learning project that creates a personalized music experience by correlating clothing choices with listening habits. The system uses NFC-tagged clothing and Spotify listening history to generate custom playlists tailored to the users activities and moods

system diagram

System diagram

    Data Collection

    The system collects data from two primary sources:

  1. Clothing Data: Using RFID-RC522 sensor with a Raspberry Pi 3B+, the system reads NTAG213 tags attached to clothing items. Each scan records the item and timestamp.
  2. Music Data: Utilizing the Spotify API, the system fetches detailed track features including danceability, acousticness, energy, instrumentalness, valence, and more.
Clothing Tagging

Schematic of the RPi to RC-522 sensor

Data Analysis and Clustering

The core of the StyleSync system lies in its data analysis and clustering approach:

  1. Data Normalization: Track features are normalized to ensure comparability. For instance, loudness is scaled to match the 0-1 range of other features.
  2. Feature Selection: Based on initial analysis, less relevant features like 'speechiness' and 'liveness' were dropped to focus on more impactful attributes.
  3. Clothing Tagging
  1. K-means Clustering: The system uses k-means clustering to group songs into distinct mood categories. The optimal number of clusters (k=4) was determined using the elbow method.system diagram
  2. Principal Component Analysis (PCA): To visualize the high-dimensional data, PCA was employed, revealing clear separation between the four identified clusters.system diagram
  3. The four identified clusters correspond to distinct music moods:

    • Cluster 0 (Study): High acousticness and instrumentalness, typically classical music.
    • Cluster 1 (Happy): High valence, upbeat tracks.
    • Cluster 2 (Chill): Moderate values across features, relaxed music.
    • Cluster 3 (Energetic): High energy, often associated with running or workout playlists.
    Cluster Mean Values Chart
    CLuster Mean Values Chart

Machine Learning Model

To predict the appropriate music mood based on clothing choices, the clustered data was exported to CSV files with their respective 'mood' labels.

  • Several classification models were tested, with the Random Forest Classifier proving most accurate.
  • The model uses clothing data as input to predict the most suitable music mood cluster.
  • Random Forest Confusion Matrix
    CLuster Mean Values Chart

    Data visualisations

    Future Enhancements

    • Incorporate more data sources (e.g., location, time of day) for more nuanced recommendations.
    • Implement more sophisticated models to capture complex relationships between clothing and music preferences.
    • Develop a more intuitive user interface for real-time music recommendations.

    StyleSync demonstrates the potential of combining IoT, machine learning, and music streaming technologies to create a truly personalized user experience, bridging the gap between physical fashion choices and digital music preferences.

    profile

    Let's work together!

    AI/LLM enthusiast | Cutting-edge tech advocate | Web3 builder | Passionate about using technology to make the world a better place.

    Version

    2024 © Edition

    Timezone

    22:14 UK (GMT+1)