Tag: machine-learning

  • Pixel Pal (PART 6) : Early progress reports

    This article is part of a series about upscaling icon themes with AI. While this page is part 6, part 5 is available here.

    Pixel Pal is a project I have started to bring new life to old icon themes. Many old icon themes are in raster format and are not suited to HiDPI screens. Currently, the only way to handle old icon themes is to turn one pixel into four or nine, but the result looks pixelated. The goal of this project is to use deep learning to upsample small icons into icons for HiDPI screens..

    There is some progress as this example shows.

    Source 32 by 32 pixel versionTarget 64 by 64 pixel (ideal) versionNeural network augmented output
    Original 32 by 32 pixel icon showing a non empty folder which served as input to the neural network.Original 64 by 64 pixel icon showing a non empty folder which served as target to the neural network.Upscaled 64 by 364 pixel icon showing a non empty folder which can produced by the neural network.

    More examples can be found in the below PDF

  • Pixel Pal (PART 2) : Gathering data for Pixel Pal

    This article is part of a series about upscaling icon themes with AI. While this page is part 2, part 1 is available here and part 3 is available here.

    Pixel Pal is a project I have started whose purpose is to bring new life to old icon themes. Many old icon themes are in raster format and are not available for HiDPI screens. Because the icons are low-resolution. Currently the only way to handle old icon themes is to resample them by the desired factor, but the icons look pixelated. The goal of this project is to upscale icon themes with AI.

    To solve this, I will use artificial intelligence and more precisely, deep learning. The idea is to train a neural network how to upsample icons in a manner that takes into account the shape of the underlying icon. In other words the idea is to do better than increasing the number of pixels. However, to train a neural network you need lots of data. In our case the data is a collection of icons for which we have both low resolution and HiDPI resolution versions.

    Thankfully, a lot of icon themes are available for which we have both. There are some requirements:

    1. The icon theme’s license needs to allow make derivatives. To be safe, I will stick to open source licenses.
    2. There needs to be enough data to train a network. However, I will intentionally not get too much data to explore data augmentation techniques.
    3. We need to have the ability to split data well in various sets: training, validation, test and real world data

    Let me explain the splitting of the data a little more by using an analogy. Training a network is a bit like taking a course at university. You get a lot of material through the course and at the end of the course there is a final exam. You are not allowed to see the final exam.

    The course material is your real training data, and the final exam is test data. The point of test data is to evaluate the real performance of the network. But the test data is not part of the course. For the test data I have another real-world dataset which is there for me to use the network a first time on a real task; in other words, non-course material. The real world data will correspond to some old icon themes (OS/2, CDE).

    Furthermore, real training data will be split. To use our analogy to learn the course and pass the final exam with a good grade you do practice tests. This is done by splitting our real training data into a smaller training data set and a validation data set.

    So, to recap, we have :

    1. Training data : Use for training the network
    2. Validation data : Use for evaluating the training
    3. Test data : Use for evaluating the performance of the network
    4. Real world data : To test the use of the software on an actual use case.

    Let me explain a bit more about the use of real world data. I have chosen two very old icon themes for which no SVG formats are available. This data set allows me to judge whether the project has been a success qualitatively.

    Because no SVG files are available an official metric can’t be calculated, which is why we need test data with SVG icons. Using old icons with no SVG file format will show whether using deep learning is actually useful for reviving old icon themes. The old icon themes are the official CDE icon theme and the icon theme from OS/2.

  • Pixel Pal (PART 1) : Adapting old icon themes for HiDPI screens

    I am starting a new open source project. The goal is to improve HiDPI support by upscaling icon themes with AI: old software relies on icon themes in raster format. These are not suitable for HiDPI screens. Low-resolution icons (e.g. 32×32) do not render well on HiDPI screens. The solution is to simply do pixel doubling, but this results in an ugly pixelated look.

    Upscaled image of a file icon illustrating pixelated look

    My new project will do better by upscaling icon themes with AI. Specifically by using super-resolution deep learning models. These neural networks rely on subtle statistical relations between the pixels of an image. For instance, corner pixels of an object have similar colour. Another example is that icons frequently feature lines and curves.

    A series of blog posts will detail the project’s progress. The next post here covers gathering data.