Skip to content

Local Lens is a privacy-first, AI-powered photo organizer for your PC. Sort and group photos by faces, dates, and locations—all locally, with no cloud upload. Enjoy a modern, intuitive UI and keep your memories organized and secure on your own device.

License

Notifications You must be signed in to change notification settings

ashesbloom/LocalLens

Repository files navigation

Local Lens

License: AGPL v3 Platform Build Status GitHub release GitHub downloads

GitHub stars GitHub forks GitHub repo size Buy Me A Coffee

Local Lens is a powerful, AI-driven photo organization application that intelligently sorts and categorizes your photo collection using advanced facial recognition, location data, and metadata analysis. Built with modern technologies, it provides a seamless desktop experience.

🖥️ Software Preview

Take a look at Local Lens in action:

Local Lens Main Dashboard Face Recognition in Local Lens Photo Organization by Location

Different Modes of Local Lens:

Different Modes of Local Lens

Different Modes of Local Lens Different Modes of Local Lens

Screenshots are for illustration. UI may evolve with updates.

🎯 Vision & Purpose

Local Lens revolutionizes photo management with intelligent, privacy-first automation. Designed for photographers, families, and anyone with thousands of digital memories, it transforms overwhelming photo organization into an effortless, secure experience.

The Challenge We Solve

Manual photo sorting is tedious, and cloud solutions risk your privacy. Local Lens brings enterprise-grade AI directly to your desktop—no subscriptions, no data leaving your device.

Core Philosophy: Privacy-First Intelligence

  • 🔒 100% Local Processing: All AI and analysis run on your machine
  • 🛡️ Zero Data Transmission: Photos never leave your device
  • ⚡ Lightning-Fast Search: Dynamic, real-time filters
  • 🔍 Multi-Dimensional Discovery: Search by faces, dates, locations, or combinations

Intelligent Organization Features

  • 📅 Smart Date Sorting: Chronological organization via metadata
  • 🗺️ Location Intelligence: GPS clustering and reverse geocoding
  • 👤 Face Recognition: Train AI to recognize people
  • 🔄 Dynamic Filtering: Real-time, responsive search
  • 📊 Analytics: Insights into your photo collection

Enterprise-Grade Safety & Reliability

  • 💾 Data Integrity: Multiple validation layers for safety
  • 🔄 Non-Destructive: Originals untouched, smart duplicate management
  • 📋 Logging: Complete audit trail
  • ⚠️ Robust Error Handling: Graceful recovery from interruptions
  • 🎯 Precision Accuracy: Advanced algorithms minimize false positives

Advanced Features

  • 👥 Face Enrollment: Teach AI to recognize specific people
  • 🌍 Cross-Platform: Native on Windows, macOS, Linux
  • 💾 Persistent Config: Save/load sorting presets
  • 🔍 Real-Time Preview: Live analytics and progress
  • 🎨 Modern UI: Clean interface with React & Tauri

🧠 Enhanced Automatic Strategy (How Local Lens Stays Fast & Accurate)

Local Lens uses an adaptive, two-pass face recognition strategy for maximum accuracy and stability:

  • Conservative Start: Begins with minimal parallel processing for stability on all hardware.
  • Best-Model First: Tries the high-accuracy 'cnn' model for each image.
  • Intelligent Fallback: If 'cnn' fails (e.g., due to memory limits), it logs a warning and instantly retries with the lighter 'hog' model—ensuring no image is skipped.
  • Accurate Model Approach:
    • First Pass: Runs the fast 'hog' model for initial detection.
    • Confidence Check: If a high-confidence match is found, it's accepted.
    • Second Pass: If not, escalates to the more accurate 'cnn' model for tough cases.

This guarantees the best possible result for every photo, adapting to your hardware and image complexity—never crashing or missing faces.

🖼️ Supported Formats

Local Lens supports a wide range of image formats for both professional and casual users:

.jpg, .jpeg, .png, .gif, .bmp, .tiff, .tif, .webp, .heic, .heif, .dng, .cr2, .cr3, .nef, .arw, .raf, .avif, .psd, .hdr

Whether you shoot on a phone or a pro camera, your images are covered.


🏗️ Architecture

