INNER CODE UNIT · Python

img

zhulinyv/Semi-Auto-NovelAI-to-Pixiv · src/batch_mosaic.py:16

    img = img.resize((int(length * 0.01), int(length * 0.01)))
    img = img.resize(s)
    return img


def _mosaic_blurry(img, fx, fy, tx, ty):
    length = img.width if img.width > img.height else img.height
    c = img.crop((fx, fy, tx, ty))
    c = __mosaic_blurry(c, length)
    img.paste(c, (fx, fy, tx, ty))
    return img


def mosaic_blurry(img):
    img = str(img)
    with Image.open(img) as image:
        box_list = detector(img)
        for box in box_list:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…