Skip to content

Add optional face alignment - #214

Open
leblancfg wants to merge 1 commit into
masterfrom
issue-212-face-alignment
Open

Add optional face alignment#214
leblancfg wants to merge 1 commit into
masterfrom
issue-212-face-alignment

Conversation

@leblancfg

Copy link
Copy Markdown
Owner

Summary

  • Add opt-in Cropper(align=True) support that uses YuNet eye landmarks to level slightly tilted faces before cropping.
  • Add autocrop --align and keep default crop behavior unchanged.
  • Preserve alpha-channel handling, support no-resize aligned crops, and skip alignment when estimated roll exceeds the guard.
  • Document alignment behavior and limits.

Fixes #212

Verification

  • uv run pytest tests/test_autocrop.py tests/test_cli.py
  • just lint
  • just test
  • Smoke: uv run autocrop tests/data/obama.jpg --align > aligned.jpg produced a valid 500x500 JPEG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add face alignment / roll correction before cropping

1 participant