Skip to content

About

SmartPhotoVision is an intelligent photo management application that uses AI-powered face detection, recognition, and clustering to organize personal photo collections. It automatically analyzes images, groups faces into personas, manages photo metadata, and provides a smart, efficient way to explore and organize your photos.

Resources

Stars

91 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

194 Commits

Folders and files

Repository files navigation

πŸ“Έ SmartPhotoVision

AI-Powered Photo Management & Face Recognition Desktop Application

Organize β€’ Detect β€’ Recognize β€’ Cluster β€’ Explore

Python PySide6 OpenCV SQLite AI

Overview β€’ Features β€’ Technology β€’ Screenshots β€’ Installation β€’ Usage


πŸš€ Overview

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.

🎯 What SmartPhotoVision Does

  • πŸ“‚ 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

✨ Key Features

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

🧠 AI & Computer Vision Pipeline

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


πŸ”¬ AI Models

The project uses two OpenCV ONNX models:

Face Detection

models/

└── face_detection_yunet_2023mar.onnx

Used to locate faces inside photographs.

Face Recognition

models/ └── face_recognition_sface_2021dec.onnx

Used to generate face embeddings and compare detected faces.


πŸ—οΈ Application Architecture

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

---

πŸ”Ή Core Components

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

πŸ› οΈ Technology Stack

Programming

🐍 Python πŸ–₯️ PySide6 πŸ‘οΈ OpenCV πŸ”’ NumPy πŸ—ƒοΈ SQLite Artificial Intelligence πŸ€– YuNet Face Detector 🧠 SFace Face Recognition 🧩 Face Embeddings πŸ”Ž Similarity Matching πŸ“Š Face Clustering

Development Tools

Visual Studio Code Git GitHub Python Virtual Environment


πŸ“Š Project Dashboard

🧠 AI πŸ‘€ Face Analysis πŸ—ƒοΈ Storage πŸ–₯️ Interface YuNet + SFace Detection + Recognition SQLite PySide6


πŸ“Œ Application Information

Property Value

🏷️ 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 Application

Main SmartPhotoVision desktop interface.

πŸ” Photo Analysis

Photo scanning and AI-powered face analysis.

πŸ‘€ Face Detection

Detected faces within the analyzed photographs.

🧩 Face Clustering / Personas

Detected faces organized into personas based on similarity.

πŸ—ƒοΈ Photo Organization

Organized photo collection inside the application.


πŸ“· Add Your Screenshots

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.

βš™οΈ Installation

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

▢️ Run the Application

Start SmartPhotoVision with:

python main.py

The application will initialize the database and launch the desktop interface.


πŸ“– Usage

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.


πŸ—ƒοΈ Database Structure

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

πŸ” Data & Privacy

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.

⚑ Performance & Processing

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

πŸ§ͺ Project Highlights

πŸ€– Artificial Intelligence

Face detection and recognition are integrated directly into the application workflow.

πŸ‘οΈ Computer Vision

OpenCV provides the underlying computer-vision capabilities for detecting and analyzing faces.

πŸ—ƒοΈ Database Engineering

SQLite provides structured persistence for photographs, detected faces, personas, and tags.

πŸ–₯️ Desktop Application Development

PySide6 provides the graphical interface and application experience.

🧩 Intelligent Organization

Face similarity and clustering allow photographs to be organized around detected people.


πŸ—ΊοΈ Future Improvements

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.


πŸ“œ License

Add your preferred open-source license here.

For example:

MIT License

⭐ Support the Project

If you find SmartPhotoVision useful or interesting:

⭐ Star the repository

🍴 Fork the project

πŸ› Report issues

πŸ’‘ Suggest improvements

🀝 Contribute


πŸ‘¨β€πŸ’» About Me

Shahid Azam

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

πŸ“ Recommended GitHub structure

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


🀝 Connect With Me


⭐ Support

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.

About

SmartPhotoVision is an intelligent photo management application that uses AI-powered face detection, recognition, and clustering to organize personal photo collections. It automatically analyzes images, groups faces into personas, manages photo metadata, and provides a smart, efficient way to explore and organize your photos.

Resources

Stars

91 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages