Web Analytics

immich-all-in-one

⭐ 2 stars Simplified 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 ---