Style transfer soon in G'MIC

Left you a message at GIMPChat, Sallyanne. Now it’s your turn to partake in the Stylize crack. lololol

Taking 4 hours off today (will have to head off to work soon). Anyway, take care and enjoy. Look forward to seening more from you soon. :slight_smile:

Good stuff. A few more optimizations and maybe, just maybe, I might be able to pull one off myself.

Thought it was a butterfly until I scrolled up (No; didn’t take any drugs. lol)

3 Likes

Almost it seems painted manually

2 Likes

Hi,
Thank you for your research!
I can’t find the update before launching G’mic on gimp 2.8…22 on ubuntu 18…
thanks for your help

Hi @ChristianA,

Have you installed the latest gmic from the website?

Hi, yes i installed

Ubuntu 18.04 LTS Bionic: .deb package

thanks

Le mar. 16 juil. 2019 à 20:49, Mica via discuss.pixls.us noreply@discuss.pixls.us a écrit :

Have you clicked the refresh button a few times?

yes in preferences to :

update

Le sam. 20 juil. 2019 à 17:10, Mica via discuss.pixls.us noreply@discuss.pixls.us a écrit :

Does your version match the latest (2.67 or 2.7)? Might be an older version…

1 Like

How does one go about doing this by command line? and to use own images as style?

I am trying to start to use pyton-gmic :slight_smile:

The example I was given is

gmic.run(“pathtoimage _fx_stylize starrynight +fx_stylize 1,6,0,0,0.5,2,3,0.5,0.1,3,3,0,0.7,1,0,1,0,5,5,7,1,30,1,2,1.85,0”)

But it says it can’t find the image. And if I try to put the path in my own disk it still tries to download it from the server.

I write this message also for the future if someone wants to do the same

try with

… output out.png")

It has nothing to do with the output.

The problem is it’s not reaching the image for the style.

GmicException Traceback (most recent call last)
in
----> 1 gmic.run(“athoimage _fx_stylize starrynight +fx_stylize 1,6,0,0,0.5,2,3,0.5,0.1,3,3,0,0.7,1,0,1,0,5,5,7,1,30,1,2,1.85,0 output out.png”)

GmicException: *** Error in ./_fx_stylize/*if/ *** Unreachable network file ‘https://gmic.eu/img/style_starrynight.png’.

But the file exists.

and if I try my own image it still tries to search in the server so I need to know if the command is different for a local style or if it’s not possible with a local style

1 Like

The command string you are showing calls:
_fx_stylize starrynight
this commando looks in ${-path_cache} for the file starrynight.png . If it is not located there gmic tries to download it. Seemingly you have a net problem. try “e ${-path_cache}” to see where it is located.

With your own style image try something like

“sourceimage styleimage +fx_stylize 1,6,0,0,0.5,2,3,0.5,0.1,3,3,0,0.7,1,0,1,0,5,5,7,1,30,1,2,1.85,0”
or
“sourceimage styleimage rv +fx_stylize 1,6,0,0,0.5,2,3,0.5,0.1,3,3,0,0.7,1,0,1,0,5,5,7,1,30,1,2,1.85,0”

sourceimage and styleimage should be filenames of images in gmic. I don’t know how images are addressed in python-gmic. rv exchanges the two images in the list if necessary, I don’t know the sequence for stylize of the images! At least you have to load two images and than call fx_stylize!

1 Like

yay gmic-py in the place!! It seems your computer’s or network’s proxy settings block access to gmic.eu… does running the same command in the gmic cli executable work? gmic-py and gmic cli both use libcurl for accessing internet files… but maybe I should improve the python module’s self-configuration…

Just tested now with Wifi at home:
apples


out_000002

    (gmicpy290numpy) jd@jd-ThinkPad-T400:~/Productions/GMIC/gmic-py/tmp$ python
    Python 3.7.5 (default, Nov 20 2019, 09:21:52) 
    [GCC 9.2.1 20191008] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import gmic; gmic.__version__
    '2.9.2'
    >>> gmic.__build__
    'zlib_enabled:1 libpng_enabled:1 display_enabled:1 fftw3_enabled:1 libcurl_enabled:1 openmp_enabled:1 cimg_OS:1 numpy_enabled:1 OS_type:unix'
    >>> gmic.__spec__
    ModuleSpec(name='gmic', loader=<_frozen_importlib_external.ExtensionFileLoader object at 0x7f01a6733cd0>, origin='/home/jd/.virtualenvs/gmicpy290numpy/lib/python3.7/site-packages/gmic.cpython-37m-x86_64-linux-gnu.so')
    >>> gmic.run("sp apples _fx_stylize starrynight +fx_stylize 1,6,0,0,0.5,2,3,0.5,0.1,3,3,0,0.7,1,0,1,0,5,5,7,1,30,1,2,1.85,0 output out.png")

:tiger: :tiger2: :snake:

2 Likes

I guess you can see

libcurl_enabled:1

in your gmic.__build__ output
if yes, then you may have something blocking outgoing http/https calls on your computer or network

1 Like

Thanks! This worked. I am now on a quest to understand the parameters. It works beautifully! I just want to tweak things here and there.

1 Like

gmic-py has exactly the same syntax as the g’mic language, except that to follow also closely the C++ API, a gmic_list of images is updated along your command string, with the buffers in order. In gmic-py this gmic_list has no special type, it is just a list of GmicImage object.

This images list thing is shown here in the doc’s Quickstart chapter: Quickstart — gmic-py 2.9.4-alpha1 documentation

But writing to you makes me realize there is not even one example on gmic-py’s Github dealing with images list for beginners…