Skip to content

An Image sorter that sorts photos based on face encodings in it.

Notifications You must be signed in to change notification settings

raggettii/PictoPy

 
 

Repository files navigation

PictoPy

PictoPy is an advanced desktop gallery application that combines the power of Tauri, React, and Rust for the frontend with a Python backend for sophisticated image analysis and management.

Architecture

Frontend

  • Tauri: Enables building the desktop application
  • React: Used for creating the user interface
  • Rust: Powers the backend, which the frontend communicates with through Tauri's API

Backend (Python)

  • FastAPI: Serves as the API framework
  • SQLite: Database for storing metadata and embeddings
  • YOLO: Used for object detection
  • FaceNet: Generates face embeddings
  • ONNX Runtime: Runs the models efficiently
  • DBSCAN: Performs clustering for face embeddings

Backend (Rust via Tauri)

Handles file system operations and provides a secure bridge between the frontend and local system.

Features

  • Smart tagging of photos based on detected objects, faces, and their recognition
  • Traditional gallery features of album management
  • Advanced image analysis with object detection and facial recognition
  • Privacy-focused design with offline functionality
  • Efficient data handling and parallel processing
  • Smart search and retrieval
  • Cross-platform compatibility

Technical Stack

Component Technology
Frontend React
Desktop Framework Tauri
Rust Backend Rust
Python Backend Python
Database SQLite
Image Processing OpenCV, ONNX Runtime
Object Detection YOLOv8
Face Recognition FaceNet
API Framework FastAPI
State Management React Hooks
Styling Tailwind CSS
Routing React Router
UI Components Radix UI
Build Tool Vite
Type Checking TypeScript

Setup

Frontend Setup

Prerequisites

  • Node.js (LTS version recommended)
  • npm (comes with Node.js)
  • Rust (latest stable version)
  • Tauri CLI

Installation

  1. Navigate to the frontend directory:
    cd frontend
  2. Install dependencies:
    npm install

Running the Application

npm run tauri dev

Building for Production

npm run tauri build

Python Backend Setup

Installation

  1. Navigate to the backend directory:
    cd backend
  2. Set up a virtual environment (recommended)
  3. Install requirements:
    pip install -r requirements.txt

Running the Backend

For UNIX-based systems:

./run.sh --test

The backend should now be running on port 8000 by default.

Additional Resources

Troubleshooting

If you encounter any issues, please check the respective documentation for Tauri, React, and FastAPI. For persistent problems, feel free to open an issue in the project repository.

About

An Image sorter that sorts photos based on face encodings in it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 56.9%
  • Python 32.5%
  • Rust 6.8%
  • JavaScript 1.2%
  • Shell 1.0%
  • CSS 0.9%
  • Other 0.7%