# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

from pathlib import Path
from plot_utils import plot_image_row
import numpy as np
from PIL import Image

# +
base_path = Path('testnet')


def open_image(sample, filename):
    return np.array(Image.open(base_path / sample / filename))


for sample, title in [
        ('0', 'Right icon in input is circle, segment triangle'),
        ('1', 'Right icon in input is square, segment plus')]:
    plot_image_row([
        open_image(sample, 'image.png'),
        open_image(sample, 'segment.png'),
        ],
        title=title,
        labels=['Input', 'Ground truth'],
        color_map='gray',
    )

StarcoderdataJupyterScriptsDedupFiltered