Web Analytics

immich-all-in-one

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

บทนำโครงการ

โครงการนี้เป็นโซลูชันเสริมศักยภาพ AI สำหรับระบบจัดการรูปภาพ Immich โดยขยายความสามารถดั้งเดิมของ 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

บริการ AI ที่เขียนด้วย Python และ FastAPI ให้บริการ:

คำแนะนำการปรับใช้

ข้อกำหนดของสภาพแวดล้อม

คำอธิบายการกำหนดค่า

ตัวแปรสภาพแวดล้อมหลัก:

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 ให้ตั้งค่าที่อยู่บริการ Machine Learning ไปที่ 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 ---