GIMP Chat http://gimpchat.com/ |
|
GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugin http://gimpchat.com/viewtopic.php?f=9&t=20652 |
Page 3 of 5 |
Author: | contrast_ [ Sun Dec 10, 2023 2:15 am ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl |
EXTREMELY EXCITING NEWS. THIS PLUGIN UPDATED AND NOW LOADS IN A FEW SECONDS OR LESS ON MOST IMAGES IF THE USER CHECKS AND UNCHECKS A CHECKBOX. IT ALSO IS WAY SIMPLER TO USE ok its official I am now a co-developer of this bash plugin because I made these modifications to Liam's tool. Here is it loading very quicky because I pressed the checkbox twice, and notice the two entry boxes? One of them is for bash and the other is for GEGL syntax that comes after bash, and the bash only updates if the checkbox is enabled. Attachment: funs2.png [ 539.5 KiB | Viewed 51658 times ] A known inconvenience that is not a bug exist, it loads the previous image in /tmp/out.png. Once the bash string updates it will replace the picture of the young lady with the bird background removed. The previous image still loads and we can't currently solve this. Attachment: known_issues.png [ 597.49 KiB | Viewed 51658 times ] Applying the same REMBG and GEGL string command on multiple images and 100% automated in a few seconds. REMEMBER TO PRESS THE CHECKBOX TWICE The GEGL commands load even if the bash string is not active. The bash string is the only one that is disabled until the checkbox is pressed. This will be on my Github soon https://github.com/LinuxBeaver/ Attachment: same_and_quick.png [ 890.46 KiB | Viewed 51658 times ] |
Author: | contrast_ [ Sun Dec 10, 2023 2:17 am ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl |
Update here to the December 10th 2023 version (non flatpak Linux only) and this time it is in GEGL operation under the name Bash Plugin download/file.php?id=70425 Location to put binaries /home/(USERNAME)/.local/share/gegl-0.4/plug-ins |
Author: | contrast_ [ Sun Dec 10, 2023 2:43 am ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl |
Oh yeah I forgot to mention by default this loads the most likely REMBG directory for most systems. If typing in REMBG in bash works for you then this will instantly call REMBG. Perhaps I can make separate plugins. One for REMBG, one for GFPGAN and one for GMIC but that would be silly as most people here I assume know how to paste bash syntax and of course people use mini conda that is an alt directory. tee hee Now Remember, this known problem that everyone will have to get use to Attachment: prev.png [ 1.14 MiB | Viewed 51648 times ] Attachment: prev2.png [ 1.16 MiB | Viewed 51648 times ] BTW readers, if I get professional help and attention for "big Gimp Youtube channels" I will consider porting this to Windows in Power Shell and making an even better GUI. Make sure to check out my other work and plugins like my layer effects engine ( I am only posting this because I know this thread is getting a lot of views) and I want to point people to my other awesome work in Gimp https://github.com/LinuxBeaver/GEGL-Eff ... using-GEGL ![]() Attachment: pasted_image098.png [ 815.93 KiB | Viewed 51648 times ] Have an awesome day everyone. I care about Gimp so much. ![]() |
Author: | contrast_ [ Sun Dec 10, 2023 3:06 am ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string our bash plugin |
Here's System GMIC being called with the update. It is so much easier. So If you uncheck it to early the filter may glitch, that is an indication you need to wait longer before unchecking. I made that mistake on this early. Smoothing is slow. Attachment: so_fun_gegl.png [ 724.23 KiB | Viewed 51639 times ] Here try this command yourself Box 1 for bash Code: Select all gmic /tmp/in.png output /tmp/out3.jpg && gmic -i /tmp/out3.jpg fx_smooth_anisotropic 10,0.512,1,2.15,8.61,1.6504,80.48,5,0,1,10,0,0,50,50 -o /tmp/out.png Box 2 for GEGL Code: Select all bloom strength=9 |
Author: | contrast_ [ Sun Dec 10, 2023 3:51 am ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with Liam's bash pl |
GMIC Anistropic smoothing followed by GEGL saturation, cartoon, emboss by overlay and bloom. 1 GMIC filter and 4 GEGL filters chained together. Attachment: gmic_and_bash.png [ 1.45 MiB | Viewed 51616 times ] COMMAND FOR BASH BOX Code: Select all gmic /tmp/in.png output /tmp/out3.jpg && gmic -i /tmp/out3.jpg fx_smooth_anisotropic 10,0.512,1,2.15,8.61,1.6504,80.48,5,0,1,10,0,0,50,50 -o /tmp/out.png COMMAND FOR GEGL BOX Code: Select all saturation scale=1.6 |
Author: | contrast_ [ Sun Dec 10, 2023 4:25 am ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string our bash plugin |
ok, I just did another mini update bug fix. All downloads are up to date. There is still a unique bug that sometimes occurs and can only be solved by typing nop (the do nothing command) or any valid gegl syntax in the GEGL box. |
Author: | contrast_ [ Sun Dec 10, 2023 2:45 pm ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
I'm calling the system's GEGL in Gimp so I can run GEGL commands before bash. However due to running system GEGL means I have to have the non Gimp GEGL package installed (sudo apt install gegl) Attachment: theory_of_smooth_paint.png [ 1.27 MiB | Viewed 51307 times ] Information to give Bash Box Code: Select all gegl -i /tmp/in.png -o /tmp/outgegl.png -- gegl:gegl string=' gaussian-blur std-dev-x=0.5 std-dev-y=0.5 id=containall src aux=[ ref=containall id=1 posterize levels=10 cubism tile-size=10 id=0 dst-out aux=[ ref=0 component-extract component=alpha levels in-low=0.15 color-to-alpha opacity-threshold=0.4 ] over aux=[ ref=1 opacity value=0.3 ] id=3 overlay srgb=true aux=[ ref=3 emboss opacity value=0.3 ] ] crop ' && gmic /tmp/outgegl.png output /tmp/out3.webp && gmic -i /tmp/out3.webp fx_smooth_anisotropic 10,0.512,1,2.15,8.61,1.6504,80.48,5,0,1,10,0,0,50,50 -o /tmp/out.png Information to give GEGL box Code: Select all unsharp-mask scale=1.1 not much lol. In fact we could have done the entire thing in the bash box. Also here is another command with bash syntax unique to my system's custom GFPGAN directory so I cannot post a code box of it. GMIC's jpeg smooth GFPGAN, REMBG and GEGL commands to outline and add a background were added. This only took 7 seconds where as a few days ago it may have took over 5 minutes Attachment: amazing_progress_gegl_bash.png [ 821.85 KiB | Viewed 51307 times ] So readers just know that it is possible that a Windows version may come soon as we are figuring out how to call PowerShell in this. |
Author: | contrast_ [ Sun Dec 10, 2023 2:49 pm ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
If I get someone professional to help me and host a website with REMBG with special exceptions I will attempt to run REMBG in the cloud from GEGL to show that it is possible to do without installing REMBG. I can't do it myself so I hope a knowledgable participant chimes in. |
Author: | racer-x [ Sun Dec 10, 2023 3:56 pm ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
There is already this site.... https://www.remove.bg/ |
Author: | contrast_ [ Sun Dec 10, 2023 5:17 pm ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
I know but that website doesn't run through a cli via bash |
Author: | contrast_ [ Sun Dec 10, 2023 9:20 pm ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
I wrote new syntax that blurs the background after running REMBG. It requires these two plugins of mine to work ideally. This only takes a few seconds on my machine. https://github.com/LinuxBeaver/Threshol ... /releases/ https://github.com/LinuxBeaver/Gimp-Plu ... -/releases (chrome text ships with edge smooth that it requires) Attachment: rembg_and_bg_blur.png [ 910.26 KiB | Viewed 41925 times ] Attachment: amazing_gegl_fun.png [ 757.53 KiB | Viewed 41925 times ] Bash Code Code: Select all rembg i /tmp/in.png /tmp/out.png GEGL Code Code: Select all
|
Author: | contrast_ [ Sun Dec 10, 2023 9:30 pm ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
Stat regarding a hopeful Windows version I tested this plugin on Windows and it appears to by default trying to communicate with cmd.exe and not powershell. cmd.exe was rapidly opening and closing. When I typed in powershell --command it froze Gimp indefinitely and an error window popped up about reporting it. We are going to see if we can get a separate Windows version of this plug-in now that we know it at least tries to talk to Windows. This will be the first GEGL plugin of mine that has two special versions for both Windows and Linux. In every other case what works on Windows works on Linux. |
Author: | contrast_ [ Mon Dec 11, 2023 2:08 am ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
This instructs GEGL to remove a background with REMBG and fix rembg erosion, then blend the fish with the hard light blend mode on saturation followed up by a blue outline. This requires these two plugins to work https://github.com/LinuxBeaver/Threshol ... n/releases https://github.com/LinuxBeaver/GEGL---C ... r/releases Attachment: fish_select.png [ 483.92 KiB | Viewed 41817 times ] Bash Command Code: Select all rembg i /tmp/in.png /tmp/out.png GEGL Syntax (requires two of my plugins) Code: Select all lb:threshold-alpha alphadegree=1 id=rembgremove gimp:layer-mode layer-mode=normal opacity=0.5 aux=[ ref=rembgremove] lb:edgesmooth alpha-percentile2=80 ] |
Author: | contrast_ [ Mon Dec 11, 2023 4:08 pm ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
REAL ESRGAN AND IMAGE MAGICK CALLED FROM BASH IN GEGL Image Magick was called to scale down RealESRGAN 4x to 25% of its original size so it would fit the original image in Gimp's canvas. I used Lancoz interpolation which is the best Image Magick has. Attachment: real_esrgan.png [ 351.41 KiB | Viewed 41763 times ] The original string only works on my computer but I made a modified version that may work on other machines that have REALESRGAN and ImageMagick installed in generic directories. Bash Command Code: Select all realesrgan-ncnn-vulkan -i /tmp/in.png -o /tmp/out3.webp -n realesrgan-x4plus s= 2 && magick /tmp/out3.webp -filter Lanczos -resize 25% /tmp/out4.webp && gmic /tmp/out4.webp output /tmp/out.png GEGL Syntax NA - this stays empty unless you want to put something I also tested running REALESRGAN, GFPGAN and REMBG at at once and it worked but took over 25 seconds. It probably would have took 30 minutes a few days ago before the update. |
Author: | contrast_ [ Mon Dec 11, 2023 5:19 pm ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
Here's GEGL calling an image magick filter followed by GEGL's Sharpen. This loads instantly because it is just a simple lighting filter Attachment: image_magick_instant.png [ 580.73 KiB | Viewed 41756 times ] Bash Command Code: Select all magick /tmp/in.png +level-colors red, /tmp/out.png GEGL Command Code: Select all unsharp-mask scale=2 Learn how to write image magick syntax here https://imagemagick.org/script/command-line-options.php Learn how to write GEGL syntax here gegl.org/ |
Author: | contrast_ [ Mon Dec 11, 2023 7:58 pm ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
UPDATE, THIS CODE REQUIRES GEGL'S BLENDING OPTION TO BE SET TO NORMAL, as opposed to the default replace. Here is an example of me using the system's GEGL + REMBG then Gimp's GEGL to recolor an object inside the image. The car goes from Yellow to Aqua Blue. Attachment: recolor_car_aqua_blue.png [ 898.69 KiB | Viewed 41744 times ] Command for Bash box Code: Select all gegl i /tmp/in.png /tmp/outgegl.png -- gegl:gegl string=' hue-chroma hue=134 saturation scale=0.8 levels out-high=0.9 unsharp-mask scale=0.8 ' && rembg /tmp/outgegl.png -o /tmp/out.png Command for GEGL box Code: Select all
|
Author: | contrast_ [ Mon Dec 11, 2023 9:28 pm ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
UPDATE, THIS CODE REQUIRES GEGL'S BLENDING OPTION TO BE SET TO NORMAL, as opposed to the default replace. Recolor an object study 2. Make the duck blue. Attachment: blue_duck.png [ 1 MiB | Viewed 41741 times ] Or saturate and color adjust the duck (more realistic) Attachment: duck_saturate.png [ 929.64 KiB | Viewed 41741 times ] COMMAND FOR BASH BOX Code: Select all rembg i /tmp/in.png /tmp/out.png COMMAND FOR GEGL BOX (Requires my plugins chrome and Threshold alpha 2) Code: Select all lb:threshold-alpha alphadegree=1 |
Author: | contrast_ [ Tue Dec 12, 2023 7:13 am ] | ||
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi | ||
REMBG AND BASH BOX IN MY GEGL EFFECTS PLUGIN I got bash box working in an unreleased version of my layer effects engine. GEGL Effects is applying effects after REMBG, but it can also do any other bash string. Here is the download to my GEGL Effects layer effects engine that does NOT include this update. But soon it will! https://github.com/LinuxBeaver/GEGL-Eff ... L/releases Now that we know GEGL is capable of doing all this, its safe to say Gimp's future is secured.
|
Author: | contrast_ [ Tue Dec 12, 2023 7:32 am ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
It is so exciting to see REMBG inside an unreleased version of GEGL Effects! Its amazing how these workflows are being automated. Attachment: rembg_in_gegl_effects.png [ 611.98 KiB | Viewed 41687 times ] |
Author: | contrast_ [ Tue Dec 12, 2023 4:56 pm ] |
Post subject: | Re: GEGL calls GMIC, REMBG, AIs or any bash string with our bash plugi |
AI IN GEGL EFFECTS It is working consistent and stable in GEGL Effects. I will push the GEGL Effects December 12 update soon and now everyone gets to see my special Linux Desktop that looks like Windows XP, lol. Attachment: AI_in_gegl_effects.png [ 1.09 MiB | Viewed 44870 times ] Attachment: AI_effects_2.png [ 1.04 MiB | Viewed 44870 times ] |
Page 3 of 5 | All times are UTC - 5 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |