Automated-Face-Detection-Movie-Recommendation-App

๐ŸŽฌ CineMood - AI-Powered Movie Recommendation App

![App Logo](https://img.shields.io/badge/CineMood-AI%20Movie%20Recommendations-purple?style=for-the-badge&logo=android) [![Android](https://img.shields.io/badge/Platform-Android-green?style=flat-square&logo=android)](https://android.com) [![Kotlin](https://img.shields.io/badge/Language-Kotlin-blue?style=flat-square&logo=kotlin)](https://kotlinlang.org) [![ML Kit](https://img.shields.io/badge/AI-ML%20Kit-orange?style=flat-square&logo=google)](https://developers.google.com/ml-kit) [![License](https://img.shields.io/badge/License-MIT-yellow?style=flat-square)](LICENSE) **Discover movies that match your mood using advanced AI face detection technology** [Features](#-features) โ€ข [Installation](#-installation) โ€ข [Usage](#-how-to-use) โ€ข [Technical Details](#-technical-details) โ€ข [Contributing](#-contributing)

๐Ÿ“– Overview

CineMood is an innovative Android application that combines artificial intelligence with entertainment to provide personalized movie recommendations based on your current mood. Using Googleโ€™s ML Kit for real-time face detection and emotion analysis, the app intelligently suggests movies that match how youโ€™re feeling.

โœจ Features

๐Ÿค– AI-Powered Mood Detection

๐ŸŽฌ Smart Movie Recommendations

๐ŸŽจ Modern UI/UX Design

๐Ÿ“Š Advanced Features

๐Ÿš€ Installation

Prerequisites

Step-by-Step Installation

  1. Clone the Repository
    git clone https://github.com/samyak2403/Automated-Face-Detection-Movie-Recommendation-App.git
    cd Automated-Face-Detection-Movie-Recommendation-App
    
  2. Open in Android Studio
    • Launch Android Studio
    • Select โ€œOpen an existing projectโ€
    • Navigate to the cloned directory and select it
  3. Configure Dependencies
    // The app uses these key dependencies:
    implementation 'androidx.camera:camera-camera2:1.3.0'
    implementation 'androidx.camera:camera-lifecycle:1.3.0'
    implementation 'androidx.camera:camera-view:1.3.0'
    implementation 'com.google.mlkit:face-detection:16.1.5'
    implementation 'com.google.android.material:material:1.10.0'
    
  4. API Configuration (Optional)
    • Add your movie database API key in local.properties:
      MOVIE_API_KEY="your_api_key_here"
      
  5. Build and Run
    • Connect your Android device or start an emulator
    • Click โ€œRunโ€ or press Ctrl+R (Windows/Linux) or Cmd+R (Mac)

๐Ÿ“ฑ How to Use

Getting Started

  1. Launch the App
    • Open CineMood from your app drawer
    • Enjoy the animated splash screen showcasing key features
  2. Grant Permissions
    • Allow camera access for face detection functionality
    • Permissions are requested automatically on first use

Core Functionality

๐ŸŽฅ Camera & Mood Detection

  1. Navigate to Camera Tab
    • Tap the camera icon in the bottom navigation
    • Position your face within the camera viewfinder
  2. Choose Detection Mode
    • Close Range: Best for selfie-style detection (within 2 meters)
    • Far Range: Suitable for group settings or distant detection
  3. Real-Time Analysis
    • Watch the face mesh overlay for visual feedback
    • View detection quality indicators (Excellent/Good/Fair/Poor)
    • Observe real-time mood analysis with confidence percentages

๐ŸŽฌ Movie Recommendations

  1. Automatic Suggestions
    • Recommendations update automatically based on detected mood
    • View personalized movie cards with rich information
  2. Browse Movies
    • Scroll through mood-matched movie suggestions
    • Tap any movie for detailed information
  3. Movie Details
    • Comprehensive information including plot, cast, crew
    • Ratings, runtime, and genre classifications
    • Action buttons for trailers and streaming options

๐Ÿ‘ค Profile Management

  1. View Mood History
    • Track your mood patterns over time
    • Live indicators show recent emotional states
  2. App Information
    • Learn about the technology stack
    • Developer information and social links

Advanced Features

๐Ÿ”ง Detection Modes Explained

Mode Best For Detection Range Face Size Requirement
Close Range Selfies, personal use Within 2 meters Face ratio > 1% of image
Far Range Group photos, distant detection Any distance Minimum 100x100 pixels

๐Ÿ“Š Mood Analysis Metrics

The app analyzes multiple facial features to determine mood:

๐Ÿ›  Technical Details

Architecture

โ”œโ”€โ”€ ๐Ÿ“ฑ Presentation Layer
โ”‚   โ”œโ”€โ”€ SplashActivity (Entry point with animations)
โ”‚   โ”œโ”€โ”€ MainActivity (Navigation host)
โ”‚   โ””โ”€โ”€ Fragments/
โ”‚       โ”œโ”€โ”€ CameraFragment (Face detection & mood analysis)
โ”‚       โ”œโ”€โ”€ RecommendationsFragment (Movie suggestions)
โ”‚       โ”œโ”€โ”€ ProfileFragment (User data & history)
โ”‚       โ””โ”€โ”€ MovieDetailFragment (Detailed movie information)
โ”‚
โ”œโ”€โ”€ ๐Ÿง  Business Logic Layer
โ”‚   โ”œโ”€โ”€ MoodViewModel (State management)
โ”‚   โ”œโ”€โ”€ FaceDetectionService (ML Kit integration)
โ”‚   โ””โ”€โ”€ MovieRecommendationEngine (Mood-based filtering)
โ”‚
โ”œโ”€โ”€ ๐ŸŽจ UI Components
โ”‚   โ”œโ”€โ”€ FaceMeshOverlayView (Custom face detection overlay)
โ”‚   โ”œโ”€โ”€ Modern Material Design 3 components
โ”‚   โ””โ”€โ”€ Custom animations and transitions
โ”‚
โ””โ”€โ”€ ๐Ÿ“Š Data Layer
    โ”œโ”€โ”€ Movie API integration
    โ”œโ”€โ”€ Local preferences storage
    โ””โ”€โ”€ Mood history tracking

Technology Stack

Core Technologies

Key Libraries & Dependencies

dependencies {
    // Core Android
    implementation 'androidx.core:core-ktx:1.12.0'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'androidx.fragment:fragment-ktx:1.6.2'
    
    // UI & Material Design
    implementation 'com.google.android.material:material:1.10.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    implementation 'androidx.cardview:cardview:1.0.0'
    
    // Camera & Image Processing
    implementation 'androidx.camera:camera-camera2:1.3.0'
    implementation 'androidx.camera:camera-lifecycle:1.3.0'
    implementation 'androidx.camera:camera-view:1.3.0'
    
    // Machine Learning
    implementation 'com.google.mlkit:face-detection:16.1.5'
    
    // Navigation
    implementation 'androidx.navigation:navigation-fragment-ktx:2.7.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.7.5'
    
    // Lifecycle & ViewModel
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.7.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.7.0'
    
    // Networking (for movie data)
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    
    // Image Loading
    implementation 'com.github.bumptech.glide:glide:4.16.0'
}

Performance Optimizations

Security & Privacy

๐ŸŽจ UI/UX Highlights

Design System

Color Palette

Typography

Component Library

Animation Details

Splash Screen Sequence

  1. Background Fade (800ms): Gradient appearance
  2. Logo Animation (1000ms): Scale + rotation with overshoot
  3. Text Slide-In (600-800ms): Bottom-up movement with fade
  4. Feature Cards (staggered): Individual element animations
  5. Loading Indicator (500ms): Bouncy scale animation

Interaction Animations

๐Ÿงช Testing

Test Coverage

# Run unit tests
./gradlew test

# Run instrumentation tests
./gradlew connectedAndroidTest

# Generate coverage report
./gradlew jacocoTestReport

Test Categories

๐Ÿ“Š Performance Metrics

Benchmarks

Optimization Techniques

๐Ÿ”ง Configuration

Customization Options

Detection Parameters

// Face detection sensitivity
private val MIN_FACE_SIZE_PX = 100
private val MOOD_UPDATE_INTERVAL = 1000L
private val MIN_CONFIDENCE_THRESHOLD = 0.7f

// Emotion thresholds
private val VERY_HAPPY_THRESHOLD = 0.8f
private val HAPPY_THRESHOLD = 0.5f
private val SLEEPY_EYE_THRESHOLD = 0.3f

UI Customization

๐Ÿšจ Troubleshooting

Common Issues

Camera Not Working

Problem: Camera permission denied or camera not available
Solution: 
1. Check app permissions in device settings
2. Restart the app and grant camera permission
3. Ensure device has a front-facing camera

Face Detection Not Accurate

Problem: Poor detection quality or false readings
Solution:
1. Ensure good lighting conditions
2. Position face clearly within frame
3. Switch between Close/Far range modes
4. Check face mesh overlay for quality indicators

App Performance Issues

Problem: Lag or high battery consumption
Solution:
1. Close other camera-using apps
2. Reduce face detection frequency in settings
3. Clear app cache and restart
4. Update to latest app version

Debug Mode

Enable debug logging by adding to local.properties:

DEBUG_MODE=true
FACE_DETECTION_LOGGING=true

๐Ÿค Contributing

We welcome contributions from the community! Hereโ€™s how you can help:

Development Setup

  1. Fork the Repository
    git fork https://github.com/samyak2403/Automated-Face-Detection-Movie-Recommendation-App.git
    
  2. Create Feature Branch
    git checkout -b feature/your-feature-name
    
  3. Code Standards
    • Follow Kotlin coding conventions
    • Add comments for complex logic
    • Include unit tests for new features
    • Update documentation as needed
  4. Submit Pull Request
    • Describe your changes clearly
    • Include screenshots for UI changes
    • Reference any related issues

Areas for Contribution

Reporting Issues

Use the GitHub Issues page to report:

๐Ÿ“„ License

MIT License

Copyright (c) 2024 Samyak D Kambe

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

๐Ÿ‘จโ€๐Ÿ’ป Developer

**Samyak D Kambe** [![GitHub](https://img.shields.io/badge/GitHub-Follow-black?style=flat-square&logo=github)](https://github.com/samyakdkambe) [![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue?style=flat-square&logo=linkedin)](https://linkedin.com/in/samyakdkambe) [![Email](https://img.shields.io/badge/Email-Contact-red?style=flat-square&logo=gmail)](mailto:samyakdkambe@gmail.com) *Android Developer | AI Enthusiast | Open Source Contributor*

About the Developer

Passionate Android developer with expertise in:

๐Ÿ™ Acknowledgments

Special thanks to:

๐Ÿ“Š Project Statistics

๐Ÿ“ Project Structure:
โ”œโ”€โ”€ ๐Ÿ“ฑ Activities: 2
โ”œโ”€โ”€ ๐Ÿงฉ Fragments: 4
โ”œโ”€โ”€ ๐ŸŽจ Custom Views: 2
โ”œโ”€โ”€ ๐Ÿ“‹ Layouts: 8
โ”œโ”€โ”€ ๐ŸŽญ Drawables: 25+
โ”œโ”€โ”€ ๐ŸŽฏ Total Lines: 3,500+
โ””โ”€โ”€ ๐Ÿ“š Documentation: Comprehensive

๐Ÿ›  Development:
โ”œโ”€โ”€ โฑ Development Time: 6+ months
โ”œโ”€โ”€ ๐Ÿ”„ Git Commits: 150+
โ”œโ”€โ”€ ๐Ÿ› Issues Resolved: 45+
โ””โ”€โ”€ โœ… Test Coverage: 80%+

๐Ÿ”ฎ Future Roadmap

Version 2.0 (Planned Features)

Version 3.0 (Vision)


**โญ Star this repository if you found it helpful!** **๐Ÿ› Found a bug? [Report it here](https://github.com/samyak2403/repo/issues)** **๐Ÿ’ก Have an idea? [Share it with us](https://github.com/samyak2403/repo/discussions)** --- *Made with โค๏ธ by [Samyak D Kambe](https://github.com/samyak2403)*