- Dockerfile: ENV INSIGHTFACE_HOME=/models → /models/.insightface to match compose.yml and .env.example; the old value caused InsightFace to store models at /models/models/buffalo_l (double-appended subdir) - entrypoint.sh: use /app/.venv/bin/winnow (installed entry point) instead of python -m winnow.cli - config.py: ENABLE_CACHE default false → true; embedding cache is always beneficial in practice; users can opt out with ENABLE_CACHE=false - compose.yml: comment out CRON_SCHEDULE so scheduling is opt-in; flip ENABLE_CACHE to commented opt-out to reflect new default - README.md: update ENABLE_CACHE default documentation to true - tests/test_config.py: update default assertion to match Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
68 lines
4.0 KiB
YAML
68 lines
4.0 KiB
YAML
services:
|
|
winnow:
|
|
image: ghcr.io/sudolulo/winnow:latest
|
|
container_name: winnow
|
|
environment:
|
|
# ── Required ──────────────────────────────────────────────────────────
|
|
- IMMICH_URL=${IMMICH_URL}
|
|
- API_KEY=${API_KEY}
|
|
- FRIGATE_URL=${FRIGATE_URL}
|
|
|
|
# ── Mode & Strategy ───────────────────────────────────────────────────
|
|
- AUTO_MODE=true
|
|
# TRAINING_MODE: face = upload to Frigate face recognition API
|
|
# object = save crops to output dir for manual Frigate placement
|
|
- TRAINING_MODE=face
|
|
# STRATEGY: auto = objective diversity (recommended), standard = 30 imgs, broad = 100 imgs
|
|
- STRATEGY=auto
|
|
# - LIMIT=50 # Custom image count; overrides STRATEGY preset
|
|
# - OBJECT_CLASS=dog # Object label for object mode (e.g. dog, cat, car)
|
|
|
|
# ── People Filtering ──────────────────────────────────────────────────
|
|
# - ONLY_PEOPLE=John,Jane # Comma-separated; process only these people
|
|
# - SKIP_PEOPLE=Unknown # Comma-separated; skip these people
|
|
# - MIN_FACE_COUNT=5 # Skip people with fewer than N assets in Immich
|
|
# - YEARS_FILTER=10 # Only include images from the last N years (default: 10)
|
|
|
|
# ── Image Quality ─────────────────────────────────────────────────────
|
|
# - MIN_FACE_WIDTH=50 # Minimum face width in pixels (default: 50)
|
|
# - FACE_MARGIN=0.15 # Padding around face crop as fraction (default: 0.15)
|
|
# - ENABLE_FACE_ALIGNMENT=true # Align face before cropping (default: true)
|
|
# - USE_FULL_RESOLUTION=true # Use full-res images vs thumbnails (default: true)
|
|
# - MIN_CONFIDENCE=0.7 # Minimum face detection confidence (default: 0.7)
|
|
# - BLUR_THRESHOLD=100.0 # Laplacian blur threshold; lower = accept more blur (default: 100.0)
|
|
# - MAX_AUTO_IMAGES=80 # Hard cap on auto-diversity selection (default: 80)
|
|
|
|
# ── Caching & Models ──────────────────────────────────────────────────
|
|
- FORCE_CPU=false
|
|
# - ENABLE_CACHE=false # Disable embedding cache (default: true)
|
|
- CACHE_DIR=/app/.if_cache
|
|
- HF_HOME=/models/huggingface
|
|
- INSIGHTFACE_HOME=/models/.insightface
|
|
|
|
# ── Tracker overrides (one-shot, remove after use) ────────────────────
|
|
# - DRY_RUN=true # Preview selection without downloading/uploading
|
|
# - RETRY_REJECTED=true # Re-attempt previously rejected images
|
|
# - RESET_PERSON=John # Clear uploaded+rejected history for one person
|
|
|
|
# ── Scheduling ────────────────────────────────────────────────────────
|
|
# Cron expression (unset = run once and exit)
|
|
# - CRON_SCHEDULE=0 3 * * 0 # Every Sunday at 3 AM
|
|
# - CRON_SCHEDULE=0 3 1 * * # First of every month
|
|
# - CRON_SCHEDULE=*/30 * * * * # Every 30 minutes
|
|
volumes:
|
|
# Replace with absolute paths on your host, e.g. /opt/winnow/models
|
|
- /path/to/winnow/models:/models
|
|
- /path/to/winnow/cache:/app/.if_cache
|
|
- /path/to/winnow/output:/app/frigate_train
|
|
stdin_open: true
|
|
tty: true
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- driver: nvidia
|
|
count: all
|
|
capabilities: [gpu]
|