Documentation

Installation Guide

SnapCam - AI Face Detection Camera Web App with Real-Time AR Filters and Photo Gallery | Django Python Final Year Project

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

SnapCam - Installation Guide

Follow these steps to set up and run the SnapCam AI Face Detection Camera App on your local machine.

Prerequisites

Requirement Details
Python Version 3.10 or higher
pip Python package manager (comes with Python)
Web Browser Chrome, Firefox, Safari, or Edge with camera and WebGL support
Internet Connection Required for loading face-api.js models from CDN on first run

Step 1: Extract the Project

Download and extract the SnapCam project zip file to a folder on your computer. Open a terminal or command prompt and navigate to the project root directory (the folder that contains manage.py).

cd snapcam

Step 2: Create a Virtual Environment

Create a Python virtual environment to keep your project dependencies isolated.

python -m venv venv

Activate the virtual environment:

macOS / Linux:

source venv/bin/activate

Windows:

venv\Scripts\activate

You should see (venv) appear at the beginning of your terminal prompt after activation.

Step 3: Install Dependencies

Install all required Python packages using the requirements file.

pip install -r requirements.txt

This installs Django 5.2+, Pillow 10+, and any other packages the project depends on.

Step 4: Apply Database Migrations

Set up the SQLite3 database and create the Photo model table.

python manage.py migrate

This creates a db.sqlite3 file in your project root with the required database schema.

Step 5: Start the Development Server

Launch the Django development server.

python manage.py runserver

The server will start at http://127.0.0.1:8000/.

Step 6: Open the Application

Open your web browser and go to:

http://127.0.0.1:8000/

Your browser will ask for camera permission. Click Allow to enable the camera feed. The face-api.js detection models will load automatically from CDN on the first visit.

Step 7: Using SnapCam

Once the app loads and the camera feed appears:

  1. Select a filter from the filter bar at the bottom of the screen.
  2. Select a sticker from the sticker panel if you want AR effects.
  3. Press the Capture button or hit the Space key to take a photo.
  4. Use the Timer button to set a 3-second, 5-second, or 10-second countdown.
  5. Click the camera toggle button to switch between front and rear cameras.
  6. Click Gallery in the navigation bar to view, search, and manage saved photos.

Important Notes

  1. Camera Permission: Browsers require HTTPS for camera access on non-localhost URLs. For local development, http://127.0.0.1:8000 works fine.
  2. WebGL Required: face-api.js runs on TensorFlow.js which needs WebGL support in your browser. Most modern browsers support this by default.
  3. Upload Size Limit: The Django setting DATA_UPLOAD_MAX_MEMORY_SIZE is configured to 20MB to handle base64 image uploads.
  4. Face Detection Status: The status indicator in the camera view shows "Face detected" (green), "No face" (yellow), or "AI offline" (red) depending on the detection state.

Production Deployment Notes

If you plan to deploy SnapCam to a live server, make the following changes in snapcam/settings.py:

  1. Set DEBUG = False
  2. Set SECRET_KEY from an environment variable
  3. Add your domain to ALLOWED_HOSTS
  4. Switch from SQLite3 to PostgreSQL or MySQL
  5. Configure static file serving with WhiteNoise or Nginx
  6. Set up HTTPS (mandatory for browser camera access in production)

Need Help?

If you face any issues during installation or setup, CodeAj offers a Project Setup + Source Code Explanation service. Our team will set up the project on your machine, walk you through the entire codebase, and make sure everything runs correctly before your submission. Visit CodeAj Project Setup or contact us through our contact page.

Need Help?

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

Chat with Us
Chat with us