It is currently Thu Jul 25, 2024 7:11 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: About the next G'MIC surprise
PostPosted: Fri Mar 15, 2013 5:02 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Hello there,

We have been working hard these last days on a new surprise feature for the next version of G'MIC, and I'm happy to say that there is one beta version available which provides this feature.
This is still *highly* experimental, time consuming, memory consuming, so please do not consider this is the final version of the algorithm, and do not try this at home if you don't have a very powerful computer.
You have been warned :mrgreen:

Now, let us say a bit more about this feature. We have added a new (native) command '-repair' to the G'MIC framework, able to reconstruct (a.k.a inpaint) masked image regions. But this time, it uses a patch-based copy/paste algorithm so it can reconstruct parts with texture and grain too. Here is a little example of use below :

Image

It's a bit like the 'Content Aware Filling' feature of Photoshop, but available for free for GIMP (and other interfaces able to use the G'MIC framework). The example above takes several minutes to compute on my netbook, with blending disabled. Just to warn you again one more time !
The algorithm has been written by Maxime Daisy (one of my current PhD student) during his Master thesis. Thanks to him for his great piece of code.

I've posted beta packages for Linux on the G'MIC website. No windows versions right now to test, but I'll try to build the 32bits plug-in this afternoon, if you are interested by it of course.
This new filter (for the GIMP plug-in) is available only in latest beta 1.5.5.1, and after an Internet update of the filters. If you succeed in using it, you are welcome to post results, so we can see if this is working well or not.

We will try to optimize the algorithm a little bit more in the future, as it seems to be hardly usable right now (particularly when the blending option is activated!). This is work in progress though.

Hope you'll enjoy this little suprise !


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 15, 2013 5:55 am  (#2) 
Offline
Global Moderator
User avatar

Joined: Apr 07, 2010
Posts: 14182
That looks very promising...I am looking forward to it

_________________
Image


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 15, 2013 6:03 am  (#3) 
Offline
GimpChat Member

Joined: Feb 13, 2013
Posts: 86
Exciting!


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 15, 2013 7:12 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Mar 23, 2012
Posts: 7316
Location: Göteborg at last!
Wow. This looks really really useful.


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 15, 2013 8:03 am  (#5) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12536
Excellent news David. Not sure how fast G'MIC's inpainting will be over Resynthesizer's heal (hit or miss with it's results by the way), but look forward to giving it a try soon. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 15, 2013 10:02 am  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Here is a quick comparisons of inpainting results I've get on a single color image.
I compare three inpainting methods : G'MIC Inpaint[Diffusion], Resynthetizer and G'MIC Inpaint[Patch-based] (the new one).

Image

By the way, the resynthetizer plug-in is the fastest one to render the result.


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 15, 2013 10:24 am  (#7) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
I've just posted beta packages of the GIMP plug-in for Win32 on the G'MIC sourceforge site.


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 15, 2013 10:34 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Aug 16, 2012
Posts: 4271
Location: Göteborg, Sweden
ronounours: a great surprise, the examples you posted look impressive. look forward to trying this - though probably in a later version because of the warning.

_________________


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 15, 2013 11:42 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
It is going to be a nice addition to Resynt 'Heal selection' and Liquid Rescale object removal feature.

What are the units for Blending Amplitude? Not sure I understand the immediate meaning of this function.
And how changing the threshold is going to affect content aware fill?
'Heal selection' has straightforward, easy to understand controls: Filling Order->Random, Inwards to center, Outwards from Center;
Sample from -> All around, Sides, Above and below.
What is the filling order and sampling pattern in G'mic filter?

Thanks.

P.S. Installed 1.5.5.1 Beta but the filter didn't show up until I Refreshed.
Ran patch based inpaint but GMIC crashed (64-bit Win 7, i7 CPU, 16 GB RAM, 1GB AMD Radeon HD 7750 graphic card)
Sorry, but can't post the results yet.


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 15, 2013 11:53 am  (#10) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
Bonjour,

Here is a development version of G'MIC for Gimp 64bit Windows (20130315).
Compilation settings are different and gives a 4% improvement in speed.


EDIT 20130317 : file deleted


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Tue Mar 19, 2013 5:25 pm  (#11) 
Offline
GimpChat Member

Joined: Feb 01, 2013
Posts: 24
Location: London, UK
David, too much of a surprise .. my eyebrows fell off .. are you roughly solving a PDE in patch-space?

Anyway, amazing, looking forward to that on windoze.

A single "inpaint" mask raises the segmentation/connectivity problem of choosing which patches are the best clone sources .. I was recently segmenting image by chroma (YUV without Y) to have multiple source types and was going to re-synth from those .. maybe you can do some similar trick with your patch method .. i.e. a complex version to return multiple inpainted layers each using a distinct potential archetype (rather than fitting to the inpaint region's boundary)

_________________
-- jayprich


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Wed Mar 20, 2013 9:51 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
The algorithm has been optimized a little bit. A new source archive for the 1.5.5.1 beta version has been released as well. Still work in progress though !

Here are some new results I've done using the G'MIC plug-in for plug-in, filter 'Enhancement / Inpaint [patch-based]'. Looks promising to me !

Image
Image
Image


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Wed Mar 20, 2013 4:42 pm  (#13) 
Offline
GimpChat Member

Joined: Jan 21, 2013
Posts: 33
Hi everyone,

Thanks a lot indeed for this new, amazing filter! :)

I am wondering whether It may be possible to expand this filter in order to get a new opposite option?

In short, as with Gimp, with the foreground select tool, IMHO, it would be very useful to have this same option with G'mic with this new filter.

More precisely, with G'mic:
1. You might "paint" on the image you want to extract from the background;
2. When you are done, you might apply this filter in order to "delete" all background (all pixels should be deleted).

In essence, the filter should be able to delete all unnecessary pixels (the ones NOT selected) in order to extract your image from the background.

For example, in the picture where there is the bird (the image just posted by Ronounours) you might be able to extract the bird from the background (that is, the opposite of what the filter is doing right now....).

The Siox algorithm implemented in Gimp allows to get the same result.
Maybe this new filter with G'mic might be more powerful compared to Siox on top :)
In addition of requiring a minor amount of clicks to get the job done (namely extract your image from the background).

P.s: Some years ago (2009) there has been a Google - Summer of Code which was aimed to improve the Siox algorithm version on Gimp.
Unfortunately, this Gsoc work was never merged to Gimp :(
To my knowlege, the Siox algorithm version implemented on Gimp has not received any improvement these past years...
Two years ago the Krita team tried to implement the Siox algorithm on Krita, through a Google Summer of Code project, but this student failed as well :(

Best regards!


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Thu Mar 21, 2013 4:58 am  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
I don't get it sylvio.
The mask must be selected by the user to inpaint its content. So, all the segmentation work is done by the user, not by the algorithm. I don't see how the inpaint method could be used to automatically segment foreground objects from the background.


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Thu Mar 21, 2013 6:19 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 591
Thanks Ronounours and Maxime Daisy. Wonderful performance.

_________________
Image


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 22, 2013 12:18 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
New progress on the patch-based inpainting algorithm has been made. Another gain in terms of speed, and another beta release, so you can test it if you wish. This is now quite usable, the following example has been computed on my small netbook (with a CPU of 1.1ghz). It took like 3 minutes to achieve on this very slow machine :
Image

I would be interested to get your feedback on this. Didn't have time today to compile it for Windows and Linux64, but I'll try to do it on next monday.


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 22, 2013 1:27 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
Thank you very much David and Maxime Daisy!
These kinds of filters are always very helpful for photomanipulation.

I wonder what would happen in an image with many colors, where you can not choose a color for the mask that does not exist in the image. Would it be better that the repainting is done through a selection rather than a colored mask?

Ronounours wrote:
the following example has been computed on my small netbook (with a CPU of 1.1ghz). It took like 3 minutes to achieve on this very slow machine.
I would be interested to get your feedback on this

Would be nice if you share an image with the mask already done and the values ​​of the parameters that you used in the filter, to do the benchmark over the same image and so we share the results of computation times and CPU characteristics.

_________________
Image
Be patient, English is not my language.


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 22, 2013 2:39 pm  (#18) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
The inpaint filters have now two different modes to select the mask to fill in. Either you define it with a prescribed color (as I did above), either you define it as an opaque region on a top layer.


Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 22, 2013 4:23 pm  (#19) 
Offline
GimpChat Member
User avatar

Joined: Nov 09, 2011
Posts: 726
Oh, now I see.
I've compiled G'MIC 1.5.5.1 beta for Linux 64bit.
I am applying the filter in the following image, over the yellow wire:
http://www.fileswa/Qby5At5/inpaint-patch-based_test(not download this to test).html

Something does not work well. If I select "opaque region in top layer" the filter does nothing.
If I merge the layers and then I apply the filter with red mask (#FF0000) selecting "Mask by color", then something strange happens, the mask edges still appear. But if I paint new regions in red, the filter works on the new regions. The original red line over de yellow wire still having the problem that I had mentioned.
Using GIMP 2.8.4, Kubuntu 64bits

Edit: Now I have done another test and the problem also occurs in the new regions that I paint. I really do not know when the problem occurs, or when not.
Edit2: This file is that works:
http://www.fileswap.com/dl/muk1p6GMiV/i ... 1.xcf.html

_________________
Image
Be patient, English is not my language.


Last edited by YAFU on Fri Mar 22, 2013 5:42 pm, edited 4 times in total.

Top
 Post subject: Re: About the next G'MIC surprise
PostPosted: Fri Mar 22, 2013 4:50 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: Jan 03, 2011
Posts: 1656
Indeed, there was a bug with the top layer masking mode. It should be fixed now (you need to refresh your filters).
Note also that your red mask is *not* perfectly red, so using the 'color mask' mode will not select all your shape, but will exclude pixels that are aliased red, that explains you don't get the desired mask at the end.


Top
Post new topic Reply to topic  [ 42 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group