An AI-powered web application for automatically checking video compliance against regulatory guidelines using 100% open source models.
-
Video Content Extraction
- Frame extraction with scene change detection (OpenCV + FFmpeg)
- Audio transcription (Whisper - local)
- Visual analysis (LLaVA/BLIP-2 + YOLO v8)
- OCR text extraction (EasyOCR/PaddleOCR)
-
Semantic Vectorization
- Embedding generation (sentence-transformers)
- Vector search (Weaviate)
- Semantic matching against guidelines
-
Compliance Checking
- Guideline parsing and structuring (LangChain)
- Automated compliance analysis (Llama 3.1 via Ollama)
- Evidence-based violation detection (LangGraph agent)
- Interactive timeline reports
- FastAPI - Modern async web framework
- LangChain + LangGraph - AI orchestration
- Celery + Redis - Task queue for video processing
- PostgreSQL - Relational database
- MinIO - S3-compatible object storage
- Weaviate - Vector database
- Whisper - Audio transcription
- LLaVA 1.6/BLIP-2 - Vision-language understanding
- YOLO v8 - Object detection
- EasyOCR - Optical character recognition
- sentence-transformers - Text embeddings
- Llama 3.1 - Large language model (via Ollama)
- React + TypeScript - UI framework
- Vite - Build tool
- TailwindCSS - Styling
- React Query - Data fetching
- Minimum: 16GB RAM, 8GB VRAM GPU (RTX 3070, GTX 1080 Ti or better)
- Recommended: 32GB RAM, 16GB+ VRAM GPU (RTX 4080/4090, A4000)
- CPU: Multi-core processor (8+ cores recommended)
- Storage: 100GB+ free space (for models and video storage)
- Python 3.10+
- Node.js 18+
- Docker & Docker Compose
- NVIDIA CUDA 12.1+ (for GPU acceleration)
- FFmpeg
- Ollama (https://ollama.ai)
git clone <repository-url>
cd Regtech
cp .env.example .envEdit .env with your configuration.
# Install Ollama from https://ollama.ai
# Then pull the required model
ollama pull llama3.1:8bcd docker
docker-compose up -dThis starts:
- PostgreSQL (port 5433)
- Redis (port 6379)
- Weaviate (port 8080)
- MinIO (port 9000, console: 9001)
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run migrations
alembic upgrade head
# Start FastAPI server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000cd backend
source venv/bin/activate # On Windows: venv\Scripts\activate
celery -A app.tasks.celery_app worker --loglevel=infocd frontend
npm install
npm run devAccess the app at http://localhost:5173
-
Upload Guideline Document
- Go to Guidelines page
- Upload a PDF regulatory document
- System will parse and structure the requirements
-
Upload Video for Compliance Check
- Go to Video Upload page
- Drag and drop or select video file
- Monitor processing progress in real-time
-
Review Compliance Report
- View overall compliance status
- Interactive timeline showing violations at specific timestamps
- Click on violations to see evidence frames and guideline references
- Export report as PDF
# Backend tests
cd backend
pytest tests/ -v --cov=app
# Frontend tests
cd frontend
npm testRegtech/
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── api/ # API routes
│ │ ├── models/ # Database models
│ │ ├── services/ # Business logic
│ │ ├── langchain_components/ # LangChain chains & agents
│ │ └── tasks/ # Celery tasks
│ └── tests/
├── frontend/ # React frontend
│ └── src/
│ ├── components/
│ ├── pages/
│ └── services/
└── docker/ # Docker configuration
- API Costs: $0 per video
- Operational Costs: Electricity only (~$0.10-0.50 per video hour)
- API Costs: ~$10-23 per video hour
- OpenAI Whisper API: $0.36/hour
- GPT-4 Vision: $5-15/hour
- AWS Rekognition: $0.60/hour
- Google Cloud Vision: $1.50/hour
- OpenAI Embeddings: $0.10/hour
- Claude API: $2-5/hour
Savings: 100% of API costs eliminated!
- Video Processing: 5-10 minutes per hour of video
- Compliance Check: 2-5 minutes per guideline set
- Report Generation: < 30 seconds
- Concurrent Videos: 10+ (with 4 Celery workers)
This project is licensed under the MIT License. See the LICENSE file for details.
This is a personal/portfolio project. Issues and pull requests are welcome, but there's no formal contribution process in place yet. Feel free to open an issue to discuss a change before submitting a PR.
For issues and questions, please open a GitHub issue.