Skip to main content

Media Manager & Visualizer

Project description

๐Ÿ“ธ MM โ€” Universal Organizer for Media

A self-hosted, AI-powered media library manager for photos, videos, and audio.

Scan, tag, search, deduplicate, and browse your media collection with a beautiful web UI.

GitHub Stars GitHub Forks GitHub Issues GitHub Last Commit GitHub License Python TypeScript FastAPI React


Features ยท Quick Start ยท Installation ยท Usage ยท Web UI ยท API ยท Contributing


โœจ Features

๐Ÿ” Smart Scanning

  • Recursive media discovery with parallel processing
  • SHA-256 hashing for integrity & deduplication
  • EXIF, video, and audio metadata extraction
  • Support for RAW, HEIC/HEIF, and 30+ formats

๐Ÿค– AI-Powered

  • CLIP-based image embeddings (ViT-B-32)
  • Natural language image search ("sunset over ocean")
  • Zero-shot auto-tagging (~36 categories)
  • Visual similarity search

๐ŸŒ Offline Geocoding

  • Reverse geocoding from GPS EXIF data
  • GeoNames cities15000 dataset (no API keys needed)
  • Chinese province/city name support
  • Chinese lunar & solar festival detection

๐Ÿ–ผ๏ธ Beautiful Web UI

  • Responsive gallery with justified layout
  • Pinch-to-zoom thumbnail resizing
  • Infinite scroll with date grouping
  • Detail panel with full metadata & map

๐Ÿ“ Library Management

  • Manual & smart albums (auto-generated)
  • Star ratings, tags, batch operations
  • Template-based file import & organization
  • Multi-library support with runtime switching

โšก Performance

  • SQLite-backed (zero config, portable)
  • WebP thumbnail caching (4 sizes) with ETag
  • Async API server (FastAPI + Uvicorn)
  • Background CLIP processing

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        Web UI (React)                        โ”‚
โ”‚         React 19 ยท TailwindCSS ยท Zustand ยท Vite              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚ REST API
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    FastAPI Server                             โ”‚
โ”‚     Auth ยท Media ยท Albums ยท Smart Albums ยท Tags ยท Stats      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Core Engines                               โ”‚
โ”‚  Scanner ยท Metadata ยท Embeddings ยท Tagger ยท Geocoding ยท ...  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               SQLite (Peewee ORM / aiosqlite)                โ”‚
โ”‚         Media ยท Metadata ยท Tags ยท Embeddings ยท Albums        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

# Install with uv (recommended)
uv pip install -e .

# Create a new library (interactive)
mm init ~/Photos

# Start the web server
mm server
# โ†’ Open http://localhost:8000

๐Ÿ“ฆ Installation

Prerequisites

  • Python 3.10+
  • uv (recommended) or pip
  • exiftool โ€” for EXIF metadata extraction
  • ffmpeg / ffprobe โ€” for video/audio metadata & thumbnails
# macOS
brew install exiftool ffmpeg

# Ubuntu / Debian
sudo apt install libimage-exiftool-perl ffmpeg

Install mm

# Clone the repository
git clone https://github.com/HSPK/mm.git
cd mm

# Install with uv
uv pip install -e .

# (Optional) Install CLIP support for AI features
uv pip install -e ".[clip]"

Build the Frontend

cd web
npm install
npm run build
cd ..

๐Ÿ“– Usage

CLI Commands

Command Description
mm init [dir] Create or open a media library (interactive setup)
mm server [dir] Start the web UI server
mm import <source> Import media files into the active library
mm search Search by text, image, or tags (requires CLIP)
mm dedup Find and remove duplicate media files by hash
mm info <file> Show detailed file metadata
mm config [key] [value] Get or set library config values
mm geo update Offline reverse geocode GPS-tagged media
mm db list List all registered databases
mm db set <n> Switch the active database
mm db add <path> Register an existing database file
mm db rm <n> Unregister a database (optionally delete)
mm db stats Show detailed library statistics
mm db clean Remove entries for files no longer on disk
mm db sync <dir> Clean stale entries and re-scan changed files

Library Setup

# Create a new library interactively
mm init ~/Photos

# View all config values
mm config

