Spaces:
Sleeping
MorphGuard Documentation Index
Complete guide to MorphGuard documentation and resources.
π Getting Started
New to MorphGuard? Start here:
- README.md - Project overview and main documentation
- GETTING_STARTED.md - Consolidated Setup & Workflow Guide
- docs_archive/QUICKSTART.md - Quick Start Guide (Archived)
π¦ Installation & Setup
Setting up your development environment:
- GETTING_STARTED.md - Master Setup Guide
- docs_archive/SETUP_GUIDE.md - Storage Setup/Migration Guide (Archived)
- setup_conda_environment.sh - Automated Conda setup script
- PYTORCH_DEPLOYMENT_GUIDE.md - PyTorch with CUDA setup
- BETA_DEPLOYMENT_GUIDE.md - Production deployment guide
Configuration Files:
.env.development- Development environment variables.env.production- Production environment variables
π§ System Components
Core Application
- app.py - Main Flask application
- start.sh - Server startup script
- COMPLETE_APPLICATION_WORKFLOW.md - Application workflow
Models & AI
Detection Systems:
- src/models/morph_detector.py - M2TR Vision Transformer
- src/deepfake/deepfake_detector.py - XceptionNet deepfake detector
- src/models/demorpher_model.py - pSp GAN demorpher
- src/models/identity_verifier.py - ArcFace verifier
Documentation:
- MorphGuard.md - Model architecture details
- Research.md - Research papers and references
API & Integration
- src/README_RESILIENT_API.md - Resilient API design
- src/README_API_UTILS.md - API utility functions
- INTEGRATE_AXI.md - AXI integration guide
Blockchain
- src/blockchain/ - Ethereum smart contract integration
- Verification logging and immutable audit trails
Adversarial Defense
- src/adversarial/ - Adversarial attack defense
- FGSM, PGD, C&W attack protection
π Monitoring & Analytics
Real-time Monitoring:
- GRAFANA_SETUP_COMPLETE.md - Grafana dashboard setup
- configure_grafana_embed.sh - Enable dashboard embedding
- scripts/setup_timescaledb.py - TimescaleDB initialization
Metrics & Dashboards:
- GPU utilization and temperature monitoring
- Detection confidence tracking
- Training progress visualization
- System resource monitoring
π¨ User Interface
Web Templates:
- templates/setup-improved.html - Setup & training interface
- templates/enhanced-ui.html - Enhanced demo interface
- templates/index.html - Main landing page
UI/UX Documentation:
- UI_SPACING_FIXES.md - Recent UI improvements
- INTERFACE_STRATEGY.md - Interface design strategy
- static/css/design-tokens.css - Design system
ποΈ Training & Evaluation
Training Scripts:
- scripts/train_detector.py - Train morph detector
- scripts/train_demorpher.py - Train demorpher
- scripts/evaluate_model.py - Model evaluation
Training Guides:
- Custom model training
- Hyperparameter tuning
- Transfer learning
- Dataset preparation
π Advanced Topics
System Architecture:
- COMPREHENSIVE_SYSTEM_ASSESSMENT.md - System analysis
- SETUP_ANALYSIS_REPORT.md - Setup analysis
Advanced Features:
- ADVANCED_FEATURES_SUMMARY.md - Advanced capabilities
- COMPLIANCE_IMPLEMENTATION_SUMMARY.md - GDPR/CCPA compliance
- ENHANCED_SETUP_IMPLEMENTATION.md - Enhanced setup features
π Specialized Components
pSp Demorpher
- pSp/README.md - pixel2style2pixel encoder documentation
- StyleGAN2 integration
- Demorphing pipeline
Data Cleaning
- Cleaning/README.md - Data preprocessing scripts
- Dataset cleaning utilities
- Quality assurance
π Troubleshooting
Common Issues:
Server Won't Start
- Check docs_archive/QUICKSTART.md Section 7 (Troubleshooting)
- Verify GPU availability:
nvidia-smi - Check port conflicts:
lsof -i :5000
CUDA Out of Memory
- Close other GPU applications
- Reduce batch size in config
- Enable mixed precision
Database Connection Failed
- Check PostgreSQL:
sudo systemctl status postgresql - Run setup:
python scripts/setup_timescaledb.py
- Check PostgreSQL:
Models Not Loading
- Verify model files:
ls -lh models/ - Check PyTorch:
python -c "import torch; print(torch.cuda.is_available())"
- Verify model files:
π API Reference
Endpoint Documentation:
Detection Endpoints
# Morph detection
POST /api/detect
POST /api/detect/heatmap
# Deepfake detection
POST /api/detect/deepfake
POST /api/detect/deepfake/heatmap
# Combined detection
POST /api/detect/comprehensive
Training Endpoints
# Start training
POST /api/train/detector
POST /api/train/demorpher
# Monitor training
GET /api/train/status
GET /api/train/metrics
System Endpoints
# Health check
GET /api/health
# Device info
GET /api/devices/cpu
GET /api/devices/gpu
# Metrics
GET /api/metrics/recent
π Security & Compliance
Security Features:
- COMPLIANCE_IMPLEMENTATION_SUMMARY.md
- User authentication and authorization
- API rate limiting
- Input validation and sanitization
- Adversarial attack defense
Privacy:
- GDPR compliance
- CCPA compliance
- Data retention policies
- Audit logging
π§ͺ Testing
Test Files:
- Unit tests for models
- Integration tests for API
- Performance benchmarks
- Adversarial robustness tests
# Run all tests
pytest tests/
# Run specific test suite
pytest tests/test_detector.py
# Run with coverage
pytest --cov=src tests/
π¦ Dependencies
Core Dependencies:
- PyTorch 2.6+ (CUDA 12.8)
- Flask 2.3+
- TimescaleDB 2.x
- Grafana 10.x
- PostgreSQL 15+
Python Packages:
See requirements.txt and environment.yml
π Deployment
Production Deployment:
- BETA_DEPLOYMENT_GUIDE.md - Complete deployment guide
- Docker containerization
- NGINX reverse proxy
- SSL/TLS configuration
- Load balancing
- Auto-scaling
π Version History
Latest Updates:
- v2.3.0 - Added deepfake detection (XceptionNet)
- v2.2.0 - Live Grafana dashboards
- v2.1.0 - UI/UX improvements
- v2.0.0 - Blockchain integration
See CHANGELOG.md for full history.
π€ Contributing
How to Contribute:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Guidelines:
- Follow PEP 8 style guide
- Write unit tests
- Update documentation
- Add docstrings
π§ Support & Community
Get Help:
- GitHub Issues: Report bugs
- GitHub Discussions: Ask questions
- Email: support@morphguard.ai
- Documentation: This index!
π Quick Reference
Most Common Tasks:
| Task | Command/File |
|---|---|
| Start server | ./start.sh |
| Stop server | pkill -f "python.*app.py" |
| Setup environment | sudo ./setup_conda_environment.sh |
| Train detector | python scripts/train_detector.py |
| Test API | curl http://localhost:5000/api/health |
| View logs | tail -f nohup.out |
| Check GPU | nvidia-smi |
| Configure Grafana | ./configure_grafana_embed.sh |
π External Resources
Research Papers:
- M2TR: Morphing Detection Transformers
- pSp: Encoding in Style
- XceptionNet: Depthwise Separable Convolutions
- ArcFace: Additive Angular Margin Loss
Useful Links:
- PyTorch Documentation
- TimescaleDB Documentation
- Grafana Documentation
- Flask Documentation
πΊοΈ Documentation Roadmap
Planned Documentation:
- Detailed API reference
- Training tutorial with examples
- Deployment best practices
- Performance optimization guide
- Security hardening guide
- Video processing guide
- Batch processing guide
Last Updated: 2025-11-23 Documentation Version: 2.3.0
For the most up-to-date information, always refer to the latest version in the repository.