Commit Graph

4 Commits

Author SHA1 Message Date
85c1479d94 Add comprehensive AI-powered photo analysis with dual-model classification
## Features Added:
- **Dual Model Classification**: ViT (objects) + CLIP (style/artistic concepts)
- **Image Captioning**: BLIP model for detailed photo descriptions
- **Auto-tagging**: Process all photos with configurable confidence thresholds
- **Tag Management**: Clear all tags functionality with safety confirmations
- **Comprehensive Analysis**: 15-25+ tags per image covering objects, style, mood, lighting

## New API Endpoints:
- `/api/classify/batch` - Batch classification with comprehensive mode
- `/api/classify/comprehensive` - Dual-model analysis for maximum tags
- `/api/classify/config` - Tunable classifier parameters
- `/api/caption/batch` - Batch image captioning
- `/api/tags/clear` - Clear all tags with safety checks

## UI Enhancements:
- Auto-tag All button (processes 5 photos at a time)
- Caption All button (processes 3 photos at a time)
- Clear All Tags button with confirmation dialogs
- Real-time progress bars for batch operations
- Tag pills displayed on thumbnails and image modal
- AI-generated captions shown in image modal

## Performance Optimizations:
- Uses cached thumbnails for 10-100x faster processing
- Parallel model initialization and processing
- Graceful fallback to original files when thumbnails fail
- Configurable batch sizes to prevent memory issues

## Technical Implementation:
- Vision Transformer (ViT) for ImageNet object classification (1000+ classes)
- CLIP for zero-shot artistic/style classification (photography, lighting, mood)
- BLIP for natural language image descriptions
- Comprehensive safety checks and error handling
- Database integration for persistent tag and caption storage

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 17:05:54 -05:00
5c3ad988f5 Add duplicate detection, conflict handling, and fix pagination issues
- Add photo_conflicts table for files with same path but different content
- Implement SHA256-based duplicate detection in file scanner
- Add conflict detection methods to PhotoService
- Skip identical files with info logging, store conflicts with warnings
- Fix infinite scroll pagination race conditions with functional state updates
- Add scroll throttling to prevent rapid API calls
- Enhance PhotoThumbnail with comprehensive EXIF date/time display
- Add composite React keys to prevent duplicate rendering issues

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 10:55:28 -05:00
868ef2eeaa Add photo scanning with EXIF metadata extraction and thumbnail caching
- Implement file scanner with SHA256 hash-based duplicate detection
- Add Sharp-based thumbnail generation with object-contain display
- Create comprehensive photo grid with EXIF metadata overlay
- Add SQLite thumbnail blob caching for improved performance
- Support full image preview with proper aspect ratio preservation
- Include background directory scanning with progress tracking

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 08:35:07 -05:00
31784d91b2 Add SQLite database and directory management system
- Install better-sqlite3 for embedded SQLite support
- Create complete database schema with photos, albums, tags, directories tables
- Add PhotoService class with full CRUD operations and relationships
- Create comprehensive API endpoints for photos, albums, directories, and stats
- Add DirectoryList component with delete functionality and visual feedback
- Implement directory saving to database when user selects path
- Add automatic refresh of directory list when new directories are saved
- Update Button component with enhanced enabled/disabled states and animations
- Add Tab key handling to hide suggestions in directory modal
- Update .gitignore to exclude SQLite database files

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-26 14:26:55 -05:00