Bootstrap the repixelizer CLI project

This commit is contained in:
Meta Vens 2026-04-21 16:10:55 +01:00
commit aceefe46b2
24 changed files with 1398 additions and 0 deletions

13
tests/test_inference.py Normal file
View file

@ -0,0 +1,13 @@
from __future__ import annotations
from repixelizer.inference import infer_lattice
from repixelizer.synthetic import fake_pixelize, make_emblem
def test_infer_lattice_recovers_emblem_scale() -> None:
source = make_emblem(32, 32)
fake = fake_pixelize(source, upscale=12, phase_x=0.2, phase_y=0.35, blur_radius=0.6)
result = infer_lattice(fake)
assert result.target_width in range(28, 37)
assert result.target_height in range(28, 37)
assert result.confidence >= 0.0