This commit introduces the AutoMatchPanel class into the Dashboard GUI, providing a fully integrated interface for automatic face matching. The new panel allows users to start the auto-match process, configure tolerance settings, and visually confirm matches between identified and unidentified faces. It includes features for bulk selection of matches, smart navigation through matched individuals, and a search filter for large databases. The README has been updated to reflect the new functionality and improvements in the auto-match workflow, enhancing the overall user experience in managing photo identifications.
20 KiB
PunimTag - Unified Photo Face Tagger
A powerful photo face recognition and tagging system with a modern unified dashboard interface. Designed for easy web migration with clean separation between navigation and functionality.
🎯 What's New: Unified Dashboard
PunimTag now features a unified dashboard interface that brings all functionality into a single, professional window:
- 📱 Single Window Interface - No more managing multiple windows
- 🖥️ Full Screen Mode - Automatically opens maximized for optimal viewing
- 📐 Responsive Design - All components adapt dynamically to window resizing
- 🎛️ Menu Bar Navigation - All features accessible from the top menu
- 🔄 Panel Switching - Seamless transitions between different functions
- 🌐 Web-Ready Architecture - Designed for easy migration to web application
- 📊 Status Updates - Real-time feedback on current operations
- 🎨 Enhanced Typography - Larger, more readable fonts optimized for full screen
📋 System Requirements
Minimum Requirements
- Python: 3.7 or higher
- Operating System: Linux, macOS, or Windows
- RAM: 2GB+ (4GB+ recommended for large photo collections)
- Storage: 100MB for application + space for photos and database
- Display: X11 display server (Linux) or equivalent for GUI interface
Supported Platforms
- ✅ Ubuntu/Debian (fully supported with automatic dependency installation)
- ✅ macOS (manual dependency installation required)
- ✅ Windows (with WSL or manual setup)
- ⚠️ Other Linux distributions (manual dependency installation required)
What Gets Installed Automatically (Ubuntu/Debian)
The setup script automatically installs these system packages:
- Build tools:
cmake,build-essential - Math libraries:
libopenblas-dev,liblapack-dev(for face recognition) - GUI libraries:
libx11-dev,libgtk-3-dev,libboost-python-dev - Image viewer:
feh(for face identification interface)
🚀 Quick Start
# 1. Setup (one time only)
git clone <your-repo>
cd PunimTag
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
python3 setup.py # Installs system deps + Python packages
# 2. Launch Unified Dashboard
python3 photo_tagger.py dashboard
# 3. Use the menu bar to access all features:
# 📁 Scan - Add photos to your collection (✅ Fully Functional)
# 🔍 Process - Detect faces in photos (✅ Fully Functional)
# 👤 Identify - Identify people in photos (✅ Fully Functional)
# 🔗 Auto-Match - Find matching faces automatically (✅ Fully Functional)
# 🔎 Search - Find photos by person name (✅ Fully Functional)
# ✏️ Modify - Edit face identifications (🚧 Coming Soon)
# 🏷️ Tags - Manage photo tags (🚧 Coming Soon)
📦 Installation
Automatic Setup (Recommended)
# Clone and setup
git clone <your-repo>
cd PunimTag
# Create virtual environment (IMPORTANT!)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Run setup script
python3 setup.py
⚠️ IMPORTANT: Always activate the virtual environment before running any commands:
source venv/bin/activate # Run this every time you open a new terminal
Manual Setup (Alternative)
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 photo_tagger.py stats # Creates database
🎛️ Unified Dashboard Interface
Launch the Dashboard
# Open the unified dashboard (RECOMMENDED)
python3 photo_tagger.py dashboard
🖥️ Full Screen & Responsive Features
The dashboard automatically opens in full screen mode and provides a fully responsive experience:
Automatic Full Screen
- Cross-Platform Support: Works on Windows, Linux, and macOS
- Smart Maximization: Uses the best available method for each platform
- Fallback Handling: Gracefully handles systems that don't support maximization
- Minimum Size: Prevents window from becoming too small (800x600 minimum)
Dynamic Responsiveness
- Real-Time Resizing: All components adapt as you resize the window
- Grid-Based Layout: Uses proper grid weights for optimal expansion
- Status Updates: Status bar shows current window dimensions
- Panel Updates: Active panels update their layout during resize
- Canvas Scrolling: Similar faces and other scrollable areas update automatically
Enhanced Typography
- Full Screen Optimized: Larger fonts (24pt titles, 14pt content) for better readability
- Consistent Styling: All panels use the same enhanced font sizes
- Professional Appearance: Clean, modern typography throughout
Dashboard Features
🏠 Home Panel
- Welcome screen with feature overview
- Quick access guide to all functionality
- Professional, modern interface with large fonts for full screen
- Responsive layout that adapts to window size
📁 Scan Panel
- Folder Selection: Browse and select photo directories
- Recursive Scanning: Include photos in subfolders
- Path Validation: Automatic validation and error handling
- Real-time Status: Live updates during scanning process
- Responsive Forms: Form elements expand and contract with window size
🔍 Process Panel
- Batch Processing: Process photos in configurable batches
- Quality Scoring: Automatic face quality assessment
- Model Selection: Choose between HOG (fast) and CNN (accurate) models
- Progress Tracking: Real-time processing status
- Dynamic Layout: All controls adapt to window resizing
👤 Identify Panel (Fully Functional)
- Visual Face Display: See individual face crops (400x400 pixels for full screen)
- Smart Identification: Separate fields for first name, last name, middle name, maiden name
- Similar Face Matching: Compare with other unidentified faces
- Batch Processing: Handle multiple faces efficiently
- Responsive Layout: Adapts to window resizing with dynamic updates
- Enhanced Navigation: Back/Next buttons with unsaved changes protection
🔗 Auto-Match Panel (Fully Functional)
- Person-Centric Workflow: Groups faces by already identified people
- Visual Confirmation: Left panel shows identified person, right panel shows potential matches
- Confidence Scoring: Color-coded match confidence levels with detailed descriptions
- Bulk Selection: Select multiple faces for identification with Select All/Clear All
- Smart Navigation: Back/Next buttons to move between different people
- Search Functionality: Filter people by last name for large databases
- Pre-selection: Previously identified faces are automatically checked
- Unsaved Changes Protection: Warns before losing unsaved work
- Database Integration: Proper transactions and face encoding updates
Auto-Match Workflow
The auto-match feature works in a person-centric way:
- Group by Person: Faces are grouped by already identified people (not unidentified faces)
- Show Matched Person: Left side shows the identified person and their face
- Show Unidentified Faces: Right side shows all unidentified faces that match this person
- Select and Save: Check the faces you want to identify with this person, then click "Save Changes"
- Navigate: Use Back/Next to move between different people
- Correct Mistakes: Go back and uncheck faces to unidentify them
- Pre-selected Checkboxes: Previously identified faces are automatically checked when you go back
Key Benefits:
- 1-to-Many: One person can have multiple unidentified faces matched to them
- Visual Confirmation: See exactly what you're identifying before saving
- Easy Corrections: Go back and fix mistakes by unchecking faces
- Smart Tracking: Previously identified faces are pre-selected for easy review
Auto-Match Configuration
- Tolerance Setting: Adjust matching sensitivity (lower = stricter matching)
- Start Button: Prominently positioned on the left for easy access
- Search Functionality: Filter people by last name for large databases
- Exit Button: "Exit Auto-Match" with unsaved changes protection
🔎 Search Panel (Fully Functional)
- Multiple Search Types: Search photos by name, date, tags, and special categories
- Advanced Filtering: Filter by folder location with browse functionality
- Results Display: Sortable table with person names, tags, processed status, and dates
- Interactive Results: Click to open photos, browse folders, and view people
- Tag Management: Add and remove tags from selected photos
- Responsive Layout: Adapts to window resizing with proper scrolling
✏️ Modify Panel (Coming Soon)
- Review Identifications: View all identified people
- Edit Names: Rename people across all photos
- Unmatch Faces: Temporarily remove face associations
- Bulk Operations: Handle multiple changes efficiently
🏷️ Tags Panel (Coming Soon)
- File Explorer Interface: Browse photos like a file manager
- Tag Management: Add, remove, and organize tags
- Multiple View Modes: List, icon, compact, and folder views
- Column Customization: Resizable columns and visibility controls
🎯 Command Line Interface (Legacy)
While the unified dashboard is the recommended interface, the command line interface is still available:
Scan for Photos
# Scan a folder (absolute path recommended)
python3 photo_tagger.py scan /path/to/photos
# Scan with relative path (auto-converted to absolute)
python3 photo_tagger.py scan demo_photos
# Scan recursively (recommended)
python3 photo_tagger.py scan /path/to/photos --recursive
Process Photos for Faces
# Process 50 photos (default)
python3 photo_tagger.py process
# Process 20 photos with CNN model (more accurate)
python3 photo_tagger.py process --limit 20 --model cnn
# Process with HOG model (faster)
python3 photo_tagger.py process --limit 100 --model hog
Individual GUI Windows (Legacy)
# Open individual GUI windows (legacy mode)
python3 photo_tagger.py identify --show-faces --batch 10
python3 photo_tagger.py auto-match --show-faces
python3 photo_tagger.py search-gui
python3 photo_tagger.py modifyidentified
python3 photo_tagger.py tag-manager
🏗️ Architecture: Web Migration Ready
Current Desktop Architecture
┌─────────────────────────────────────────────────────────────┐
│ Unified Dashboard │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ Menu Bar ││
│ │ [Scan] [Process] [Identify] [Search] [Tags] [Modify] ││
│ └─────────────────────────────────────────────────────────┘│
│ ┌─────────────────────────────────────────────────────────┐│
│ │ Content Area ││
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ││
│ │ │Scan Panel │ │Identify │ │Search Panel │ ││
│ │ │ │ │Panel │ │ │ ││
│ │ └─────────────┘ └─────────────┘ └─────────────┘ ││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘
│
┌─────────────────┐
│ PhotoTagger │
│ (Business │
│ Logic) │
└─────────────────┘
Future Web Architecture
┌─────────────────────────────────────────────────────────────┐
│ Web Browser │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ Navigation Bar ││
│ │ [Scan] [Process] [Identify] [Search] [Tags] [Modify] ││
│ └─────────────────────────────────────────────────────────┘│
│ ┌─────────────────────────────────────────────────────────┐│
│ │ Main Content Area ││
│ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ││
│ │ │Scan Page │ │Identify │ │Search Page │ ││
│ │ │ │ │Page │ │ │ ││
│ │ └─────────────┘ └─────────────┘ └─────────────┘ ││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘
│
┌─────────────────┐
│ Web API │
│ (Flask/FastAPI)│
└─────────────────┘
│
┌─────────────────┐
│ PhotoTagger │
│ (Business │
│ Logic) │
└─────────────────┘
Migration Benefits
- Clean Separation: Navigation (menu bar) and content (panels) are clearly separated
- Panel-Based Design: Each panel can become a web page/route
- Service Layer: Business logic is already separated from GUI components
- State Management: Panel switching system mirrors web routing concepts
- API-Ready: Panel methods can easily become API endpoints
🔧 Advanced Features
Face Recognition Technology
- Quality Scoring: Automatic assessment of face quality (0.0-1.0)
- Smart Filtering: Only high-quality faces used for matching
- Multiple Models: HOG (fast) and CNN (accurate) detection models
- Encoding Caching: Optimized performance with face encoding caching
Database Management
- SQLite Database: Lightweight, portable database
- Optimized Queries: Efficient database operations
- Connection Pooling: Thread-safe database access
- Automatic Schema: Self-initializing database structure
Performance Optimizations
- Pre-fetching: Data loaded in advance for faster UI response
- Background Processing: Long operations run in separate threads
- Memory Management: Efficient cleanup of temporary files and caches
- Batch Operations: Process multiple items efficiently
📊 Statistics and Monitoring
# View database statistics
python3 photo_tagger.py stats
Statistics Include:
- Total photos in database
- Total faces detected
- Identified vs unidentified faces
- People count
- Tag statistics
- Processing status
🔄 Common Commands Cheat Sheet
# Setup (one time)
python3 -m venv venv && source venv/bin/activate && python3 setup.py
# Daily usage - Unified Dashboard (RECOMMENDED)
source venv/bin/activate
python3 photo_tagger.py dashboard
# Then use the menu bar in the dashboard:
# 📁 Scan - Add photos (✅ Fully Functional)
# 🔍 Process - Detect faces (✅ Fully Functional)
# 👤 Identify - Identify people (✅ Fully Functional)
# 🔗 Auto-Match - Find matches (✅ Fully Functional)
# 🔎 Search - Find photos (✅ Fully Functional)
# ✏️ Modify - Edit identifications (🚧 Coming Soon)
# 🏷️ Tags - Manage tags (🚧 Coming Soon)
# Legacy command line usage
python3 photo_tagger.py scan ~/Pictures --recursive
python3 photo_tagger.py process --limit 50
python3 photo_tagger.py identify --show-faces --batch 10
python3 photo_tagger.py auto-match --show-faces
python3 photo_tagger.py search-gui
python3 photo_tagger.py modifyidentified
python3 photo_tagger.py tag-manager
python3 photo_tagger.py stats
🚀 Development Roadmap
Phase 1: Core Panel Integration ✅
- Unified dashboard structure
- Menu bar navigation
- Panel switching system
- Scan panel (fully functional)
- Process panel (fully functional)
- Home panel with welcome screen
- Full screen mode with automatic maximization
- Responsive design with dynamic resizing
- Enhanced typography for full screen viewing
Phase 2: GUI Panel Integration (In Progress)
- Identify panel integration (fully functional)
- Auto-Match panel integration (fully functional)
- Search panel integration (fully functional)
- Modify panel integration
- Tags panel integration
Phase 3: Web Migration Preparation
- Service layer extraction
- API endpoint design
- State management refactoring
- File handling abstraction
Phase 4: Web Application
- Web API implementation
- Frontend development
- Authentication system
- Deployment configuration
🎉 Key Benefits
User Experience
- Single Window: No more managing multiple windows
- Full Screen Experience: Automatically opens maximized for optimal viewing
- Responsive Design: All components adapt when window is resized
- Consistent Interface: All features follow the same design patterns
- Professional Look: Modern, clean interface design with enhanced typography
- Intuitive Navigation: Menu bar makes all features easily accessible
Developer Experience
- Modular Design: Each panel is independent and maintainable
- Web-Ready: Architecture designed for easy web migration
- Clean Code: Clear separation of concerns
- Extensible: Easy to add new panels and features
Performance
- Optimized Loading: Panels load only when needed
- Background Processing: Long operations don't block the UI
- Memory Efficient: Proper cleanup and resource management
- Responsive: Fast panel switching and updates
- Dynamic Resizing: Real-time layout updates during window resize
- Cross-Platform: Works on Windows, Linux, and macOS with proper full screen support
Total project size: ~4,000+ lines of Python code
Dependencies: 6 essential packages
Setup time: ~5 minutes
Perfect for: Professional photo management with modern unified interface
📞 Support
For issues, questions, or contributions:
- GitHub Issues: Report bugs and request features
- Documentation: Check this README for detailed usage instructions
- Community: Join discussions about photo management and face recognition
PunimTag - Making photo face recognition simple, powerful, and web-ready.