Documentation

Installation Guide

CineMood AI — Emotion-Based Movie Recommendation System with DeepFace Facial Recognition

Step-by-step Setup Verified Instructions Chat Support
Back to Project
Complete Guide

CineMood AI - Installation & Setup Guide

📋 Prerequisites

Before you begin, ensure you have the following installed on your system:

  • Python 3.10 or higher
  • pip (Python package installer)
  • A working webcam
  • Git (for cloning the repository)
  • Modern web browser (Chrome, Firefox, Edge, or Safari)

Step 1: Clone the Repository

Open your terminal or command prompt and run the following commands:

Command:

git clone https://github.com/yourusername/cinemood.git
cd cinemood

This will download the complete project source code to your local machine and navigate into the project directory.

Step 2: Create Virtual Environment

It's recommended to create a virtual environment to isolate project dependencies:

Command:

python -m venv venv

Activate Virtual Environment

For Windows:

venv\Scripts\activate

For macOS / Linux:

source venv/bin/activate

You should see (venv) prefix in your terminal indicating the virtual environment is active.

Step 3: Install Dependencies

Install all required Python packages using pip:

Command:

pip install django deepface opencv-python numpy tf-keras

⚠️ Important Note: DeepFace will automatically download model weights (approximately 600MB) on first run. Ensure you have a stable internet connection.

Alternative: If a requirements.txt file is provided, you can use:

pip install -r requirements.txt

Step 4: Run Database Migrations

Set up the SQLite database by running Django migrations:

Command:

python manage.py migrate

This creates all necessary database tables for the application.

Step 5: Start Development Server

Launch the Django development server:

Command:

python manage.py runserver

You should see output indicating the server is running, typically at:

Starting development server at http://127.0.0.1:8000/

Step 6: Open in Browser

Navigate to the following URL in your web browser:

http://127.0.0.1:8000/

You should now see the CineMood home page with the animated starfield background.

Step 7: Grant Camera Permissions

When you navigate to the Camera page for the first time:

  1. Click on the "Start Emotion Scan" button
  2. Your browser will request camera access permission
  3. Click "Allow" to grant camera access
  4. The live emotion scanner will activate

💡 Tip: Ensure good lighting on your face for accurate emotion detection.

🔧 Troubleshooting Common Issues

Issue 1: Camera Not Working

  • Ensure no other application is using the webcam
  • Check browser camera permissions in settings
  • Try using HTTPS in production (camera requires secure context)
  • Restart your browser and try again

Issue 2: Module Not Found Errors

  • Verify virtual environment is activated
  • Re-run: pip install -r requirements.txt
  • Check Python version is 3.10 or higher
  • Try: pip install --upgrade pip

Issue 3: DeepFace Model Download Fails

  • Check internet connection stability
  • Manually download weights from DeepFace GitHub
  • Place weights in: ~/.deepface/weights/
  • Clear pip cache: pip cache purge

Issue 4: Database Errors

  • Delete db.sqlite3 file
  • Run: python manage.py migrate again
  • Ensure write permissions in project directory

📁 Project Structure Overview

Understanding the project folder structure:

cinemood/
├── manage.py                          # Django management script
├── db.sqlite3                         # SQLite database file
├── requirements.txt                   # Python dependencies
├── README.md                          # Project documentation
│
├── emotion/                           # Main Django application
│   ├── views.py                       # Core emotion analysis logic
│   ├── urls.py                        # URL routing for emotion app
│   ├── apps.py                        # App configuration
│   ├── models.py                      # Database models
│   └── haarcascade_frontalface_default.xml  # Face detection model
│
├── emotion_is_everything/             # Django project settings
│   ├── settings.py                    # Project configuration
│   ├── urls.py                        # Main URL configuration
│   ├── wsgi.py                        # WSGI application
│   └── asgi.py                        # ASGI application
│
└── templates/                         # HTML template files
    ├── home.html                      # Landing page
    ├── cam.html                       # Camera/emotion scanner page
    ├── moviesList.html                # Movie recommendations page
    ├── about.html                     # About page
    └── contact.html                   # Contact page
            

🔌 API Endpoints Reference

Method URL Description
GET / Home page
GET /cam/ Emotion scanner page
POST /analyze_frame/ Accepts base64 image, returns emotion data
GET /movieslist/<emotion> Movie recommendations for given emotion
GET /about/ About page
GET /contact/ Contact page

POST /analyze_frame/ Request Format

{
    "image": "data:image/jpeg;base64,/9j/4AAQ..."
}
            

POST /analyze_frame/ Response Format

{
    "emotion": "happy",
    "all_emotions": {
        "angry": 2.1,
        "disgust": 0.3,
        "fear": 1.2,
        "happy": 87.4,
        "neutral": 6.8,
        "sad": 1.5,
        "surprise": 0.7
    }
}
            

🔒 Privacy & Security Information

  • No Biometric Storage: Camera frames are processed and immediately discarded
  • No External Uploads: All analysis runs locally via Django backend
  • No Account Required: Watchlist stored only in browser localStorage
  • Camera Auto-Release: Stream stopped immediately after 10 readings complete
  • Local Processing: No data sent to external servers

✅ Installation Verification Checklist

Confirm successful installation by checking the following:

  • □ Django server starts without errors
  • □ Home page loads with animated starfield
  • □ Camera page accesses webcam successfully
  • □ Emotion detection shows confidence bars
  • □ Movie recommendations display correctly
  • □ Watchlist save/load functionality works
  • □ All navigation links work properly
  • □ Contact form submits without errors

📞 Need Help?

If you encounter any issues during installation:

  • Check the troubleshooting section above
  • Review the complete README.md documentation
  • Verify all prerequisites are installed correctly
  • Clear browser cache and cookies
  • Try running in a fresh virtual environment

Optional Add-ons Available:

  • Project Setup Assistance - ₹299
  • Source Code Explanation Session - ₹199
  • Professional Project Report - ₹399

Need Help?

Our team is here to assist you with installation and setup.

Chat with Us
Chat with us