What does lookup factor do in G'MIC inpaint [patch-based]?

So I am experimenting with G’MIC Inpaint[patch-based]
From my experiment:
Patch size - size of tiles(patch) that will be paste on the mask. I found this out when increase patch size to very high value which give blocky result.
Lookup - distance that it will gather texture

Blend - apply a bit of blur to blend in better

Lookup factor - ???
What does it do?? I only know that it does magic.
As you can see in the Lookup factor of 0.1 the cloud have the shape of the pole, while 0.5 is more natural.

Original

Patch size 25, Lookup 10, Lookup factor 0.1

Patch size 25, Lookup 10, Lookup factor 0.5

Judging by the name, the lookup factor is how much the lookup area influences the structure of the inpainting.

Hmmm, make sense.

From my test until now. I feel like using G’MIC inpaint [patch-based] to remove unwant object is more difficult than using resynthesizer.
Resynthesizer is extremely fast compare to inpaint which seems to be using only 1 cpu thread while resynthesizer use all.
Also inpaint have this weird repetitive texture for some reason.

Personally, I keep it simple and heal and clone. Inpainting is too much for my machine to handle.

Hi @kevin_tee,

here is nice article by @patdavid about patch based inpaint, that I highly recommend to read:

https://patdavid.net/2014/02/getting-around-in-gimp-gmic-inpainting.html

1 Like

I check CPU usage of G’MIC inpaint, it use only 1 thread from 8 threads only. But resynthesizer use all 8.

Then, you should try Inpaint [multiscale] which also makes use of all available cores.

I posted about this same filter a few weeks back. Maybe you can get some tips from that thread:

It is a shame there’s not better documentation. These filters are really powerful. But to lean how to use them, you have to piece together a bunch of different posts to get to what you want. Gmic had a wiki page set up where they were going to have documentation on all the different filters, and I think there was one entry there out of the dozens available. I just spent 10 minutes looking, but can’t find that wiki page again. I was going to offer to start writing some documentation for them as I figured things out on my own.

1 Like

Many times, when the inpainting result could stand some improvement, I have found that increasing the Lookup Factor gives a better result than the default setting. Increasing the Look Up Factor seems to tell the inpainting algorithm to look for better, more compatible matches in the image to use for inpainting.

Turns out it’s simply a multiplier to the lookup size: