AI-Powered Photo Management & Face Recognition Desktop Application
Organize β’ Detect β’ Recognize β’ Cluster β’ Explore
Overview β’ Features β’ Technology β’ Screenshots β’ Installation β’ Usage
SmartPhotoVision is an intelligent desktop photo management application designed to make large photo collections easier to organize, analyze, and explore.
The application combines Artificial Intelligence, Computer Vision, Face Detection, Face Recognition, Face Clustering, and SQLite database management into a single desktop interface.
Instead of manually searching through hundreds or thousands of images, SmartPhotoVision analyzes photographs and helps organize them according to the people detected in the images.
- π Scans photo folders recursively
- π€ Detects human faces using YuNet
- π§ Generates face embeddings using SFace
- π§© Groups similar faces into personas
- ποΈ Stores photo and face information in SQLite
- πΌοΈ Supports multiple common image formats
- π Handles photo metadata such as date and GPS information
- β‘ Processes photo collections in the background
- π₯οΈ Provides a modern desktop interface using PySide6
- π Supports face reclustering for improved organization
| Feature | Description |
|---|---|
| π Recursive Scanning | Automatically searches folders and subfolders for images |
| π€ Face Detection | Detects faces using OpenCV YuNet |
| π§ Face Recognition | Creates face embeddings using OpenCV SFace |
| π§© Face Clustering | Groups visually similar faces into personas |
| ποΈ SQLite Database | Stores photos, faces, persons, and tags |
| πΌοΈ Multiple Formats | Supports JPG, JPEG, PNG, WEBP, BMP, TIFF and more |
| π Photo Metadata | Reads available EXIF date and GPS information |
| β‘ Background Processing | Performs analysis without freezing the interface |
| π¨ Modern GUI | Built with PySide6 and a customized application theme |
| π‘οΈ Error Handling | Logging and exception handling help diagnose application issues |
SmartPhotoVision follows a multi-stage analysis pipeline:
π Photo Folder
β
βΌ
π Recursive Scanning
β
βΌ
πΌοΈ Image Loading
β
βΌ
π€ YuNet Detection
β
βΌ
π§ SFace Embedding
β
βΌ
π Face Comparison
β
βΌ
π§© Face Clustering
β
βΌ
π₯ Personas
β
βΌ
ποΈ SQLite Storage
β
βΌ
π₯οΈ Desktop GUI
The project uses two OpenCV ONNX models:
Face Detection
βββ face_detection_yunet_2023mar.onnx
Used to locate faces inside photographs.
models/ βββ face_recognition_sface_2021dec.onnx
Used to generate face embeddings and compare detected faces.
SmartPhotoVision/
β
βββ π main.py
β
βββ π§ analyzer.py
β
βββ ποΈ database.py
β
βββ π οΈ paths.py
β
βββ π€ models/
β βββ face_detection_yunet_2023mar.onnx
β βββ face_recognition_sface_2021dec.onnx
β
βββ π₯οΈ gui/
β βββ window.py
β βββ theme.py
β
βββ π README.md
---
Component Responsibility main.py Application startup and configuration analyzer.py Photo scanning, face detection, recognition and clustering database.py SQLite database and data persistence paths.py Application and resource path management gui/ Desktop user interface and visual styling models/ AI models used for face analysis
π Python π₯οΈ PySide6 ποΈ OpenCV π’ NumPy ποΈ SQLite Artificial Intelligence π€ YuNet Face Detector π§ SFace Face Recognition π§© Face Embeddings π Similarity Matching π Face Clustering
Visual Studio Code Git GitHub Python Virtual Environment
π§ AI π€ Face Analysis ποΈ Storage π₯οΈ Interface YuNet + SFace Detection + Recognition SQLite PySide6
π·οΈ Project SmartPhotoVision π¦ Application Type Desktop Application π Language Python π₯οΈ GUI Framework PySide6 ποΈ Computer Vision OpenCV ποΈ Database SQLite π€ AI Models YuNet + SFace π’ Version 1.0.4 πΈ Screenshots
Real application screenshots are provided below as proof of the working output.
Main SmartPhotoVision desktop interface.
Photo scanning and AI-powered face analysis.
Detected faces within the analyzed photographs.
Detected faces organized into personas based on similarity.
Organized photo collection inside the application.
To display your actual screenshots on GitHub, create:
screenshots/
β
βββ main-window.png
βββ photo-analysis.png
βββ face-detection.png
βββ personas.png
βββ photo-library.png
Then replace the example images above with your actual screenshots.
1οΈβ£ Clone the Repository git clone https://github.com/your-username/SmartPhotoVision.git cd SmartPhotoVision
2οΈβ£ Create a Virtual Environment Windows python -m venv venv venv\Scripts\activate Linux / macOS python3 -m venv venv source venv/bin/activate
3οΈβ£ Install Dependencies pip install -r requirements.txt
Start SmartPhotoVision with:
python main.py
The application will initialize the database and launch the desktop interface.
Step 1 β Launch
Run:
python main.py Step 2 β Select Photo Folder
Choose the directory containing your photographs.
Step 3 β Analyze
Start the photo analysis process.
SmartPhotoVision will:
π Scan Images
β
π€ Detect Faces
β
π§ Generate Embeddings
β
π Compare Faces
β
π§© Cluster Similar Faces
β
ποΈ Save Results
Step 4 β Explore
Use the application interface to explore the analyzed photographs and detected personas.
SmartPhotoVision uses SQLite to maintain persistent application data.
Main Tables
photos
β
βββ Photo information
βββ Filename
βββ Dimensions
βββ Modification time
βββ Taken-at metadata
βββ GPS information
persons
β
βββ Person ID
βββ Person Name
faces
β
βββ Photo reference
βββ Person reference
βββ Bounding box
βββ Detection score
βββ Face embedding
βββ Pin status
tags
β
βββ Photo categorization
photo_tags
β
βββ Photo β Tag relationships
SmartPhotoVision is designed as a local desktop application.
Photo analysis and application data are handled locally through the application's processing and SQLite storage components.
No cloud photo-upload workflow is required for the core analysis pipeline.
Always review the project's actual configuration and dependencies before using it with sensitive photo collections.
The application is designed to process photo collections efficiently by:
π Processing images in the background
π Resizing very large images before analysis
π§ Limiting stored embeddings per persona
π§© Using similarity-based clustering
πΎ Persisting analysis results in SQLite
π Supporting analysis cancellation
π Providing logging and error handling
π Supported Image Formats
SmartPhotoVision supports:
.jpg
.jpeg
.png
.webp
.bmp
.tif
.tiff
Face detection and recognition are integrated directly into the application workflow.
OpenCV provides the underlying computer-vision capabilities for detecting and analyzing faces.
SQLite provides structured persistence for photographs, detected faces, personas, and tags.
PySide6 provides the graphical interface and application experience.
Face similarity and clustering allow photographs to be organized around detected people.
Potential future development areas include:
π Multi-language interface
π± Companion mobile application
π Advanced semantic photo search
π·οΈ Automatic image tagging
π§ Improved face clustering
π₯ Better person management
π Collection analytics dashboard
β‘ GPU acceleration
π€ Export and backup functionality
π― Advanced search and filtering
π€ Contributing
Contributions, suggestions, and improvements are welcome.
Contribution Workflow
Fork
β
Create Branch
β
Make Changes
β
Test
β
Commit
β
Pull Request
Please ensure that proposed changes are tested before submitting a pull request.
Add your preferred open-source license here.
For example:
MIT License
If you find SmartPhotoVision useful or interesting:
MS Computer Science Student Specialization in Artificial Intelligence
Institute of Management Sciences, Peshawar, Pakistan
I enjoy building complete software systemsβfrom networking and operating system concepts to backend architecture, machine learning, and distributed systems.
- π Degree / Field: MS in Computer Science (Specialization in Artificial Intelligence)
- π Achievements: Designed and executed 30+ machine learning and data visualization projects delivering actionable insights
- π― Focus Areas: Data Visualization, AI/ML, Big Data Mining
- π¬ Contact: shahidazam2020@gmail.com
WhatsApp: Chat on WhatsApp
For the README above, I recommend organizing the repository like this:
SmartPhotoVision/
β
βββ π main.py
βββ π analyzer.py
βββ π database.py
βββ π paths.py
βββ π requirements.txt
β
βββ π€ models/
β βββ face_detection_yunet_2023mar.onnx
β βββ face_recognition_sface_2021dec.onnx
β
βββ π₯οΈ gui/
β βββ window.py
β βββ theme.py
β
βββ πΈ screenshots/
β βββ main-window.png
β βββ photo-analysis.png
β βββ face-detection.png
β βββ personas.png
β βββ photo-library.png
β
βββ π README.md
If you find this repository useful for learning Machine Learning, consider giving it a β.
Your feedback, suggestions, and contributions are welcome.
π§ Learn Machine Learning β’ π» Build Models β’ π Analyze Data β’ π Create Projects
Made with β€οΈ for learning, experimentation, and continuous improvement.