Improved memories of 4MP photos with upscaling

If you go to the original files of lagos – Google Drive there is now a directory upscale-lagos (created by my script locally with AI)

Mabye you see a noticable difference, except the ones combined with “richardsonlucy”

Now I remember. I use python-scripts which were not coded by me and they are very very important. When I changed from 22.04.5 to 24.04 I had so many troubles, it was a nightmare.

I have to try this on a testpc. I fear I don’t want to install this on the mainpc. At least as long the results with AI are all nearly the same.

I would always try to improve first the look and do the upscaling after that. Otherwise there is risk of pronouncing artefacts of upscaling. But hat’s just my unbiased feelings about a workflow I usually don’t use.

That was my opnion before I started this thread.

At the end I need an exact UHD-resolution, 3840x2160 and 3840x1920. If I do AI upscaling it is alway 2x or 4x. So I thought I reduce the AI-resolution with dt after editing.

Again I don’t expect miracles, but I want to do more or less the best.

@linuxuser I moved this thread to Processing but kept the play_raw tag since the discussion is long and becoming less about Play Raw and more about exploring processing and software options.

Have fun.

I think the topic changes to gmic now before it is going on with darktable.

Ha ha, I think processing would be the appropriate catch all, giving you the latitude to explore all kinds of things. @grosgood, @garagecoder and @Iain may be able to help you with G’MIC, as well as @David_Tschumperle who is Monsieur G’MIC. :stuck_out_tongue: @Reptorian and @prawnsushi go on all types of tangents and I dabble.

There are different levels of virtual environments to not disturb existing code. Listing a few of them here for your reference:

  • Python virtual environment (venv)
  • Linux container
  • Virtual machines
  • WSLs to run Linux on windows

Haha, there are different levels of unexperienced users, and I am very unexperienced. I hate it when things works and I don’t understand it, but I have to accept this because of my personal situation with a family member. It is impossible to learn Python, I am in a “standbye-mode” and have to stop working with the pc immediately and do “live-saving-things”

My other python-scripts use venv. The bad thing is, it doesn’t work with other pcs, but with the mainpc. So I am very angry to change anything.

If I understand it correctly, you have installed it. Could you use my testphotos and see what your AI-model does?

Here are the links to the files again:

https://drive.google.com/drive/folders/1sYgptFeKkcTgPvxwGjwLfGHiLIpXkDXW?usp=sharing

https://drive.google.com/drive/folders/1OxaV43m9dkh4uELY8GvjidETvavC8adu?usp=sharing

There is also an upscale-folder now where you can see my results.

If you get a noticeable better image, let me know und upload it somewhere.

I think Real-ESRGAN is better than others.
The leftmost is RealESRGAN_x4plus at 100%, I randomly picked two of your other upscaled 2x images at 133% to match resolution. The left one has clearly cleaner sky and more details.
I don’t usually upscale images as my camera has 42M pixels, so I just randomly picked a model to use.

1 Like

Thanks a lot!

I fear my commands are bad.

I used fx_ in my script and still have to use it since I don’t understand the syntax for cli and what I tried crashes sometimes or brings errors, but I was guessing what the command for cli is. It looks like what gimp shows is a command which initializes a cli-command. I am unable to analyze this.

More details at On the Road to 3.7 - #38 by David_Tschumperle

For now I cannot get a result, where the sharpening is acceptable, only richardsonlucy brings a visiable sharpening, but I am lost with richardsonlucy and a cli-command without fx_

It depends, when you compared, new filenames are something like:

lagos2_fx_gcd_upscale_patch2x_0-0.jpg
lagos2_scale2x_cnn_3.1-0.jpg

The filenames before didn’t contain fx.

But I think there is no difference with “upscale_patch2x” and fx, maybe with cnn. At least I can’t see a difference.

To run my test-script takes many hours. I don’t care of script time, but it is impossible to do it interactive. It took about 3 hours to create the files I uploaded.

Is it possible to run your solution from the commandline somehow? Since it uses python there should be a way.

I think we’re passing the buck’
When I use in GIMP the plug-in I gave above Upscaler (RealESRGAN)
I can set the magnification factor from 1.1 to 7.9 =>8