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 "中文名 (English Name)" as captions — visible on iPhone.

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
  • Writes captions via persistent Photos.app connection (photoscript)
  • SQLite checkpoint — pause/resume, incremental or full rescan
  • Deduplicates species in multi-bird captions

Requirements

  • macOS with Photos.app
  • Python 3.11+

Installation

git clone https://github.com/bohemianpan/preen.git
cd preen
python3 -m venv venv
source venv/bin/activate
pip install -e .

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

# Check progress
preen status

# Reset checkpoint to start over
preen reset

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 osxphotos
  • Photos.app integration via photoscript

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.1.0.tar.gz (29.9 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.1.0-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for birdpreen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5cd943a6393724583f6f3e310d2e3acf31db7202621cb121ca3323c3d8648b58
MD5 6a047536057b20cedebbbd9a336afb90
BLAKE2b-256 e36c53950a06558fdd477ef7b91b8c7146907c0cc7ab194b304dc58186eae2e3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: birdpreen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.1 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 95b62972494c026cc9d4f7ed89f841048401f963b12ddc908cbcda1675d1dd77
MD5 46478e522c29019a94f6dd3cdb3abfc2
BLAKE2b-256 2f15d8fa0119ff32792dc0361fa04b5afd6b5159c59d3cdaccdfc6d218039009

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