<jupyter_start><jupyter_text>Image Learning=============<jupyter_code>from skimage import io, data
from pyautospec import ImageWfa
# get a test image
camera = data.camera()

io.imshow(camera)
img_wfa = ImageWfa(camera, learn_resolution=4)

img_wfa
img, err = img_wfa.reconstruct(resolution=7)

print("reconstruction error: {:.4f}".format(err))

io.imshow(img)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14910025706940874, 'fraction_numerical': 0.007712082262210797, 'mean_word_length': 8.285714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '567346', 'license': 'MIT', 'n_tokens_mistral': 150, 'n_tokens_neox': 144, 'n_words': 28, 'path': 'examples/Image Learning.ipynb', 'repo_name': 'lucamarx/pyAutoSpec', 'size': '389'}