Commit Graph
218 Commits
Author SHA1 Message Date
flanandClaude Sonnet 4.6 3087d59558 fix: bump arm64 base to Ubuntu 26.04
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 04:04:20 +00:00
flanandClaude Sonnet 4.6 c59acb5e31 fix: use Ubuntu 24.04 for arm64 base to avoid deadsnakes PPA under QEMU
add-apt-repository ppa:deadsnakes/ppa fails on arm64 in GitHub Actions
because QEMU emulation doesn't support the GPG agent. Ubuntu 24.04 ships
Python 3.12 natively so the PPA is not needed. amd64 (CUDA/Ubuntu 22.04
base) still uses the PPA. PPA install is now gated on TARGETARCH=amd64.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 04:02:49 +00:00
dependabot[bot] c8fbbc0431 build(deps): bump docker/setup-buildx-action from 3 to 4
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-12 03:57:11 +00:00
dependabot[bot] c1cc0dd9c2 build(deps): bump docker/login-action from 3 to 4
Bumps [docker/login-action](https://github.com/docker/login-action) from 3 to 4.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-12 03:57:08 +00:00
dependabot[bot] 57668dabf4 build(deps): bump astral-sh/setup-uv from 4 to 7
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 4 to 7.
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](https://github.com/astral-sh/setup-uv/compare/v4...v7)

---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-12 03:57:05 +00:00
dependabot[bot] 2172b61254 build(deps): bump actions/github-script from 7 to 9
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 9.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v9)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: '9'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-12 03:57:01 +00:00
dependabot[bot] 10eb7265c1 build(deps): bump actions/checkout from 4 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-12 03:56:58 +00:00
flanandClaude Sonnet 4.6 7b4722d3f2 release: v0.2.3 — security fixes and CI improvements
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.2.3
2026-06-12 03:53:16 +00:00
flanandClaude Sonnet 4.6 444932c369 fix: remove API key from plain-text config file, add workflow permissions
- config.py: stop writing API_KEY to .immich_config.json; direct users
  to .env instead. Resolves CodeQL py/clear-text-storage-sensitive-data.
- test.yml, lint.yml: add permissions: contents: read to satisfy
  actions/missing-workflow-permissions scanner.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 03:51:55 +00:00
