this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

augment_vis: invert handwriting splits

+3 -2
+3 -2
src/augment_vis.py
··· 20 20 21 21 from PIL import Image 22 22 23 - from .data import DATA_ROOT, _augment 23 + from .data import DATA_ROOT, _HANDWRITING_SPLITS, _augment 24 24 25 25 26 26 def main() -> None: ··· 52 52 for i, entry in enumerate(entries): 53 53 path, typst = entry["path"], entry["typst"] 54 54 img = Image.open(path).convert("RGB") 55 - aug = _augment(img, region_jitter=True, typst=typst) 55 + aug = _augment(img, region_jitter=True, typst=typst, 56 + allow_invert=args.split in _HANDWRITING_SPLITS) 56 57 57 58 img.save(out / f"{i:02d}_orig.png") 58 59 aug.save(out / f"{i:02d}_aug.png")