The first neural network was empirically found to achieve excellent performance on the target E% loss (Eq. (7)), with only 5% of easy patches having E% less than 0.93; i.e., in 95% of easy patches at least 93% of pixels are reconstructed to be barely noticeable from the original. The performance on medium patches is likewise good, with only 10% of test patches having fewer than 83% of pixels reconstructed sufficiently well. See FIGS. 14A to 14D for percentile results on various art domains, hardness levels, as well as for visualizations of “barely noticeability” and sample reconstructions. FIG. 14A illustrates E% from Eq. (7) plotted for art domains and FIG. 14B illustrates E% from Eq. (7) plotted for patch hardness levels based on entropy. Maximal barely noticeable difference in E% is visualized in FIG. 14C. FIG. 14D illustrates results from particularly difficult patches, for each showing an input patch, an encoded palette, and an image reconstructed with one best matching palette color.