Add corpus benchmarks and lattice refinement
This commit is contained in:
parent
634ca7f002
commit
d2e8ccac4d
23 changed files with 2995 additions and 217 deletions
|
|
@ -6,7 +6,16 @@ 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)
|
||||
fake = fake_pixelize(
|
||||
source,
|
||||
upscale=12,
|
||||
phase_x=0.2,
|
||||
phase_y=0.35,
|
||||
blur_radius=0.75,
|
||||
warp_strength=0.28,
|
||||
warp_detail=6,
|
||||
seed=5,
|
||||
)
|
||||
result = infer_lattice(fake)
|
||||
assert result.target_width in range(28, 37)
|
||||
assert result.target_height in range(28, 37)
|
||||
|
|
|
|||
Loading…
Reference in a new issue