{"id":29550925,"url":"https://github.com/arasoul/face-recognition-streamlit","last_synced_at":"2026-04-02T18:52:38.837Z","repository":{"id":302940405,"uuid":"1013959645","full_name":"Arasoul/face-recognition-streamlit","owner":"Arasoul","description":"🎯 Neural Face Recognition Matrix - Professional AI-powered biometric identification system with real-time face detection, recognition, and cyberpunk-styled interfaces. Features both web (Streamlit) and desktop (Tkinter) applications with comprehensive training pipeline, Docker deployment, and CI/CD automation.","archived":false,"fork":false,"pushed_at":"2025-07-13T07:53:59.000Z","size":5874,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-13T08:29:09.851Z","etag":null,"topics":["ai","bioinformatics","computer-vision","deep-learning","face-recognition","facenet","gui","machine-learning","mtcnn","neural-network","open-source","opencv","pytorch","real-time","scikit-learn","streamlit","svm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Arasoul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-04T19:12:05.000Z","updated_at":"2025-07-13T07:54:02.000Z","dependencies_parsed_at":"2025-07-04T22:33:46.923Z","dependency_job_id":"84c460b7-6a67-4474-bb70-f5a2553dc062","html_url":"https://github.com/Arasoul/face-recognition-streamlit","commit_stats":null,"previous_names":["arasoul/face-recognition-streamlit"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Arasoul/face-recognition-streamlit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arasoul%2Fface-recognition-streamlit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arasoul%2Fface-recognition-streamlit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arasoul%2Fface-recognition-streamlit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arasoul%2Fface-recognition-streamlit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Arasoul","download_url":"https://codeload.github.com/Arasoul/face-recognition-streamlit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Arasoul%2Fface-recognition-streamlit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265697906,"owners_count":23813099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","bioinformatics","computer-vision","deep-learning","face-recognition","facenet","gui","machine-learning","mtcnn","neural-network","open-source","opencv","pytorch","real-time","scikit-learn","streamlit","svm"],"created_at":"2025-07-18T04:01:33.562Z","updated_at":"2025-12-30T22:07:10.015Z","avatar_url":"https://github.com/Arasoul.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🎯 Neural Face Recognition Matrix\n\nA sophisticated AI-powered face recognition system featuring both desktop and web interfaces. Built with PyTorch FaceNet, scikit-learn, and modern UI frameworks.\n\n## 🚀 Features\n\n### Desktop Application (final9.py)\n- 📷 **Real-time Webcam Recognition** - Live face detection with cyberpunk-styled interface\n- 🖼️ **Image Upload Analysis** - Single image processing with detailed results\n- 📁 **Batch Folder Processing** - Process multiple images with clustering analysis\n- ➕ **Face Registration System** - Register new identities with duplicate detection\n- 🎨 **Cyberpunk UI** - Modern dark theme with animated elements\n- 🧠 **Neural Network Visualization** - Real-time performance metrics and status\n- 🔄 **Advanced Clustering** - DBSCAN clustering for unknown face grouping\n- ⚡ **GPU Acceleration** - CUDA support for faster processing\n\n### Streamlit Web App (streamlit_app.py)\n- 🌐 **Web-based Interface** - Access via browser from anywhere\n- 📱 **Mobile Responsive** - Works on tablets and smartphones\n- ☁️ **Cloud Deployment Ready** - Deploy to Streamlit Cloud with one click\n- 🎯 **Real-time Camera** - Browser-based camera integration\n- 📊 **Interactive Results** - Plotly charts and metrics\n- 🚀 **Fast Loading** - Cached model loading for better performance\n\n## 🛠️ Installation\n\n### Prerequisites\n- Python 3.8 or higher\n- CUDA toolkit (optional, for GPU acceleration)\n- Webcam (for real-time recognition)\n\n### Setup\n```bash\n# Clone the repository\ngit clone https://github.com/Arasoul/face-recognition-streamlit.git\ncd face-recognition-streamlit\n\n# Install dependencies\npip install -r requirements.txt\n\n# For desktop app\npython final9.py\n\n# For web app\nstreamlit run streamlit_app.py\n```\n\n## 🎮 Usage\n\n### Desktop Application\n1. **Launch**: Run `python final9.py`\n2. **Register Faces**: Click \"Register Face\" to add new people\n3. **Start Camera**: Click \"Start Camera\" for real-time recognition\n4. **Upload Images**: Use \"Upload Image\" for single image analysis\n5. **Process Folders**: Use \"Process Folder\" for batch processing\n\n### Web Application\n1. **Launch**: Run `streamlit run streamlit_app.py`\n2. **Select Mode**: Choose from sidebar options\n3. **Camera**: Allow browser camera permissions\n4. **Upload**: Drag and drop images for analysis\n5. **Results**: View interactive detection results\n\n## 🧠 Model Architecture\n\n### Face Detection\n- **MTCNN**: Multi-task CNN for robust face detection\n- **Confidence Threshold**: 90% minimum confidence for face detection\n- **Multi-scale Detection**: Handles various face sizes\n\n### Face Recognition\n- **FaceNet**: InceptionResNetV1 pre-trained on VGGFace2\n- **Embedding Size**: 512-dimensional face embeddings\n- **SVM Classifier**: Support Vector Machine for identity classification\n- **Cosine Similarity**: For duplicate detection and clustering\n\n### Training Pipeline\n1. Face detection using MTCNN\n2. Face alignment and normalization\n3. Feature extraction with FaceNet\n4. L2 normalization of embeddings\n5. SVM training with cross-validation\n6. Model serialization with joblib\n\n## 📁 Project Structure\n\n```\nface-recognition-streamlit/\n├── final9.py                 # Desktop application with GUI\n├── streamlit_app.py          # Web application\n├── requirements.txt          # Python dependencies\n├── README.md                 # This file\n├── .gitignore               # Git ignore rules\n├── .streamlit/              # Streamlit configuration\n│   └── config.toml\n├── models/                  # Trained model files\n│   ├── svm_model.pkl       # SVM classifier\n│   ├── label_encoder.pkl   # Label encoder\n│   ├── embeddings.npy      # Face embeddings\n│   └── labels.npy          # Corresponding labels\n└── images dataset/          # Training images directory\n    ├── person1/\n    ├── person2/\n    └── ...\n```\n\n## 🚀 Deployment\n\n### Streamlit Cloud (Recommended)\n1. Push code to GitHub\n2. Visit [share.streamlit.io](https://share.streamlit.io)\n3. Connect your repository\n4. Deploy with one click!\n\n### Local Development\n```bash\n# Install dependencies\npip install -r requirements.txt\n\n# Run desktop app\npython final9.py\n\n# Run web app\nstreamlit run streamlit_app.py\n```\n\n### Docker Deployment\n```bash\n# Build Docker image\ndocker build -t face-recognition .\n\n# Run container\ndocker run -p 8501:8501 face-recognition\n```\n\n## 🔧 Configuration\n\n### Model Parameters\n- **Image Size**: 160x160 pixels for face extraction\n- **Margin**: 20 pixels around detected faces\n- **Confidence Threshold**: 40% for identity classification\n- **Duplicate Threshold**: 75% cosine similarity\n\n### Performance Optimization\n- **Frame Skipping**: Process every 3rd frame for real-time performance\n- **Model Caching**: Streamlit caching for faster load times\n- **GPU Acceleration**: Automatic CUDA detection and usage\n- **Memory Management**: Efficient queue handling for camera processing\n\n## 🛡️ Security \u0026 Privacy\n\n- **Local Processing**: All face recognition happens locally\n- **No Data Collection**: No personal data is stored or transmitted\n- **Secure Models**: Encrypted model files (optional)\n- **Privacy First**: Camera access only when explicitly granted\n\n## 🔍 Troubleshooting\n\n### Common Issues\n\n#### Camera Not Working\n- **Desktop**: Check camera permissions and drivers\n- **Web**: Ensure HTTPS connection for camera access\n- **Alternative**: Use file upload instead of camera\n\n#### Model Loading Errors\n- Ensure all model files are present in the project directory\n- Check file permissions and paths\n- Verify model file integrity\n\n#### Performance Issues\n- **GPU**: Install CUDA for better performance\n- **Memory**: Reduce image resolution for large batches\n- **CPU**: Use frame skipping for real-time processing\n\n#### Dependencies\n```bash\n# Update dependencies\npip install --upgrade -r requirements.txt\n\n# Clear cache (Streamlit)\nstreamlit cache clear\n```\n\n## 📊 Performance Metrics\n\n### Accuracy\n- **Face Detection**: 95%+ accuracy with MTCNN\n- **Face Recognition**: 90%+ accuracy on good quality images\n- **Duplicate Detection**: 98%+ precision with cosine similarity\n\n### Speed\n- **Desktop**: 15-30 FPS real-time processing (GPU)\n- **Web**: 5-10 FPS browser-based processing\n- **Batch**: 1-3 images per second (depends on image size)\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- [FaceNet](https://github.com/timesler/facenet-pytorch) - Face recognition models\n- [Streamlit](https://streamlit.io) - Web application framework\n- [PyTorch](https://pytorch.org) - Deep learning framework\n- [OpenCV](https://opencv.org) - Computer vision library\n\n## 📞 Support\n\n- **Issues**: [GitHub Issues](https://github.com/Arasoul/face-recognition-streamlit/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/Arasoul/face-recognition-streamlit/discussions)\n- **Email**: [Your Email Here]\n\n## 🔄 Version History\n\n### v3.0.0 (Current)\n- ✨ Enhanced desktop application with cyberpunk UI\n- 🌐 New Streamlit web interface\n- 🧠 Improved neural network architecture\n- 📊 Real-time performance metrics\n- 🔄 Advanced clustering algorithms\n- ⚡ GPU acceleration support\n\n### v2.0.0\n- 🎯 Basic Streamlit implementation\n- 📷 Camera integration\n- 🖼️ Image upload functionality\n\n### v1.0.0\n- 🚀 Initial release\n- 👤 Basic face recognition\n- 🖥️ Desktop GUI with Tkinter\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003e\u003cstrong\u003e🎯 Neural Face Recognition Matrix | Built with ❤️ and AI\u003c/strong\u003e\u003c/p\u003e\n  \u003cp\u003e⚡ Powered by PyTorch • 🧠 Enhanced by Neural Networks • 🚀 Deployed with Streamlit\u003c/p\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farasoul%2Fface-recognition-streamlit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farasoul%2Fface-recognition-streamlit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farasoul%2Fface-recognition-streamlit/lists"}