VisionFlow is a production-ready platform for AI-powered video generation and automated quality assessment. Built with modern microservices architecture, it provides enterprise-grade video generation capabilities with comprehensive evaluation and monitoring.
- WAN 2.1 Integration: State-of-the-art video generation using multimodal AI models
- Multi-Quality Output: Support for low, medium, high, and ultra quality settings
- Batch Processing: Efficient handling of multiple video generation requests
- Progress Tracking: Real-time monitoring of generation progress
- 6-Dimensional Quality Assessment: Technical, Content, Aesthetic, UX, Performance, and Compliance metrics
- Multi-Agent Orchestration: Intelligent routing and processing using enhanced multi-agent systems
- Statistical Analysis: Comprehensive scoring with confidence intervals
- Continuous Learning: Adaptive evaluation strategies based on performance data
- Kubernetes Deployment: Scalable, production-ready deployment
- Monitoring & Observability: Prometheus metrics, Grafana dashboards, and comprehensive logging
- Distributed Processing: Celery-based task queue with horizontal scaling
- Persistent Storage: PostgreSQL for metadata, Redis for caching, MinIO for media storage
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β API Gateway β β Video Generationβ β Evaluation β
β (FastAPI) βββββΊβ Service βββββΊβ Orchestrator β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Monitoring β β Task Queue β β Storage Layer β
β (Prometheus) β β (Celery) β β (PostgreSQL) β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend API β β AI Services β
β (Flutter) βββββΊβ (FastAPI) βββββΊβ (WAN 2.1) β
β β β β β (Gemini Pro) β
β β’ Dashboard β β β’ Request β β β’ Video Gen β
β β’ Monitoring β β Validation β β β’ Evaluation β
β β’ Results View β β β’ Job Queue β β β’ Analysis β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Orchestration β β Task Queue β β Storage β
β (Multi-Agent) β β (Celery) β β (PostgreSQL) β
β β β β β (MinIO) β
β β’ Job Routing β β β’ Async β β β’ Metadata β
β β’ Load Balance β β Processing β β β’ Media Files β
β β’ Failover β β β’ Worker Pool β β β’ Results β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
- API Gateway: FastAPI-based REST API with comprehensive endpoints
- Database Layer: PostgreSQL with SQLAlchemy ORM and migrations
- Caching System: Redis integration for performance optimization
- Task Queue: Celery-based distributed task processing
- Containerization: Docker and Docker Compose for all services
- Kubernetes Deployment: Complete K8s manifests and Helm charts
- WAN 2.1 Integration: Full integration with state-of-the-art video model
- Quality Settings: Support for multiple quality levels (low, medium, high, ultra)
- Batch Processing: Efficient handling of multiple generation requests
- Progress Tracking: Real-time job status and progress monitoring
- Resource Management: GPU memory optimization and CPU offloading
- Multi-Agent Orchestration: Intelligent routing and processing
- Quality Metrics: 6-dimensional assessment framework
- Statistical Analysis: Confidence intervals and scoring algorithms
- Benchmark Integration: Industry-standard evaluation criteria
- Continuous Learning: Adaptive evaluation strategies
- Metrics Collection: Prometheus integration with custom metrics
- Dashboard: Grafana dashboards for real-time monitoring
- Logging: Structured logging with correlation IDs
- Health Checks: Comprehensive health monitoring endpoints
- Alerting: Configurable alerting rules and notifications
- Status: Partially implemented, needs completion
- Current State: Basic framework exists, training pipeline incomplete
- Priority: Medium - requires ML pipeline completion
- Estimated Completion: 2-3 weeks
- Status: Basic implementation, needs enhancement
- Current State: Core metrics collection working
- Priority: Low - functional but could be enhanced
- Estimated Completion: 1-2 weeks
- Status: Ongoing optimization
- Current State: Good baseline performance
- Priority: Medium - continuous improvement
- Estimated Completion: Ongoing
- Status: Planned for next sprint
- Description: Support for additional video generation models
- Priority: High - increases platform flexibility
- Estimated Start: Next sprint
- Status: Design phase
- Description: Complex workflow orchestration with conditional logic
- Priority: Medium - enhances automation capabilities
- Estimated Start: Q4 2025
- Backend: Python 3.10+, FastAPI, Celery
- AI Models: WAN 2.1, Gemini Pro Vision, CLIP
- Databases: PostgreSQL, Redis
- Storage: MinIO, Google Cloud Storage
- Orchestration: Kubernetes, Docker
- Monitoring: Prometheus, Grafana
- MLOps: MLflow, GCP Vertex AI
- Python 3.10 or higher
- Docker and Docker Compose
- Kubernetes cluster (for production deployment)
- Google Cloud Platform account (for GCP services)
- NVIDIA GPU with CUDA support (for local video generation)
VisionFlow uses organized optional dependencies managed through pyproject.toml. Install additional features as needed:
# For ML evaluation features
pip install visionflow[ml_evaluation]
# For production deployment
pip install visionflow[production]
# For LLaVA model support
pip install visionflow[llava]
# For monitoring (Grafana/Prometheus)
pip install visionflow[monitoring]
# For Google Cloud integration
pip install visionflow[gcp]
# For development and testing
pip install visionflow[dev]
# For all optional dependencies
pip install visionflow[all]VisionFlow includes native pixi support for flexible environment management. Pixi provides isolated, reproducible environments with native feature composition.
Install Pixi:
curl -fsSL https://pixi.sh/install.sh | bashAvailable Pixi Environments:
# Development environment (default) with testing tools
pixi run --environment default test
# Production-only dependencies (no dev tools)
pixi shell --environment prod
# Production dependencies + test tools (same versions)
pixi run --environment prod-test test
# ML/AI evaluation environment
pixi run --environment ml python scripts/evaluate_large_scale_dataset.py
# LLaVA model support environment
pixi run --environment llava python
# Monitoring tools environment
pixi run --environment monitoring python
# GCP integration environment
pixi run --environment gcp python
# Full environment with all optional features
pixi run --environment full testAvailable Tasks in Environments:
# Run tests
pixi run test
# Run linting
pixi run lint
# Format code
pixi run format
# Build documentation
pixi run --environment docs build-docsInstall Dependencies for Specific Environment:
# Install default environment
pixi install
# Install specific environment
pixi install --environment prod
# Install all environments
pixi install --all-
Clone the repository
git clone https://github.com/Davz33/visionflow cd visionflow -
Set up environment variables
cp env.example .env.local # Edit .env.local with your configuration -
Install Python dependencies
pip install -r requirements.txt # For development pip install -r requirements_ml_evaluation.txt -
Start services with Docker Compose
docker-compose -f infra/docker/docker-compose.dev.yml up -d
-
Access the API
curl http://localhost:8000/health
-
Configure Kubernetes secrets
# Use the setup script to configure secrets cd infra/k8s/visionflow/k8s/ ./setup-secrets.sh # Or manually apply secrets kubectl apply -f secrets.yaml kubectl apply -f configmap.yaml
-
Deploy the application
# Deploy all components kubectl apply -f infra/k8s/visionflow/k8s/ # Verify deployment kubectl get pods -n visionflow kubectl get services -n visionflow
-
Access the services
# Port forward for local access kubectl port-forward -n visionflow svc/visionflow-api 8000:8000 kubectl port-forward -n visionflow svc/grafana 3000:3000
-
Build and run with Docker Compose
docker-compose -f infra/docker/visionflow/docker-compose.production.yml up -d
-
Or use individual Dockerfiles
# Build API service docker build -f infra/docker/visionflow/Dockerfile.api -t visionflow-api . # Run with proper environment docker run -d --name visionflow-api \ -p 8000:8000 \ --env-file .env.production \ visionflow-api
Key configuration options are available through environment variables:
# Database Configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=visionflow
DB_USER=visionflow
DB_PASSWORD=your_password
# Redis Configuration
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=your_redis_password
# Storage Configuration
STORAGE_ENDPOINT=localhost:9000
STORAGE_ACCESS_KEY=your_access_key
STORAGE_SECRET_KEY=your_secret_key
# Model Configuration
WAN_MODEL_PATH=multimodalart/wan2-1-fast
MODEL_DEVICE=auto
MAX_MEMORY_GB=8
# API Configuration
API_HOST=0.0.0.0
API_PORT=8000
LOG_LEVEL=infoThe platform uses Kubernetes ConfigMaps and Secrets for configuration management:
- ConfigMap: Non-sensitive configuration (hosts, ports, feature flags)
- Secrets: Sensitive data (passwords, API keys, service account credentials)
GET /health- Health checkGET /metrics- Prometheus metricsPOST /generate/video- Video generation requestPOST /evaluate/video- Video evaluation requestGET /jobs/{job_id}- Job status and resultsGET /metadata/video- Retrieve metadata for a video (e.g., duration, resolution, codec, from storage/DB)GET /analytics/summary- High-level analytics summary across jobs/generations (aggregated metrics)GET /generate/video/status/{generation_id}- Get current status and progress for a specific generation jobGET /generate/video/history- List historical generation jobs with basic metadata (timestamps, status)GET /generate/video/{generation_id}- Retrieve details and results (URLs, metadata) for a completed generationGET /models/status- Return model availability and health (which models are loaded, device usage)
curl -X POST "http://localhost:8000/generate/video" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A serene mountain landscape at sunset",
"quality": "high",
"duration": 10,
"resolution": "512x512"
}'curl -X POST "http://localhost:8000/evaluate/video" \
-H "Content-Type: application/json" \
-d '{
"video_path": "/path/to/video.mp4",
"evaluation_criteria": ["technical", "content", "aesthetic"]
}'Access the Grafana dashboard at http://localhost:3000 (default: admin/admin):
- Video Generation Metrics: Success rates, processing times, queue lengths
- Evaluation Metrics: Quality scores, confidence intervals, processing efficiency
- System Metrics: Resource utilization, API performance, error rates
video_generation_jobs_total- Total video generation requestsvideo_evaluation_duration_seconds- Evaluation processing timejob_queue_length- Current queue lengthsuccess_rate- Success rate by quality level
-
Database Connection Errors
- Verify PostgreSQL is running and accessible
- Check database credentials in environment variables
- Ensure database exists and migrations are applied
-
GPU Memory Issues
- Reduce
MAX_MEMORY_GBin configuration - Enable CPU offloading with
ENABLE_CPU_OFFLOAD=true - Use smaller model variants
- Reduce
-
Kubernetes Deployment Issues
- Check pod logs:
kubectl logs -n visionflow <pod-name> - Verify secrets and configmaps are properly applied
- Check resource limits and requests
- Check pod logs:
Logs are available in structured JSON format:
# View API logs
kubectl logs -n visionflow -l app=visionflow-api
# View worker logs
kubectl logs -n visionflow -l app=visionflow-worker# Install test dependencies
pip install -r requirements_ml_evaluation.txt
# Run tests
pytest visionflow/tests/
# Run with coverage
pytest --cov=src.visionflow visionflow/tests/Sample evaluation datasets are available in visionflow/evaluation_datasets/:
- Test Videos: Small sample videos for testing
- Evaluation Criteria: Comprehensive quality assessment criteria
- Benchmark Data: Industry-standard evaluation benchmarks
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
This project is licensed under the MIT License.
For technical support or questions:
- Check the troubleshooting section above
- Review the logs for error details
- Open an issue in the repository
- Contact davide_vitiello@outlook.com
VisionFlow - Transforming video creation through intelligent AI orchestration and automated quality assessment.