Web Analytics

immich-all-in-one

⭐ 2 stars Traditional Chinese by eric-gitta-moore

Immich + cn-clip + RapidOCR + InsightFace

version version version version version version version version version version version version version version version version version

~~後續計畫遷移到 ente-io/ente,因為我需要 s3 來存儲照片~~
ente 還是功能太少了
改成使用 juicedata/juicefs 掛載 s3

專案簡介

本專案是 Immich 相片管理系統的 AI 能力增強解決方案。主要透過以下元件擴展了 Immich 的原生功能:

主要功能

1. OCR 文字識別與搜尋

2. CLIP 圖像向量處理

3. 單媒體 AI 資料重新處理

系統架構

┌─────────────┐      ┌──────────────────┐      ┌───────────────┐
│             │      │                  │      │               │
│   Immich    │─────▶│ inference-gateway│─────▶│  Immich ML    │
│   Server    │      │    (Go网关)      │      │   Server      │
│             │      │                  │      │               │
└─────────────┘      └──────────────────┘      └───────────────┘
                              │
                              │ OCR/CLIP请求
                              ▼
                     ┌──────────────────┐
                     │                  │
                     │   mt-photos-ai   │
                     │  (Python服务)    │
                     │                  │
                     └──────────────────┘

組件詳解

inference-gateway

以 Go 語言編寫的網關服務,主要職責:

mt-photos-ai

以 Python 和 FastAPI 編寫的 AI 服務,提供:

部署說明

環境要求

配置說明

主要環境變數:

IMMICH_API=http://localhost:3003  # Immich API地址
MT_PHOTOS_API=http://localhost:8060  # mt-photos-ai服务地址
MT_PHOTOS_API_KEY=mt_photos_ai_extra  # API密钥
PORT=8080  # 网关监听端口
主要環境變數:

CLIP_MODEL=ViT-B-16  # CLIP模型名称
CLIP_DOWNLOAD_ROOT=./models/clip  # 模型下载路径
DEVICE=cuda  # 或 cpu,推理设备
HTTP_PORT=8060  # 服务监听端口

部署步驟

git clone https://github.com/你的用户名/immich-all-in-one.git
cd immich-all-in-one
docker-compose up -d

使用說明

在 Immich 的配置檔案中,將機器學習服務位址指向 inference-gateway:

MACHINE_LEARNING_URL=http://inference-gateway:8080

開發指南

inference-gateway (Go)

編譯運行:

cd inference-gateway
go build
./inference-gateway

mt-photos-ai (Python)

開發環境設置:

cd mt-photos-ai
pip install -r requirements.txt
python -m app.main

许可证

本專案基於 MIT 許可證開源。

鳴謝

--- Tranlated By Open Ai Tx | Last indexed: 2025-07-17 ---