mirror of
https://github.com/brycedrennan/imaginAIry
synced 2024-10-31 03:20:40 +00:00
5cc73f6087
- feature: finetuning your own image models - feature: image prep command. crops to face or other interesting parts of photo - fix: back-compat for hf_hub_download - feature: add prune-ckpt command - feature: allow specification of model config file
13 lines
369 B
Python
13 lines
369 B
Python
import logging
|
|
|
|
from imaginairy import LazyLoadingImage
|
|
from imaginairy.enhancers.facecrop import generate_face_crops
|
|
from tests import TESTS_FOLDER
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
|
|
def test_facecrop():
|
|
img = LazyLoadingImage(filepath=f"{TESTS_FOLDER}/data/bench2.png")
|
|
generate_face_crops((50, 50, 150, 150), max_width=img.width, max_height=img.height)
|