Skip to main content

Scan macOS Photos library, detect and identify birds, write species captions

Project description

preen

Groom your photo library — automatically find and name every bird.

Preen scans your macOS Photos library, detects birds with YOLO, identifies species with SuperPicky's OSEA classifier (10,964 species), and writes bilingual keywords and captions.

Features

  • Scans entire Photos library including iCloud photos
  • YOLO multi-bird detection — finds all birds in a photo
  • OSEA species identification with GPS-based eBird regional filtering
  • Keywords: 白鹭 (Little Egret) + pinyin bailu per species
  • Captions: 白鹭, 苍鹭 (Little Egret, Grey Heron)
  • Parallel iCloud downloads via PhotoKit (no Photos.app dependency for reads)
  • SQLite checkpoint — pause/resume, incremental or full rescan
  • Auto-retries failed iCloud exports on next run
  • Supports JPEG, HEIC, JXL, AVIF, and RAW formats (ARW, CR2, CR3, NEF, DNG, RAF)

Requirements

  • macOS with Photos.app
  • Python 3.11+

Installation

pipx install birdpreen

Or with pip:

pip install birdpreen

On first scan, model files (~260 MB) are automatically downloaded from HuggingFace.

Usage

# Scan new photos (incremental)
preen scan

# Full library rescan
preen scan --full

# Dry run — detect and identify without writing
preen scan --dry-run

# Custom confidence threshold (default: 70%)
preen scan --threshold 65

# Process in batches
preen scan --batch-size 500

# Adjust parallel iCloud downloads (default: 16)
preen scan --workers 32

# Check progress
preen status

# Reset checkpoint to start over
preen reset

Tuning --workers

The --workers flag controls how many iCloud photos are downloaded in parallel (default: 16). The scan output shows a queue indicator like q:12/16 — ready/total. "Ready" means downloaded and waiting for the GPU; "total" is the queue size.

  • If ready often drops to 0, downloads can't keep up — increase workers
  • If queue is often full (e.g. q:16/16), GPU is the bottleneck — check for other GPU-intensive processes
  • If you have plenty of RAM (each queued image uses ~50-100MB), 32 workers is safe
  • For sequential processing (most reliable), use --workers 1

Credits

  • OSEA bird classification model (10,964 species) by Sun Jiao
  • Bird identification logic (OSEA classifier, AVONET geographic filtering, eBird species data) extracted from SuperPicky
  • YOLO11 segmentation model by Ultralytics
  • Photos library access via PhotoKit through PyObjC

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

birdpreen-0.4.0.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

birdpreen-0.4.0-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

File details

Details for the file birdpreen-0.4.0.tar.gz.

File metadata

  • Download URL: birdpreen-0.4.0.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for birdpreen-0.4.0.tar.gz
Algorithm Hash digest
SHA256 382229b8e0295af25eeafc32020d128ff91f7cb0a7339eeb9463d532cddc2fa9
MD5 a74de8e72de7f08b690caea2b42d0c04
BLAKE2b-256 a235e733476d2caffd3224a73128d0c56cd417210a80d925cbc83260f7e90eea

See more details on using hashes here.

File details

Details for the file birdpreen-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: birdpreen-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 35.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for birdpreen-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aab338cf93875771dfaf65781a111541ba854af62392a3600b7ad43862cef014
MD5 2bbeb049c0a58aa8fb340b68b11b970b
BLAKE2b-256 53a309ca805abe1f4f14e034f02872f34888c0f4bff51014c24c0f221ec5c392

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page