Skip to main content

Installation Guide

This page provides detailed installation instructions for Visage.

System Requirements

  • Python: 3.9 or higher
  • Node.js: 18 or higher
  • RAM: At least 4GB available
  • Storage: 2GB for models and dependencies
  • Webcam: Any USB or built-in webcam

Backend Installation

1. Create Virtual Environment

cd backend
python -m venv venv

2. Activate Virtual Environment

Windows:

venv\Scripts\activate

macOS/Linux:

source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Initialize Database

python ../scripts/setup_db.py

Frontend Installation

1. Navigate to Frontend Directory

cd frontend

2. Install Dependencies

npm install

Configuration

Create a .env file in the backend directory:

# Backend Configuration
BACKEND_HOST=0.0.0.0
BACKEND_PORT=8000
DATABASE_PATH=../data/visage.db

# Model Configuration
FACE_MODEL=Facenet
DETECTION_BACKEND=opencv
MATCH_THRESHOLD=0.6

# WebSocket Configuration
WS_HEARTBEAT_INTERVAL=30

Running the Application

Start Backend

cd backend
source venv/bin/activate # or venv\Scripts\activate on Windows
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000

Start Frontend

cd frontend
npm run dev

Verification

Test the installation:

curl http://localhost:8000/api/v1/health

You should see:

{
"status": "healthy",
"service": "visage",
"version": "1.0.0"
}

Next Steps