Local Lens uses a hybrid architecture combining the best of web and desktop technologies:

                          ┌───────────────────────────────────────────────────┐
                          │                 Tauri Desktop App                 │
                          │  ┌─────────────────────────────────────────────┐  │
                          │  │           React Frontend (UI)               │  |
                          │  │  • Modern React with Hooks                  │  |
                          │  │  • Vite for fast development                │  |
                          │  │  • Real-time communication with backend     │  |
                          │  └─────────────────────────────────────────────┘  │
                          │                      | |                          |
                          │  ┌─────────────────────────────────────────────┐  │
                          │  │         Python Backend (Sidecar)            │  |
                          │  │  • FastAPI REST server                      │  |
                          │  │  • AI face recognition engine               │  |
                          │  │  • Image processing pipeline                │  |
                          │  │  • Metadata extraction & analysis           │  |
                          │  └─────────────────────────────────────────────┘  │
                          └───────────────────────────────────────────────────┘

🛠️ Technology Stack

Python JavaScript React Rust FastAPI Tauri Vite

Frontend

  • Framework: React.js with modern hooks
  • Build Tool: Vite for fast development and building
  • Desktop Framework: Tauri (Rust-based) for native desktop integration
  • UI Components: Custom components with CSS modules
  • State Management: React hooks with localStorage persistence

Backend

  • Language: Python 3.11+
  • API Framework: FastAPI for high-performance REST API
  • AI/ML Libraries:
    • face_recognition - Facial detection and recognition
    • dlib - Computer vision and machine learning toolkit
    • numpy - Numerical computing
  • Image Processing:
    • Pillow - Python Imaging Library
    • Pillow-HEIF - HEIF/HEIC format support
    • rawpy - RAW image format support
  • Geolocation: reverse_geocoder for location data
  • Server: uvicorn ASGI server

Build & Distribution

  • Python Bundling: PyInstaller for creating standalone executables
  • Desktop Packaging: Tauri for cross-platform application packaging
  • Installer Generation: Platform-specific installers (.msi, .dmg, .deb, .AppImage)

📋 Prerequisites

For Normal Users

  • No prerequisites - The distributed application includes all dependencies

🚀 Quick Start

Option 1: Download Pre-built Release (Recommended)

  1. Visit the Releases page
  2. Download the installer for your platform:
    • Windows: Local_Lens_x.x.x_x64_en-US.msi
    • macOS: Releasing soon
    • Linux: Releasing soon
  3. Run the installer and follow the setup wizard
  4. Launch Local Lens from your applications menu

For Development

Required Software

Platform-Specific Requirements

Windows
  • Visual Studio Build Tools or Visual Studio Community
  • CMake - Download
macOS
brew install cmake
Linux (Ubuntu/Debian)
  • Build essentials and development tools
sudo apt update
sudo apt install build-essential cmake libopenblas-dev liblapack-dev
sudo apt install python3-dev python3-venv pkg-config
Linux (CentOS/RHEL/Fedora)
  • Development tools and dependencies
# CentOS/RHEL
sudo yum groupinstall "Development Tools"
sudo yum install cmake openblas-devel lapack-devel python3-devel

# Fedora
sudo dnf groupinstall "Development Tools"
sudo dnf install cmake openblas-devel lapack-devel python3-devel

📁 Project Structure

local-lens/
├── backend/                    # Python FastAPI backend
│   ├── main.py                # Main FastAPI application
│   ├── organizer_logic.py     # Core photo organization logic
│   ├── enrollment_logic.py    # Face recognition training
│   ├── exceptions.py          # Custom exception classes
│   ├── requirements.txt       # Python dependencies
│   ├── long_path_manifest.xml # Windows long path support
│   └── venv/                  # Python virtual environment
├── frontend/                   # React + Tauri frontend
│   ├── src/                   # React source code
│   │   ├── App.jsx           # Main application component
│   │   ├── components/       # React components
│   │   └── assets/           # Static assets
│   ├── src-tauri/            # Tauri configuration
│   │   ├── src/              # Rust source code
│   │   │   └── lib.rs        # Main Rust application
│   │   ├── tauri.conf.json   # Tauri configuration
│   │   ├── Cargo.toml        # Rust dependencies
│   │   └── icons/            # Application icons
│   ├── package.json          # Node.js dependencies
│   └── vite.config.js        # Vite configuration
├── docs/                      # Documentation
├── LICENSE                    # MIT License
└── README.md                  # This file

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Test thoroughly on your target platform(s)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

📄 License

This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.

🙏 Acknowledgments

  • face_recognition - Facial recognition library
  • Tauri - Desktop application framework
  • FastAPI - Modern Python web framework
  • React - Frontend framework
  • Vite - Build tool and development server

📞 Support


⛓️‍💥 Engineered with purpose by Mayank Pandey

If you found my project useful, please consider supporting me so I can build more projects like this, cuz I'm broke af: Buy Me A Coffee

Alternatively, you can scan this UPI ID: Scan QR