Skip to content

Dau2004/Multimodal-Data-Preprocessing-Assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

32 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Multimodal Authentication and Product Recommendation System

๐Ÿ” A sophisticated biometric authentication system combining facial recognition and voice verification for secure access to personalized product recommendations.

๐ŸŽฏ Project Overview

This project implements a comprehensive Multimodal Authentication and Product Recommendation System that demonstrates the integration of computer vision, audio processing, and machine learning techniques. The system provides secure access to personalized product recommendations through a two-stage biometric authentication process.

Key Features

  • ๐Ÿ‘ค Facial Recognition: OpenCV-based image processing with HOG and histogram features
  • ๐ŸŽค Voice Verification: MFCC-based audio analysis using Librosa
  • ๐Ÿ›ก๏ธ Multi-layer Security: Dual authentication with confidence thresholds
  • ๐ŸŽฏ Product Recommendations: ML-driven personalized suggestions
  • ๐Ÿ“Š Real-time Processing: Fast biometric verification and prediction

๐Ÿ—๏ธ System Architecture

System Architecture

The system follows a secure multi-stage authentication flow:

Stage 1: Facial Recognition

  • User attempts to access the product prediction model
  • Facial image is processed using OpenCV
  • HOG features and color histograms are extracted
  • Random Forest classifier determines user identity
  • Threshold: Minimum 60% confidence required

Stage 2: Product Recommendation Generation

  • If face is recognized, user gains access to prediction model
  • Customer profile is retrieved (engagement score, purchase interest, rating)
  • ML model generates personalized product recommendation
  • Output: Product category with confidence score

Stage 3: Voice Verification

  • Prediction must be confirmed through voice sample
  • MFCC features are extracted using Librosa
  • Voice verification model validates the speaker
  • Threshold: Minimum 70% confidence required

Stage 4: Final Authorization

  • System ensures face and voice belong to same user
  • If all verifications pass, recommendation is approved and displayed
  • If any stage fails, access is denied with specific error message

Security Features:

  • Multi-modal authentication prevents single-point failures
  • Confidence thresholds ensure reliable verification
  • Identity matching prevents voice spoofing attacks
  • Real-time processing for seamless user experience

๐Ÿ“ Project Structure

Multimodal_Assignment/
โ”œโ”€โ”€ ๐Ÿ““ multimodal_data_preprocessing.ipynb  # Data merging and EDA
โ”œโ”€โ”€ ๐Ÿ script.py                           # Main system implementation
โ”œโ”€โ”€ ๐Ÿ““ Demo.ipynb                          # Interactive demonstration
โ”œโ”€โ”€ ๐Ÿ“Š PROJECT_REPORT.md                   # Comprehensive project report
โ”œโ”€โ”€ ๐Ÿ“‹ requirements.txt                    # Python dependencies
โ”œโ”€โ”€ ๐Ÿ—ƒ๏ธ Data Files/
โ”‚   โ”œโ”€โ”€ customer_social_profiles.xlsx      # Customer social data
โ”‚   โ”œโ”€โ”€ customer_transactions.xlsx         # Transaction history
โ”‚   โ”œโ”€โ”€ merged_customer_data.csv           # Processed customer data
โ”‚   โ”œโ”€โ”€ image_features.csv                 # Extracted image features
โ”‚   โ””โ”€โ”€ audio_features.csv                 # Extracted audio features
โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ Images/                            # Facial recognition dataset & docs
โ”‚   โ”œโ”€โ”€ system_architecture.png            # System architecture diagram
โ”‚   โ”œโ”€โ”€ member1/ (neutral.jpeg, smiling.jpeg, surprised.jpeg)
โ”‚   โ”œโ”€โ”€ member2/ (neutral.jpeg, smiling.jpeg, surprised.jpeg)
โ”‚   โ””โ”€โ”€ member3/ (neutral.jpeg, smiling.jpeg, surprised.jpeg)
โ”œโ”€โ”€ ๐ŸŽต Audio/                             # Voice verification dataset
โ”‚   โ”œโ”€โ”€ member1/ (confirm_1.wav, confirm_2.wav, yes_approve_1.wav, yes_approve_2.wav)
โ”‚   โ”œโ”€โ”€ member2/ (confirm_1.wav, confirm_2.wav, yes_approve_1.wav, yes_approve_2.wav)
โ”‚   โ””โ”€โ”€ member3/ (confirm_1.wav, confirm_2.wav, yes_approve_1.wav, yes_approve_2.wav)
โ””โ”€โ”€ ๐Ÿค– Models/
    โ”œโ”€โ”€ face_recognition_model.pkl          # Trained face recognition model
    โ”œโ”€โ”€ voiceprint_verification_model.pkl   # Trained voice verification model
    โ”œโ”€โ”€ product_recommendation_model.pkl    # Product recommendation model
    โ””โ”€โ”€ product_label_encoder.pkl          # Label encoder for products

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+
  • pip package manager

