Pro Photo

The incredible math behind A.I. Gigapixel

Using A.I. to resize one photo may bring your computer to a halt, but if your machine manages to run the whole process, I believe, trillions of operations later, you’ll be surprised. I was!

The incredible math behind A.I Gigapixel

Launched recently, Topaz Labs A.I. Gigapixel promises to enlarge your images up to 600% with revolutionary A.I. sampling, but you should not bite off more than you can chew!

Introduced in August, A.I. Gigapixel allows you to to get 100MP or even 1000MP photos from the files captured with a standard DSLR or mirrorless camera, and Topaz Labs even claims it can transform smartphones photos “into 100MP size and 16-bit quality that looks like it could only have come from a DLSR camera”. I did not try with a smartphone photo, but did pick some files from my Canon D30 to test, and was completely convinced. Let me share one example: in a few minutes, a 2160 x 1440 pixels from the 3.1MP camera was transformed into a 12960 x 8640, 112 MB file that could be printed at 109 x 73 cm at 300dpi.

The incredible math behind A.I Gigapixel
The upscaled image created in A.I. Gigapixel and the original,  to show the difference in size. The EOS D30 2160 x 1440 pixels image was transformed in a 12960 x 8640 pixels photo

The 600% upscaling gave me a file printable to dimensions I would not be able to achieve with the original file from the camera. As I mentioned in my previous article, years ago I would use Genuine Fractals to upscale photos taken with the Canon EOS D30, as they were too small for some of the uses I needed. I remember I also used the program to upscale the original files to send to the photo agency Alamy, as agencies then would only accept files with a resolution which was more than double that of the D30.

The incredible math behind A.I Gigapixel
Again, to give you an idea of scale, on the left a section of the output image shown at 15%, with the same section of the original, on the right,  at 100%

The experience with A.I. Gigapixel reveals one area where the program excels, from my understanding. It’s something Topaz Labs already mentioned in the information they distributed, stating that ““like many people, your library contains various sources such as scans, drone footage, video frame captures, downloaded stock photography, search engine images, etc. Don’t be held back because you don’t have a high resolution copy of something – Make everything work.”

The incredible math behind A.I Gigapixel
The output image, on the left, shown at 100%, against the original, shown at 600%, for better comparison of detail

I know, now, it works, as I made some tests. Picking files taken almost two decades ago and upscaling them worked flawlessly. This is, no doubt, a solution to make your archived files gain a new dimension… pun intended! For this article I decided to use one aircraft photo as example, because it clearly shows the type of results you can achieve. Images published here at PVC may not show exactly what I see on my screen, but I’ve the feeling that details are cleaner in the upscaled file. I picked a section of the tail, with numbers, and placed the output from A.I. Gigapixel on the left and the original on the right side, trying to match relative size, and the results confirm it.

The incredible math behind A.I Gigapixel
A section of the tail of the aircraft, showing the output result at 100% on the left, and the detail on the original, at 550%

Now, comparing the small original to the upscaled does not say much. I wanted to compare A.I Gigapixel with any other resizing tools available. I mentioned in my previous article one program, ON1 Resize 2018, which inherited Genuine Fractals technology, considered the standard tool for upscaling, and I intended to use it, but unfortunately there is no trial version available (I thought there was…). So, I had to use the upscaling in my current photo editor, Affinity Photo. I show here the results of resampling the same original file 600%, and I believe it is clear which program wins. I tried different methods and the image published is from the Lanczos 3 process. As with other photo editors, I believe upscaling up to about double the original size works fine, but once you need to go higher, is probably a good idea to get a tool created for the job: before, that software was Genuine Fractals (now named ON1 Resize); now you’ve the option to choose. I can not comment on which is better, but there is one difference to consider: ON1 Resize is said to allow upscaling up to 1000% while A.I. Gigapixel is limited to 600%. The technology used is also different.

The incredible math behind A.I Gigapixel
Comparing the upscaling from Affinity Photo (top) with the results from A.I. Gigapixel, at 600%. This makes it clear that beyond a certain degree of resampling, a special tool is the best option

A.I. Gigapixel comes with warnings from Topaz Labs about how intensive the program is in terms of CPU and GPU, and there is a list on the company’s website, pointing to some graphic cards that are not compatible. The list is not exhaustive, and that has made some users angry… but people should understand Topaz Labs can not try every computer configuration, and sincerely, some of the negative comments come from people that are… trying to bite off more than they can chew. Some computers will simply not run A.I. Gigapixel, due to the millions of calculations per pixel it makes, resulting in trillions of computations for one single image, to ensure it enhances all the right details.

