On the road to 3.5

This is the changelog of the G’MIC software project, until the release of the 3.5 version.

It lists all new features and changes done since the previous major version 3.4.0.

New features:

  • [stdlib_350] nn_lib: Multiple neural networks can now be handled at the same time within the library.

  • [gmic-qt-344] New filter Repair / Upscale [CNN2x] doubles image size using a small convolutional neural network (CNN).

  • [stdlib_344] nn_lib: Implementation of gradient clipping and L2 weight regularization for neural networt trraining.

  • [core-342] Native implementation of the softmax() function, both with command softmax and math function softmax().

  • [gmic-qt-341] Add native preview splitter in the G’MIC-Qt interface.

  • [stdlib-341] New command input_normalized (shortcut: in) loads an image and ensures its value range is inside [0,255]. Useful to load images that can be either 8bits/channel or 16bits/channels without worrying about normalizing the value range.

  • [stdlib-343] New commands isinf and isnan select respectively inf and nan values in selected images.

  • [core-343] Add native I/O support for .webp files (enabled by default for Linux builds).

Modifications / Optimizations :

  • [core-350] Command output: When saving .png files, it is now possible to force the bit depth used in the saved file.

  • [core-350] Command window: When command is invoked with a single argument like 200%, makes it also the default value for the second argument.

  • [core-350] Commands convolve and correlate have been partially recoded. List of arguments have changed to reflect these changes.

  • [gmic-qt-342] Add code to be compatible with upcoming GIMP 3.0 plug-in API (cool contribution from Host/Gimp: convert to new GimpProcedureConfig APIs by berrange · Pull Request #208 · c-koi/gmic-qt · GitHub).

  • [gmic-qt-342] New keyboard shortcut CTRL+SHIFT+P enables/disables preview splitter.

  • [core-341] Command mproj has been recoded and optimized.

  • [stdlib-341] Hide non-native preview splitter of G’MIC-Qt filters, when G’MIC version number is 3.4.1+ (use native G’MIC-Qt preview splitter instead).

  • [stdlib-343] Command autocrop converted from native to custom command of the stdlib, with new axes option added. Command autocrop_coords has been recoded from scratch, with new axes option added as well.

  • [stdlib-344] nn_lib: Implements Cosine Annealing LR scheduler as an option for the trainer. Also implements pixel shuffle layer for image up/down-scaling.

  • [math-core-343] Function sort(): Add optional argument that specifies the index of the sorted values, when dealing with multi-valued blocks.

  • [math-core-344] Function isin(): Detect and optimize case where every given argument is a constant (so returned boolean can be computed at compile time).

Bugfix :

  • [stdlib-344] nn_lib: A lot of bug fix and various improvements in various kind of network layers (normalization, strided convolution).

  • [stdlib-343] Command input_gpl: Fix file parsing bug.

  • [gmic-qt-342] Fix bug in native preview splitter (reported here: https://discuss.pixls.us/t/half-preview-left-or-right-bug-in-3-4-1

  • [core-341] Command polygon: Fix argument parsing bug that prevented filling a polygon with a negative-value color.

  • [math-core-343] Fix/recode function v() that generates random integers to make it work correctly with larger ranges.

  • [math-core-343] Fix functions operator=(), find() and same(), when value or value sequence to search for or to compare contain NaN values.

  • 2024/08/28: Release of G’MIC 3.4.1.
1 Like

Native preview splitter? Hmm? Is there some code changes that is recommended when I get back to G’MIC coding?

Thanks for the head’s up, David. Just tested and so far all seems well. :slight_smile:

Spoke too soon; looks like distance transform is not working right. :slight_smile:

edit.

Tried with other images and works fine; for some reason image at link below doesn’t work. Weird. Even the previous version of G’MIC I had had same issue with this image. Not sure why. :slight_smile:

Tiny mushroom - macro play raw - Processing / Play Raw - discuss.pixls.us

edit.

Now if I save as PNG and then open in another program and copy image to clipboard and paste into GIMP, it works. Wonder if it’s a colorspace issue that I’m not seeing that’s causing the issue? :slight_smile:

Actually, never mind on this. I don’t think it would affect anything.

@David_Tschumperle Do you think gcd_shuffle can be part of the standard library? Renamed as shuffle. I find myself using it every time I just want to randomize pixel position.

2 Likes

Feature Request: I would like to use a variable to disable native preview. There are few filters of mine that don’t even use it.

2024/09/04: Release of G’MIC 3.4.2.

1 Like

I actually finally found a case where constant vector might be useful while making base642str_uint8. When I wanted to resize in-place using a indice of a vector, it’s not possible for now. But, if a vector can be made to be a const, then it would be possible. Just to let you know this, that there’s a case for constant vector.

Using kubuntu 24.04 / Gimp 2.10.38 / gimp_gmic_qt 3.4.2

Using Black & White → Colorize(interactive) I get this error when I add an additional palette. Works ok without additional palette.

*** Error in ./fx_colorize_interactive/*repeat/*substitute/x_colorize/ *** Command ‘local’: [instance(1,1,1,51,0x7800141b3ee0,shared)] gmic::assign(): Invalid assignment request of shared instance from specified image (820,720,1,3).

I can go back to an earlier version gimp_gmic_qt 3.2.3 and it works fine with additional palettes.

1 Like

Thanks @rich2005 , I’m investigating right now !

Me too.

gmic branch: (HEAD -> develop, origin/develop
commit 51d0b5a538e8 Fri Sep 6 18:49:10 2024 +0200
		   
gmic-qt branch:
commit aa4a6f4ab174 Tue Sep 3 16:21:58 2024 +0200 "Enable preview when switching preview type"

gimp: 2.10.36

uname -a: Linux bertha 6.6.47-gentoo-bertha #1 SMP PREEMPT_DYNAMIC Sun Sep  1 05:09:09 EDT 2024 x86_64 AMD Ryzen 9 7950X3D 

In Gimp:
1. Load RGB Mode image - three channels, no alpha/opacity
2. Filters ⇒ G'MIC-Qt
3. In G'MIC-Qt:
   a. Settings ⇒ Other (Tab) ⇒ Debug (log file)
   b. Available filters ⇒ Black & White ⇒ Colorize [Interactive]
      (No preview available)
   c. In Colorize [Interactive]:
      i. 1st Additional Palette (.gpl) Dialog box,
                                       choose .gpl from somewhere,
				       click on Open
				       note: button name changes to
				       GPL palette file name.
   d. Click "Apply" to begin interactive session. Error message box instead.

errbx
This is the debug dump:
gmic_qt_log.txt (2.4 MB)
Error box is the last of a cascade of errors. Next error upstream is Error in ./fx_colorize_interactive/*repeat/*substitute/x_colorize/*if/*repeat/*local/*thread2/ *** Command 'to_color': Image [0] is not a G,GA,RGB or RGBA image (897 channels).
Haven’t spelunked up further to see where we left the rails. Have laundry to do. Might try a bisect later to see which commit first went south.

Bug fixed with :

and

There was a bug in the command that parses the .gpl palette files.

Filters updated has been pushed on the G’MIC server.
Let me know if that works for you, @rich2005 !

on branch develop: commit 85b1057bbae9 Sun Sep 8 16:09:21 2024 +0200 "Command 'input_gpl': Fix parsing of .gpl files."

Seems fine here now.

gosgood@bertha /dev/shm $ gmic run 'input_gpl /dev/shm/flagoffrance.gpl input_gpl /dev/shm/Named_Colors.gpl'
[gmic]./ Start G'MIC interpreter (v.3.4.2).
[gmic]./run/__run/ Input palette from file '/dev/shm/flagoffrance.gpl'.
[gmic]./run/__run/ Input palette from file '/dev/shm/Named_Colors.gpl'.
[gmic]./ Display images [0,1] = 'flagoffrance.gpl, Named_Colors.gpl'.
[0] = '/dev/shm/flagoffrance.gpl':
  size = (3,1,1,3) [36 b of float32].
  data = (0,255,239^85,255,65^164,255,53).
  min = 0, max = 255, mean = 152.333, std = 102.775, coords_min = (0,0,0,0), coords_max = (1,0,0,0).
[1] = '/dev/shm/Named_Colors.gpl':
  size = (448,1,1,3) [5376 b of float32].
  data = (255,248,245,220,255,253,250,250,255,255,255,255,255,255,255,255,255,255,240,245,240,240,230,255,255,255,0,47,105,112,119,190,211,25,0,100,72,106,123,132,0,65,0,30,0,135,135,70,176,173,176,175,0,72,64,0,224,95,102,127,0,85,143,46, ... ,80,180,167,144,98,197,184,158,108,185,173,149,101,171,159,137,93,179,167,144,98,150,140,120,82,255,238,205,139,250,233,201,137,255,238,205,139,255,238,205,139,255,238,205,139,255,238,205,139,255,238,205,139,255,238,205,139,169,169,139,139,139,0,144).
  min = 0, max = 255, mean = 155.554, std = 78.416, coords_min = (26,0,0,0), coords_max = (0,0,0,0).

Thank you David, Working for me as well. A fine case of measles

1 Like

kubuntu 24.04 / Gimp 2.10.38 / gimp_gmic_qt 3.4.2

Details → Mask Creator I get this error when the Apply Mask option is enabled. (ok without it on)

*** Error in ./fx_tk_mask/*repeat/*local/*if/ *** Command ‘a’: Invalid selection ‘[-4,-3,-2,-1]’ (contains index -3, not in range -1…0).

That error maybe been around a while ?

Ditto here: Throws the exception once the option box is clicked.

Likely. Tom Keil hasn’t visited in a decade or so. But I ventured into this particular plug-in some time ago and have some familiarity with it. Off to do NYC work, however, and won’t be able to touch it until this evening, East Coast North America time.

As always, thank you for taking the time to notice and report.

gmic-community on master branch: commit 325ce7930f8f Tue Sep 3 00:54:58 2024 -0400