# Set the import template
mm config import_template "{year}/{year}-{month:02d}-{day:02d}/{original_name}{ext}"

# Sync database with disk (remove stale + re-scan)
mm db sync ~/Photos

# Parallel sync with 8 workers
mm db sync ~/Photos -j 8

Searching

# Semantic search by text (requires CLIP)
mm search --text "sunset at the beach"

# Search by image similarity
mm search --image ~/Photos/reference.jpg --top-k 20

# Filter by tags
mm search --tag landscape --tag nature

Deduplication

# Find and remove duplicate media files (by hash)
mm dedup

Importing & Organizing

# Import from SD card (copies into library using configured template)
mm import ~/DCIM

# Move instead of copy
mm import ~/DCIM --move

Web Server

# Start on default port (8000)
mm server

# Specify library directory
mm server ~/Photos

# Custom host and port
mm server -h 0.0.0.0 -p 9000

# Development mode with auto-reload
mm server --reload

๐ŸŒ Web UI

The web interface provides a full-featured media browser:

  • Library โ€” Browse all media with infinite scroll, date grouping, and adjustable thumbnail sizes
  • Albums โ€” Smart albums auto-generated by tag, camera, year, festival, and location
  • Search โ€” Quick filtering and semantic search
  • Detail View โ€” Full metadata, EXIF info, location, tags, and star ratings
  • Batch Operations โ€” Multi-select for bulk tagging, rating, and deletion
  • Settings โ€” Theme switching (light/dark), library management
  • Auth โ€” User accounts with token-based authentication

๐Ÿ”Œ API

mm exposes a comprehensive REST API at /api/:

Endpoint Description
/api/auth/* Authentication (login, setup, logout)
/api/media Media CRUD, thumbnails, file streaming
/api/batch/* Bulk operations (tags, ratings, delete)
/api/albums/* Album management
/api/smart-albums/* Smart album definitions & resolution
/api/tags Tag CRUD with usage counts
/api/stats Library statistics & timeline
/api/library Multi-library switching
/api/users User management (admin)

Interactive API docs available at /docs (Swagger UI) when the server is running.

๐Ÿ› ๏ธ Tech Stack

Component Technology
Backend Python 3.10+, FastAPI, Peewee ORM, SQLite
AI/ML OpenCLIP (ViT-B-32), PyTorch
Frontend React 19, TypeScript, TailwindCSS, Vite
State Zustand
UI Kit shadcn/ui, Radix UI, Lucide Icons
Media Pillow, pillow-heif, rawpy, exiftool, ffmpeg
Geocoding GeoNames (offline), lunar-python

๐Ÿค Contributing

Contributions are welcome! Here's how to get started:

# Clone and install in dev mode
git clone https://github.com/HSPK/mm.git
cd mm
uv pip install -e ".[clip]"

# Install dev dependencies
uv pip install -e ".[dev]"

# Run tests
pytest

# Start frontend dev server
cd web && npm install && npm run dev

Please open an issue first to discuss what you would like to change.

๐Ÿ“„ License

This project is open source. See the LICENSE file for details.


If you find mm useful, please consider giving it a โญ!

Star History Chart

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

litemm-0.1.0.tar.gz (291.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

litemm-0.1.0-py3-none-any.whl (87.4 kB view details)

Uploaded Python 3

File details

Details for the file litemm-0.1.0.tar.gz.

File metadata

  • Download URL: litemm-0.1.0.tar.gz
  • Upload date:
  • Size: 291.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for litemm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3d08babcb38442feec7ac18dcf15b3eed115f55baf64844f0837ac3cc2783093
MD5 94a8224a78eceae451e62d6558d9d465
BLAKE2b-256 b4262ff001c40df67cb10bf6055950f164aa6522633556795627b2728c2a7064

See more details on using hashes here.

File details

Details for the file litemm-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: litemm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 87.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for litemm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 91f7b267e89569349a8b4661333efa76a0bdd9c3d0fa63add71a32d771fd66d7
MD5 8c3eb9c096f3da32fad78c2af1e589f4
BLAKE2b-256 9b4db0bed33d4826f1ac27f576eaf8900167255575b32ba92b4d7d0ac118e25d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page