The note on Topaz Labs website is clear: If your machine hardware falls between the Minimum and Recommended performance levels, you WILL encounter issues using A.I. Gigapixel, including excessive processing times! Reduce the size of your image, or install hardware that meets or exceeds the performance of Recommended hardware, if you encounter problems.

There is another warning users should check. It states this: If you are using a graphics card that is on the Unsupported Graphics Cards list, then your hardware will not be supported. This means A.I. Gigapixel may or may not work on your system, and we will not be able to make any corrections to address problems you encounter.

There is a list of hardware that is not compatible, but, as expected it does not cover all the situations. Not yet convinced? Let’s look at the math behind the process. Joe Fedric, Support Manager at Topaz Labs wrote some notes about what happens inside A.I. Gigapixel, and he notes that to do a simple 2x upscaling the computer makes some 1.4 million operations per pixel. Once you go to 4x and 6x upscaling, the number goes up to 2.4 million operations per pixel. What this means is that the larger your image and the larger the upsampling, the more calculations your machine will have to do. Topaz Labs published a table which gives a rough estimate of the number of calculations that will take place when you resize various input image sizes at different scales.

The incredible math behind A.I Gigapixel

If the numbers make your head spin… welcome! That explains why, depending on computer, the process can take more or less time, or simply go nowhere. For example, although my computer is not that bad, I’ve not managed to make a 600% upscale of a 6000 x 4000 pixels file at maximum quality. It does sound exciting to have a 36000 x 24000 pixels final image, but my PC will crash close to the end. Yet, I’ve managed to create a 500% upscaling, a 30000 x 20000 huge file – that’s 600MB when open -, although it takes some time for it to be created. It feels a bit like in the old days, when processing one image would give you time to have a coffe break. We’re asking so much from our modern computers that we’re being taken back to the past again!

The incredible math behind A.I Gigapixel
The working interface of A.I. Gigapixel. The window with the big image is from an external program in your computer, used to view the result of the output. In this case it is Windows Photos

This said, with an updated machine – mine does have a few years now, although it has a 1060 6GB card and 16GB memory and is within the recommended specs – I believe things would go faster. Topaz Labs suggests 32GB memory and a GPU with 8GB or more as optimal, in terms of hardware. The GPU is, in fact, a key element of the whole process, and unlike a CPU application, the technology used in A.I. GigaPixel cannot be throttled to use less than the maximum it requires. If you don’t have a strong GPU or a dual GPU setup, this will result in noticeable slowdown until GigaPixel is finished. Topaz Labs is working on a solution to make the process be more CPU-dependent, but that will slow the process considerable, meaning you’ll have more than the time of a coffee break to process images; you’ll probably have to run the process overnight if you’re working on multiple images.

The incredible math behind A.I Gigapixel
Another example of the magic. On the left the original at 33.3%. On the right the output image from Topaz Labs program, at 7%. The 30000 x 20000 pixels file is 600MB open

What does A.I. GigaPixel do? While traditional up-scale methods use “interpolation” (bi-cubic, Lanczos, fractal, etc.) to create higher resolution images, A.I. Gigapixel analyzes the image and recognizes details and structures and ‘completes’ the image with Ai Models that Topaz Labs have trained in theirlab. The  Ai Models are trained, says Topaz Labs, “with thousands of images with different resolutions to learn how to distinguish poorly upsampled images from high quality upsampled images. During this training period, our models not only learn to distinguish quality but also learn to recognize certain structures within the image. This information is committed to ‘memory’ and used later as a reference to complete and achieve high quality upsampled images.” Despite the use of AI, GigaPixel does not learn when used in the user’s computer, it simply repeats functions integrated by Topaz Labs, and only through updates will the software evolve.

A.I. Gigapixel is a work in progress software, and the team is working hard to optimize it, but the tool is not something you can just install and run. Check if your computer has at least the recommended specs, and even then, prepare to have to make some compromises. This said, if you don’t need to create 600% upscales from 6000 x 4000 images or similar, you’ll be surprised with what the program can do. As I wrote above, this gives a new dimension to your old photographs. If you regularly need to resample images, the program will pay itself, although, I agree, the price, at $99.99, is a bit steep.


Support ProVideo Coalition
Shop with Filmtools Logo

Share Our Article

Journalist, writer and photographer since 1979, both print and online, with a vast experience in the fields of photography, software, hardware, web, aviation, History, video games, technology, having published content in almost all Portuguese newspapers…

Leave a Reply

avatar
  Subscribe  
Notify of