Files
mule-image/mulita.yml
dtoro fa9b21856f feat: replace face pipeline with InsightFace, add content classifier
Face detection/recognition:
- Replace YuNet + SFace with InsightFace buffalo_l (RetinaFace + ArcFace)
- 512-d ArcFace embeddings (was 128-d SFace), migration 0006 resizes column
- Remove YOLO person-bbox workaround — RetinaFace is accurate enough
- Detection threshold 0.65 cleanly separates real faces (0.72+) from
  false positives on dogs/paintings (0.56-0.61)

Content-type classification:
- CLIP zero-shot classifier using native PyTorch text encoder + ONNX
  image encoder for high-quality text-image similarity
- Categories: photograph, screenshot, document, receipt, meme, artwork
- Writes Tag(kind=content_type) per photo via photo_tags
- Margin-based confidence: top-1 vs top-2 score difference
- New ClassifierSettings in config (enabled, min_confidence)
- Wired into vision_fanout pipeline

Tested: 6 real faces from 4 photos (zero false positives), 11/13 photos
classified (8 photograph, 2 artwork, 1 meme).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 13:49:02 +02:00

53 lines
1.3 KiB
YAML

# Mulita configuration file
#
# Source roots and discard handling are owned by the database — manage them
# from the UI (left sidebar → "+ Add Source Folder") or via the API. Only
# operational tuning lives here.
thumbnails:
small: 240 # px, longest edge
medium: 640
large: 1280
quality: 85 # JPEG/WebP quality
format: webp # output format for thumbs
scanner:
watch: true # use watchfiles inotify
initial_scan_on_start: true
batch_size: 100
concurrent_workers: 4
performance:
max_concurrent_thumbnails: 10
cache_ttl: 3600
db_pool_size: 20
db_pool_recycle: 3600
# AI vision pipeline — embedding, OCR, object detection, face recognition.
# Runs on the dedicated `vision` Celery queue (PR4+). Set enabled: false
# to disable all vision processing.
vision:
enabled: true
backend: onnx # "onnx" (CPU) | "rocm" (future GPU)
models_dir: /data/models
embedder:
name: openclip_vitb32
batch_size: 8
ocr:
enabled: true
languages: [en]
min_confidence: 0.5
detector:
enabled: true
min_confidence: 0.35
max_detections: 50
faces:
enabled: true
min_face_size: 40
recognition_threshold: 0.65
cluster_eps: 0.5
classifier:
enabled: true
min_confidence: 0.3
worker_concurrency: 2