flanandClaude Sonnet 4.6 8f2a6d3163 docs: move to GitHub wiki (https://github.com/sudolulo/winnow/wiki)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 03:48:53 +00:00
flanandClaude Sonnet 4.6 b98fc94179 ci: remove lockfile verify race condition
uv lock --check in a separate job races against the update-lockfile
bot. Replace with uv lock inline in release.yml and drop the pre-job
from docker-publish.yml entirely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.2.2
2026-06-12 03:43:05 +00:00
github-actions[bot] 762ee160c3 chore: update uv.lock 2026-06-12 03:34:10 +00:00
flanandClaude Sonnet 4.6 759579fc30 feat: confidence scores, Frigate-authoritative capacity cap
- Store Immich face confidence scores per asset in frigate_uploaded_ids.json
- Add frigate_api.py: query GET /api/faces to count trained images per person
- Record Frigate training count as frigate_count in tracker for offline fallback
- MAX_AUTO_IMAGES cap now uses live Frigate count → cached frigate_count → local uploaded count
- Startup summary shows last known Frigate training count per person
- Migrate by_person entries from flat list to {asset_ids, scores, frigate_count} dict

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 03:33:40 +00:00
dependabot[bot] b6659c2218 build(deps): bump the python-deps group with 4 updates
Bumps the python-deps group with 4 updates: [nvidia-cudnn-cu12](https://developer.nvidia.com/cuda-zone), torch, [ultralytics](https://github.com/ultralytics/ultralytics) and [ruff](https://github.com/astral-sh/ruff).


Updates `nvidia-cudnn-cu12` from 9.10.2.21 to 9.23.1.3

Updates `torch` from 2.12.0 to 2.6.0+cu126

Updates `ultralytics` from 8.4.64 to 8.4.66
- [Release notes](https://github.com/ultralytics/ultralytics/releases)
- [Commits](https://github.com/ultralytics/ultralytics/compare/v8.4.64...v8.4.66)

Updates `ruff` from 0.15.16 to 0.15.17
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](https://github.com/astral-sh/ruff/compare/0.15.16...0.15.17)

---
updated-dependencies:
- dependency-name: nvidia-cudnn-cu12
  dependency-version: 9.23.1.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
- dependency-name: torch
  dependency-version: 2.6.0+cu126
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
- dependency-name: ultralytics
  dependency-version: 8.4.66
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-deps
- dependency-name: ruff
  dependency-version: 0.15.17
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-12 02:37:03 +00:00
flanandClaude Sonnet 4.6 0e416176c6 docs: clarify use case includes people who have never been to your property
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.2.1
2026-06-12 02:14:26 +00:00
flanandClaude Sonnet 4.6 e856cba6d7 docs: explain use case for infrequent visitors
Adds context that winnow is especially useful for people who aren't
around enough for Frigate's live detections to supply adequate training
data on their own.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 02:14:16 +00:00
flanandClaude Sonnet 4.6 e4d5f603d8 docs: remove TrueNAS references, make volume paths platform agnostic
- compose.yml: generic /path/to/winnow/... placeholder paths
- docs/setup.md: replace TrueNAS section with generic GPU passthrough guide
- docs/faq.md: remove platform-specific path example
- README.md: soften crop quality disclaimer, remove TrueNAS compose note
- CHANGELOG.md: scrub TrueNAS mentions from release notes

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 02:13:29 +00:00
flanandClaude Sonnet 4.6 0a67699db4 docs: add early stage disclaimer and manual review note
Advises users to review Frigate uploads after a run and remove bad
crops manually. Links to GitHub Issues for feedback.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 02:12:12 +00:00
flanandClaude Sonnet 4.6 f9b9cea84f docs: add lint fix to 0.2.1 changelog
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 02:11:35 +00:00
flanandClaude Sonnet 4.6 4b6bce9b74 fix: resolve ruff lint errors in scheduler and tests
- scheduler.py: sort import block (I001)
- tests/test_config.py: remove unused os, pytest imports (F401)
- tests/test_upload_tracker.py: remove unused json, os, tempfile imports (F401)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 02:11:16 +00:00
flanandClaude Sonnet 4.6 c3bf81d490 fix: direct venv python in entrypoint, fix INSIGHTFACE_HOME path, add badges
- entrypoint.sh: replace `uv run` with `/app/.venv/bin/python` to skip
  uv's sync check which was re-downloading ruff and rebuilding the package
  on every container startup
- compose.yml, .env.example: fix INSIGHTFACE_HOME /models → /models/.insightface;
  InsightFace appends models/ to root, so /models produced /models/models/buffalo_l
- README.md: add Immich and Frigate badges from upstream
- CHANGELOG.md, pyproject.toml, uv.lock: bump to 0.2.1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 02:10:01 +00:00
flanandClaude Sonnet 4.6 4529a63082 fix: add WORKDIR /app to runtime stage in Dockerfile
Runtime stage was missing WORKDIR, so uv run started from / and
couldn't find the .venv or pyproject.toml, causing "No module named
'winnow'" on container startup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 02:01:32 +00:00
flanandClaude Sonnet 4.6 ec9d2ecd0f chore: remove compose.override.yml from repo, add to .gitignore
Local dev override with machine-specific paths and build context;
not useful to other users.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 02:01:32 +00:00
flan 1df7c99c2e Update README.md 2026-06-11 21:47:10 -04:00
flanandClaude Sonnet 4.6 61204c2eca chore: bump version to 0.2.0, write full changelog
- pyproject.toml: version 0.1.0 → 0.2.0
- CHANGELOG.md: full [0.2.0] entry covering all changes since the fork —
  headless operation, Docker/scheduling, object mode, people filtering,
  quality controls, CI/CD, tests, docs, and all bug fixes
- uv.lock: regenerated after version bump

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
v0.2.0
2026-06-12 01:32:18 +00:00
flanandClaude Sonnet 4.6 b7dc87b05b docs: add wiki, .env.example, and fix stale if-curator references
- Add docs/setup.md, docs/troubleshooting.md, docs/faq.md as user-facing wiki
- Add .env.example with all env vars and inline comments
- Fix compose.override.yml: rename service if-curator → winnow, update volume paths
- Fix CHANGELOG.md: rename if-curator → winnow in release notes
- Link docs from README

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 01:26:24 +00:00
flanandClaude Sonnet 4.6 eea7baa19f refactor: rename project to winnow
- Rename Python package directory if_curator/ → winnow/
- Update all imports, entry points, and CLI references
- Update pyproject.toml: name, scripts, package list, repository URL
- Update Dockerfile, compose.yml, entrypoint.sh, scheduler.py
- Update GitHub Actions workflow image names
- Update README

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 01:07:46 +00:00
flanandClaude Sonnet 4.6 ca7b90f8ef docs: rewrite README from scratch
Describes the full pipeline (fetch → filter → embed → cluster → crop →
upload), explains why diversity matters and how the K-Medoids + FPS
selection works, covers both face and object modes in detail, and
documents all env vars in one place.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 01:02:28 +00:00
flanandClaude Sonnet 4.6 ed8487807b chore: establish authorship — Holden Salomon
- LICENSE: add copyright line for Holden Salomon (retain original)
- pyproject.toml: update authors to Holden Salomon <holden@arch.fyi>
- README: lead with what the software does rather than fork attribution;
  merge split env var tables into one unified reference; add lint/test
  badges; move attribution to footer

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 01:00:17 +00:00
flanandClaude Sonnet 4.6 5634dd9e0c ci: add uv/docker/github-actions dependabot + run lint/test on dev
- dependabot.yml: add uv ecosystem (updates pyproject.toml + uv.lock
  together), github-actions ecosystem (keeps action versions current),
  and group all Python deps into one weekly PR
- lint.yml, test.yml: extend triggers to dev branch so ruff and pytest
  run on push/PR to dev, not just main

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:44:44 +00:00
flanandClaude Sonnet 4.6 eedbd3180a fix: resolve all linting errors, add tests, bump base image
Linting (ruff):
- cli.py: sort relative imports (I001)
- jobs.py: remove unused get_people import (F401), wrap long line (E501)
- executor.py: remove unused success variable (F841), wrap 4 long lines (E501)

Tests (24 passing):
- tests/test_config.py: config singleton defaults + env var overrides
- tests/test_upload_tracker.py: mark/filter/reset/summary logic
- tests/test_immich_api.py: filter_recent_assets date boundary cases
- tests/test_jobs.py: _resolve_strategy with LIMIT env var and fallbacks
- pyproject.toml: add [tool.pytest.ini_options] testpaths=["tests"] so
  pytest doesn't scan .venv in CI

Security:
- Dockerfile: bump CUDA base from 12.6.3 to 12.9.2 to pick up patched
  Ubuntu packages (fixes Dependabot low-severity alert)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:42:38 +00:00
flanandClaude Sonnet 4.6 c861d56a53 feat: expose all interactive CLI options via env vars
- config.py: wire BLUR_THRESHOLD, MIN_CONFIDENCE, MAX_AUTO_IMAGES,
  FACE_MARGIN, USE_FULL_RESOLUTION, ENABLE_FACE_ALIGNMENT to env vars
  (were hardcoded class defaults, inaccessible in AUTO_MODE)
- jobs.py: add LIMIT env var for custom image count in auto mode;
  overrides STRATEGY preset (mirrors interactive Custom Count option)
- compose.yml: document all env vars with inline comments grouped by
  concern — mode/strategy, people filtering, image quality, caching,
  tracker overrides, scheduling

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:37:16 +00:00
flanandClaude Sonnet 4.6 52c245a677 fix: correct output volume mount path to match OUTPUT_DIR default
Volume was mounted at /app/output but OUTPUT_DIR defaults to
./frigate_train (i.e. /app/frigate_train). Mount was never being used.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:32:39 +00:00
flanandClaude Sonnet 4.6 a14428e860 fix: skip Frigate API upload for object-mode jobs, preserve object output dir
- upload_to_frigate() now only processes face-mode jobs; object crops are
  saved to the output directory as the deliverable (Frigate has no API for
  object classifier training data — it must be copied manually)
- execute_jobs() only wipes the output dir for face mode; object crops
  accumulate across runs as intended

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:31:57 +00:00
flanandClaude Sonnet 4.6 0f3e67d5cc fix: clean output dir per run, fix cron inline comment, clarify volume placeholder
- executor.py: wipe person output dir before each run so stale crops
  from previous runs don't accumulate on disk
- compose.yml: move inline comment off CRON_SCHEDULE value (croniter
  would parse the comment text as part of the expression)
- compose.yml: add note clarifying <pool> placeholder in volume paths

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:27:52 +00:00
flanandClaude Sonnet 4.6 b5911c6338 refactor: split cli.py into cli, jobs, and executor modules
- cli.py: main() entry point and orchestration only
- jobs.py: configuration phase (auto/interactive, strategy, diversity selection)
- executor.py: execution phase (image download/crop, Frigate upload)

No logic changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:25:29 +00:00
flanandClaude Sonnet 4.6 2c77532d35 refactor: slim image with proper multi-stage build and --no-dev deps
- Dockerfile: separate runtime stage from build stage so g++,
  python3.12-dev, curl, gnupg are excluded from the final image
- uv sync --no-dev: drop ruff/pytest from production image
- Remove build.sh (replaced by CI) and root-level upload_tracker.py (stale duplicate)
- .gitignore: add *.log

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:21:01 +00:00
flanandClaude Sonnet 4.6 86db51e00f fix: catch JSONDecodeError in API calls, use get_headers() consistently
- get_people() and fetch_all_assets() only caught RequestException, leaving
  JSONDecodeError unhandled if Immich returns a non-JSON 200 response
- cli.py thumbnail fetch used a raw header dict instead of get_headers()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:09:11 +00:00
flanandClaude Sonnet 4.6 63cfe62340 fix: move uv sync before source COPY for faster incremental builds
uv sync was after COPY if_curator/, so any source change invalidated
the 800MB dependency cache and re-downloaded everything. Now deps are
installed first and stay cached across code-only changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:04:28 +00:00
flanandClaude Sonnet 4.6 d3f3f2b4e2 fix: upload only files created in current run, not entire output dir
upload_to_frigate() was scanning the output directory with os.listdir(),
picking up leftover files from previous runs and re-uploading them.
Use asset_map (populated by execute_jobs) to upload only current-run files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 00:03:29 +00:00
flanandClaude Sonnet 4.6 e2005fb8ef fix: apply EXIF orientation when loading images from Immich
PIL opens JPEGs without applying EXIF rotation. Immich computes face
bounding boxes on orientation-corrected images, so portrait photos
produced misaligned crops (showing chins/eyes/foreheads instead of
whole faces). ImageOps.exif_transpose() normalizes orientation before
any coordinate math.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 23:08:37 +00:00
flanandClaude Sonnet 4.6 d7d0431a36 fix: use INSIGHTFACE_HOME env var for model persistence
Hardcoded root="~/.insightface" ignored the INSIGHTFACE_HOME env var,
causing Buffalo_L to download into the container on every run instead
of persisting to the mounted volume.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 22:56:47 +00:00
flanandClaude Sonnet 4.6 d106d30060 feat: RGBA fix, per-person tracking, dry-run, retry-rejected, reset-person
- Fix RGBA→JPEG error: convert all images to RGB before saving
- Upload tracker: per-person breakdown in JSON, reset_person(), get_person_summary()
- mark_rejected() only fires on face-detection failures (not all HTTP 400s)
- New env vars: DRY_RUN, RETRY_REJECTED, RESET_PERSON
- Tracker summary printed at startup showing uploaded/rejected counts per person
- Document new env vars in compose.yml

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 22:39:11 +00:00
flan 11ff3752d3 nonetype 2026-06-11 13:21:35 -04:00
flan 7b83dbd114 fix nonetype error 2026-06-11 12:51:59 -04:00
flan f5a8125b1e dev 2026-06-11 12:31:11 -04:00
flan 6cc2aff89c moved location 2026-06-11 11:58:36 -04:00
flan 30c70fb00b track uploaded files to prevent dupes. uses immich ID of original image 2026-06-11 11:34:13 -04:00
flan a04d1a5d9b fix: force onnxruntime-gpu over CPU + preload CUDA DLLs 2026-06-11 10:34:31 -04:00
flan dac2bc8242 fix: revert to CUDA 12.6 base for onnxruntime-gpu compatibility 2026-06-11 10:00:51 -04:00