Installation

  1. Clone the repository (or download the project files)

    cd Multimodal_Assignment
  2. Install dependencies

    pip install -r requirements.txt
  3. Run the data preprocessing (if not already done)

    jupyter notebook multimodal_data_preprocessing.ipynb
  4. Run the system demonstration

    python script.py

    Or use the interactive notebook:

    jupyter notebook Demo.ipynb

๐ŸŽฎ Demo Scenarios

The system includes three demonstration scenarios:

โœ… Scenario 1: Successful Authentication

  • Input: Valid face image + matching voice sample
  • Result: Full access granted with product recommendation

โŒ Scenario 2: Access Denied - Face Not Recognized

  • Input: Unrecognized/blurred face image
  • Result: Access denied to prediction model

โš ๏ธ Scenario 3: Voice Verification Failed

  • Input: Valid face + mismatched voice sample
  • Result: Access granted but prediction blocked

๐Ÿ”ง Technical Implementation

Image Processing Pipeline

# Feature extraction from facial images
- Color histogram features (RGB channels, 32 bins each)
- HOG-like features using Sobel operators
- 40-dimensional feature vector
- Random Forest classification

Audio Processing Pipeline

# Feature extraction from voice samples
- MFCC coefficients (13 features + mean/std)
- Spectral features (rolloff, centroid)
- Temporal features (ZCR, RMS energy)
- 30-dimensional feature vector
- Random Forest classification

Product Recommendation Engine

# Customer profiling based on:
- Engagement score
- Purchase interest score
- Customer rating
- Historical transaction data

๐Ÿ“Š Performance Metrics

  • Authentication Speed: < 2 seconds for complete verification
  • Face Recognition Threshold: 60% confidence minimum
  • Voice Verification Threshold: 70% confidence minimum
  • Security Level: High (multi-modal requirement)

๐Ÿ› ๏ธ Dependencies

opencv-python==4.8.0.74    # Computer vision
librosa==0.10.1            # Audio processing
scikit-learn==1.3.0        # Machine learning
pandas==2.0.3              # Data manipulation
numpy==1.24.3              # Numerical computing
matplotlib==3.7.1          # Visualization
seaborn==0.12.2            # Statistical plotting
IPython==8.14.0            # Interactive computing
openpyxl==3.1.2            # Excel file handling

๐ŸŽฏ Use Cases

  • E-commerce Platforms: Secure access to personalized recommendations
  • Banking Systems: Multi-factor authentication for financial services
  • Healthcare: Secure patient data access
  • Enterprise Security: Facility and system access control

๐Ÿ”ฎ Future Enhancements

  • Deep Learning: CNN for face recognition, RNN for voice verification
  • Liveness Detection: Anti-spoofing measures
  • Mobile Integration: Smartphone-based biometric capture
  • Cloud Deployment: Scalable cloud architecture
  • Continuous Authentication: Ongoing verification during usage

๐Ÿ“ System Flow Detail

  1. Access Request: User attempts to access product prediction model
  2. Face Authentication: System processes facial image for identity verification
  3. Access Control: If face recognized (>60% confidence), grant model access
  4. Prediction Generation: System generates product recommendation
  5. Voice Confirmation: User must confirm prediction through voice sample
  6. Cross-Modal Verification: Ensure face and voice belong to same user
  7. Final Authorization: If all checks pass, display recommendation

๐Ÿ“‹ Project Report

For detailed technical implementation, methodology, and results, see PROJECT_REPORT.md.

๐Ÿ‘ฅ Team Contributions

This project demonstrates collaborative development of a complex multimodal system involving:

  • System architecture and design
  • Computer vision implementation
  • Audio processing and analysis
  • Machine learning model development
  • System integration and testing
  • Documentation and reporting

๐Ÿ“ž Support

For questions or issues, please refer to the comprehensive documentation in the project files or the detailed technical report.


This project showcases advanced biometric authentication techniques with practical applications in secure systems and personalized recommendation engines.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors