feat: Integrate DeepFace for face processing with configurable options
This commit introduces the DeepFace integration for face processing, allowing users to configure detector backends and models through the new Process tab in the GUI. Key features include batch processing, job cancellation support, and real-time progress tracking. The README has been updated to reflect these enhancements, including instructions for automatic model downloads and handling of processing-intensive tasks. Additionally, the API has been expanded to support job management for face processing tasks, ensuring a robust user experience.
This commit is contained in:
@@ -125,6 +125,8 @@ Then open your browser to **http://localhost:3000**
|
||||
- Make sure Redis is running first, or the worker won't start
|
||||
- Worker names are unique to avoid conflicts when restarting
|
||||
- Photo uploads are stored in `data/uploads` (configurable via `PHOTO_STORAGE_DIR` env var)
|
||||
- **DeepFace models download automatically on first use** (can take 5-10 minutes)
|
||||
- **If port 8000 is in use**, kill the process: `lsof -i :8000` then `kill <PID>` or `pkill -f "uvicorn.*app"`
|
||||
|
||||
---
|
||||
|
||||
@@ -141,6 +143,11 @@ Then open your browser to **http://localhost:3000**
|
||||
- Real-time job status updates (SSE)
|
||||
- Duplicate detection by checksum
|
||||
- EXIF metadata extraction
|
||||
- DeepFace face detection and recognition pipeline
|
||||
- Configurable detectors (RetinaFace, MTCNN, OpenCV, SSD)
|
||||
- Configurable models (ArcFace, Facenet, Facenet512, VGG-Face)
|
||||
- Process tab UI for face processing
|
||||
- Job cancellation support
|
||||
|
||||
---
|
||||
|
||||
@@ -199,7 +206,7 @@ punimtag/
|
||||
- ✅ Indices configured for performance
|
||||
- ✅ SQLite database at `data/punimtag.db`
|
||||
|
||||
### Phase 2: Image Ingestion & Scan Tab ✅ **COMPLETE**
|
||||
### Phase 2: Image Ingestion & Processing ✅ **COMPLETE**
|
||||
|
||||
**Backend:**
|
||||
- ✅ Photo import service with checksum computation
|
||||
@@ -210,6 +217,14 @@ punimtag/
|
||||
- ✅ Real-time job progress via SSE (Server-Sent Events)
|
||||
- ✅ Duplicate detection (by path and checksum)
|
||||
- ✅ Photo storage configuration (`PHOTO_STORAGE_DIR`)
|
||||
- ✅ **DeepFace pipeline integration**
|
||||
- ✅ **Face detection (RetinaFace, MTCNN, OpenCV, SSD)**
|
||||
- ✅ **Face embeddings computation (ArcFace, Facenet, Facenet512, VGG-Face)**
|
||||
- ✅ **Face processing service with configurable detectors/models**
|
||||
- ✅ **EXIF orientation handling**
|
||||
- ✅ **Face quality scoring and validation**
|
||||
- ✅ **Batch processing with progress tracking**
|
||||
- ✅ **Job cancellation support**
|
||||
|
||||
**Frontend:**
|
||||
- ✅ Scan tab UI with folder selection
|
||||
@@ -219,20 +234,27 @@ punimtag/
|
||||
- ✅ Job status monitoring (SSE integration)
|
||||
- ✅ Results display (added/existing counts)
|
||||
- ✅ Error handling and user feedback
|
||||
- ✅ **Process tab UI with configuration controls**
|
||||
- ✅ **Detector/model selection dropdowns**
|
||||
- ✅ **Batch size configuration**
|
||||
- ✅ **Start/Stop processing controls**
|
||||
- ✅ **Processing progress display with photo count**
|
||||
- ✅ **Results summary (faces detected, faces stored)**
|
||||
- ✅ **Job cancellation support**
|
||||
|
||||
**Worker:**
|
||||
- ✅ RQ worker auto-starts with API server
|
||||
- ✅ Unique worker names to avoid conflicts
|
||||
- ✅ Graceful shutdown handling
|
||||
- ✅ **String-based function paths for reliable serialization**
|
||||
|
||||
### Next: Phase 3 - Face Processing & Identify
|
||||
### Next: Phase 3 - Identify Workflow & Auto-Match
|
||||
|
||||
- DeepFace pipeline integration
|
||||
- Face detection (RetinaFace, MTCNN, OpenCV, SSD)
|
||||
- Face embeddings computation (ArcFace, Facenet, etc.)
|
||||
- Identify workflow UI
|
||||
- Auto-match engine
|
||||
- Process tab implementation
|
||||
- Auto-match engine with similarity thresholds
|
||||
- Unidentified faces management
|
||||
- Person creation and linking
|
||||
- Batch identification support
|
||||
|
||||
---
|
||||
|
||||
@@ -295,18 +317,23 @@ npm test
|
||||
- Database setup
|
||||
- Basic API endpoints
|
||||
|
||||
### ✅ Phase 2: Image Ingestion & Scan Tab (Complete)
|
||||
### ✅ Phase 2: Image Ingestion & Processing (Complete)
|
||||
- ✅ Photo import (folder scan and file upload)
|
||||
- ✅ Background job processing with RQ
|
||||
- ✅ Real-time progress tracking via SSE
|
||||
- ✅ Scan tab UI implementation
|
||||
- ✅ Duplicate detection and metadata extraction
|
||||
- ✅ DeepFace face detection and processing pipeline
|
||||
- ✅ Process tab UI with configuration controls
|
||||
- ✅ Configurable detectors and models
|
||||
- ✅ Face processing with progress tracking
|
||||
- ✅ Job cancellation support
|
||||
|
||||
### 🔄 Phase 3: Processing & Identify (In Progress)
|
||||
- Face detection and processing pipeline (DeepFace)
|
||||
### 🔄 Phase 3: Identify Workflow & Auto-Match (In Progress)
|
||||
- Identify workflow UI
|
||||
- Auto-match engine
|
||||
- Process tab implementation
|
||||
- Auto-match engine with similarity thresholds
|
||||
- Unidentified faces management
|
||||
- Person creation and linking
|
||||
|
||||
### 📋 Phase 4: Search & Tags
|
||||
- Search endpoints with filters
|
||||
@@ -387,6 +414,8 @@ npm test
|
||||
- No password hashing yet (plain text comparison - fix before production)
|
||||
- GPU acceleration not yet implemented
|
||||
- Large databases (>50K photos) may require optimization
|
||||
- DeepFace model downloads on first use (can take 5-10 minutes)
|
||||
- Face processing is CPU-intensive (GPU support planned for future)
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user