Finalizes the 0.4.0 release: - Version bumped to 0.4.0 in pyproject.toml - CHANGELOG.md: add [0.4.0] section covering Frigate pre-upload scoring, quality replacement inversion, bootstrap fix, FRIGATE_SCORE_CEILING, ENABLE_FRIGATE_SCORES, removal of post-upload quality gate, and all doc/default corrections - README.md: step 8 updated for dual-mode replacement, FRIGATE_SCORE_CEILING and ENABLE_FRIGATE_SCORES added to env var table, MIN_FACE_WIDTH and BLUR_THRESHOLD defaults corrected (50→90, 100→120) - .env.example: FRIGATE_SCORE_THRESHOLD replaced with FRIGATE_SCORE_CEILING; QUALITY_REPLACEMENT line added; comments updated to match current semantics - winnow/executor.py: bootstrap fix — recognize now called for all below-cap uploads when ENABLE_FRIGATE_SCORES=true (was gated on CEILING > 0) - winnow/upload_tracker.py: frigate_scores schema comment corrected to pre-upload; get_most_redundant_mapped_file() added - winnow/frigate_api.py: recognize_face returns (face_name, score)|None tuple so wrong-person scores never drive replacement or ceiling decisions - winnow/config.py: FRIGATE_SCORE_THRESHOLD renamed to FRIGATE_SCORE_CEILING; ENABLE_FRIGATE_SCORES added - tests/test_upload_tracker.py: 4 new tests for get_most_redundant_mapped_file Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
57 lines
4.3 KiB
Bash
57 lines
4.3 KiB
Bash
# ── Required ──────────────────────────────────────────────────────────────────
|
|
IMMICH_URL=http://192.168.1.10:2283
|
|
API_KEY=your-immich-api-key
|
|
FRIGATE_URL=http://192.168.1.10:5000
|
|
|
|
# ── Mode & Strategy ───────────────────────────────────────────────────────────
|
|
# Auto mode is active by default when no TTY is present (Docker/cron).
|
|
# Set AUTO_MODE=true to force auto mode even in an interactive terminal.
|
|
# AUTO_MODE=true
|
|
# VERBOSE=true # Enable DEBUG-level console output (log file is always DEBUG)
|
|
# 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=90 # Minimum face width in pixels (default: 90, guarantees ≥8,100px crop)
|
|
# 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=120.0 # Laplacian blur threshold; lower = accept more blur (default: 120.0)
|
|
# MAX_AUTO_IMAGES=80 # Hard cap on auto-diversity selection (default: 80)
|
|
# QUALITY_REPLACEMENT=true # At cap, replace a weaker tracked image with a better candidate (default: true)
|
|
# FRIGATE_SCORE_CEILING=0.0 # Skip uploads already well-covered (pre-upload score > ceiling = redundant; 0 = disabled; requires at least one prior run)
|
|
# ENABLE_FRIGATE_SCORES=true # Call Frigate's recognize endpoint pre-upload to store diversity scores (default: true; adds ~200ms per upload)
|
|
|
|
# ── Caching & Models ──────────────────────────────────────────────────────────
|
|
# FORCE_CPU=true # Disable GPU, fall back to CPU
|
|
# 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_SCHEDULE controls container lifetime:
|
|
# unset — run once on startup, then exit
|
|
# empty string — stay alive, run nothing (trigger manually: docker exec -it winnow winnow)
|
|
# cron expression — run on startup, then on schedule
|
|
# CRON_SCHEDULE= # Manual mode (keep alive, no auto-run)
|
|
# CRON_SCHEDULE=0 3 * * 0 # Every Sunday at 3 AM
|
|
# CRON_SCHEDULE=0 3 1 * * # First of every month
|