Skip to content

danielgavrila2/Video-Emotion-SaaS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ₯ Video Emotion SaaS

A production-grade Software-as-a-Service (SaaS) platform that serves your Video Emotion Recognition AI model through an intuitive web interface and secure REST API.
Users can upload videos, analyze emotions and sentiments, and access insights both visually and programmatically.


🧠 About

Video Emotion SaaS transforms your trained deep learning model into a full cloud-based service.
It combines a modern web UI, scalable backend, and API integration to make emotion recognition accessible, interactive, and developer-friendly.

Built with AWS SageMaker, Amazon S3, FastAPI, and React, it represents the production layer of the Video Emotion Project.


πŸ“Έ UI Snapshots

Dashboard & Inference View

Dashboard

Registration Page

Sign Up


πŸ—οΈ Architecture Overview

[Frontend UI]  β†’  [API Gateway / FastAPI Backend]  β†’  [AWS SageMaker Endpoint]
         β†˜                   ↕
         [Auth Service]    [Task Queue / Worker]
                            ↕
                     [S3 Storage / Database]

Core Components

Layer Description
Frontend Built with React, it provides video uploads, visual analytics, and real-time emotion timelines
Backend (FastAPI) Exposes REST APIs, manages authentication, and orchestrates inference requests
Worker Handles background processing and asynchronous tasks
Model Endpoint Hosted on AWS SageMaker, providing emotion recognition via API calls
Storage Videos and results stored securely on AWS S3
Database Manages users, job tracking, and analytics summaries
Auth JWT and OAuth2-based secure authentication

✨ Features

  • 🎞️ Upload and process videos through a clean, modern UI
  • πŸ” User authentication and secure API key management
  • βš™οΈ Asynchronous video processing via task queues
  • πŸ“Š Emotion and sentiment visualization dashboard
  • 🧾 REST API for developers and integrations
  • ☁️ AWS-based scalable architecture
  • 🧠 Powered by deep learning (CNN + LSTM model) via SageMaker

🧰 Technologies Used

Category Technology Description
Frontend React / TypeScript User dashboard and upload interface
Backend FastAPI / Python REST API and inference orchestration
AI Model AWS SageMaker Deployed emotion detection model
Storage AWS S3 Persistent storage for videos and analysis data
Database PostgreSQL / DynamoDB Job management and analytics
Queue / Worker Celery / Redis Background task processing
Auth JWT / OAuth2 Secure authentication and user sessions
Deployment Docker / ECS / CI/CD Scalable deployment workflow
Monitoring CloudWatch / Grafana System monitoring and alerts

πŸš€ Setup & Usage

1️⃣ Prerequisites

  • AWS account with S3 and SageMaker access
  • Python 3.8+
  • Docker (optional)
  • .env configuration file

2️⃣ Clone & Install

git clone https://github.com/danielgavrila2/Video-Emotion-SaaS.git
cd Video-Emotion-SaaS
pip install -r requirements.txt

3️⃣ Configure Environment

Create a .env file with:

MODEL_ENDPOINT_URL=https://<your-sagemaker-endpoint>
S3_BUCKET=your-bucket-name
DATABASE_URL=postgresql://user:pass@host:port/db
SECRET_KEY=supersecretkey
AWS_REGION=us-east-1

4️⃣ Run Locally

uvicorn app.main:app --reload --port 8000

Frontend (if separate):

cd frontend && npm install && npm start

πŸ”— API Reference

Method Endpoint Description
POST /api/v1/predict Upload a video for emotion inference
GET /api/v1/jobs/{job_id} Retrieve prediction results
POST /api/v1/register Create new user account
POST /api/v1/login Authenticate and obtain JWT token
GET /api/v1/users/me Get user profile information

Example Request

curl -X POST "http://localhost:8000/api/v1/predict"   -H "Authorization: Bearer <token>"   -F "video=@/path/to/video.mp4"

Response:

{
  "job_id": "12345",
  "status": "processing"
}

☁️ Deployment

Deploy using Docker or AWS ECS:

docker-compose up --build

Example Docker Compose snippet:

version: "3"
services:
  backend:
    build: ./backend
    ports:
      - "8000:8000"
    env_file: .env
  frontend:
    build: ./frontend
    ports:
      - "3000:3000"

For production, integrate with:

  • AWS ECS or EKS for scalability
  • AWS CloudWatch for monitoring
  • GitHub Actions for CI/CD automation

πŸ”’ Security

  • Encrypted communication (HTTPS)
  • JWT-based authentication
  • Role-based access (User/Admin)
  • File validation for uploads
  • Quota & rate limiting per user
  • Logging and audit trails

πŸ“ˆ Future Enhancements

  • Real-time inference feedback
  • Advanced analytics dashboard
  • Multi-model support (emotion + sentiment + tone)
  • Subscription-based billing integration
  • Model version management

🀝 Contributing

Contributions are welcome!

  1. Fork this repo
  2. Create a branch: feature/your-feature
  3. Commit and push your changes
  4. Open a Pull Request

πŸ“œ License

Released under the MIT License.
Β© 2025 Daniel Gavrila. All rights reserved.


🧩 Repository Links

About

The SaaS application for the Video Emotion Sentiment Analysis

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors