On the Road to 3.7

This thread enumerates the list of changes in the G’MIC project since the latest major version (3.6), until it reaches the next major version 3.7 (so everything added in versions 3.6.x, with x>=1, and 3.7.0 included).

New features

  • [gmic-qt-365] New filter Degradations / Offset Tiles generates glitch effects by randomly shifting horizontal/vertical stripes in images.

  • [gmic-qt-363] New filter Rendering / Gradient [Poles] generates color gradients from moveable colored keypoints, directly on the preview widget.

  • [stdlib-367] New command random_patches renders a set of square images containing random geometric shapes and textures. Useful to generate input images for training neural networks without copyright issues (e.g denoising or upscaling networks).

  • [stdlib-362] New command pca performs PCA (Principal Component Analysis) on a set of vector-valued samples and eventually projects it in a vector sub-space (with lower dimension). Can be used to determine the orientation of shapes in images, among other things!

  • [stdlib-362] New command depthmap3d renders a 3D image in an image, as a depth map.

anim_luigi-ezgif.com-optimize

  • [stdlib-362] New command normalmap3d renders a 3D image in an image, as a normal map.

anim_normals3d-ezgif.com-optimize

  • [stdlib-362] Command math_lib: New macro epoch2date() convert an epoch to UTC time.

  • [nn-lib-367] New loss functions have been added or modified, with commands nn_loss_crossentropy, nn_loss_l2, nn_loss_mse, nn_loss_softmax_crossentropy, nn_loss_binary_crossentropy, nn_loss_l1, nn_loss_lp, nn_loss_smoothl1.

  • [nn-lib-364] New command nn_normalize implements a generic normalization layer for neural network, along any combination of axes (can simulate so-called InstanceNorm, LayerNorm, GroupNorm and RMSNorm modules from Pytorch).

  • [core-364] New native command qr computes the QR decomposition of selected matrices. Corresponding math function qr(A,_nb_colsA,_is_reduced_form) does the same directly inside the math evaluator.

  • [core-362] New native command createdir creates file directories on the filesystem.

  • [math-core-367] New functions sigmoid() and logit() added to the math evaluator.

  • [math-core-364] New function indexof(ref,a_0,...,a_k) returns the index i of the element ref in the list of elements a_k (or -1 if ref is not present in the list). Index i starts from 0.

  • [math-core-363] New functions fft() and ifft() compute the Fast Fourier Transform (and its inverse) on image-valued variables. Equivalent to existing commands fft and ift, but directly in the math evaluator.

  • [math-core-362] Make loop variable $% available from the math expression evaluator.

Improvements / Modifications

  • [stdlib-366] Improvement of the nn_lib : Lp-losses have been recoded, Smooth-L1 loss has been added. Passing tensors from one network to another has been simplified, so managing multiple networks at the same time is easier.

  • [stdlib-365] Each G’MIC-Qt filter now has a simple description saying what the filter does.

  • [stdlib-365] Command animate has now a fullscreen mode (CTRL+F).

  • [stdlib-364] Command invert is now a non-native command, part of the G’MIC standard library. It is based on the newest version of native command solve.

  • [stdlib-364] Command invert is now a non-native command, part of the G’MIC standard library. It is based on the newest version of native command solve.

  • [stdlib-363] Command clut: All CLUTs have been re-compressed with compression parameters that allow more precision.

  • [nn-lib-364] The nn_batchnorm command has been removed from nn_lib. For technical reasons, batch statistics cannot be calculated during training, and the simplified version of batchnorm that was implemented actually made network training less efficient than without using this module. Use newest generic nn_normalize module instead.

  • [nn-lib-363] Command nn_nl : L2-normalization activation has been added a a possible nonlinear function.

  • [nn-lib-363] Gradient momentum and weight decay are now implemented for all optimizers (not only adam and adamax).

  • [nn-lib-363] Trainer module has been recoded and is now more flexible, easing the passing of parameters to chosen optimizer and scheduler.

  • [nn-lib-362] Adam optimizer now implements a decoupled weight_decay (AdamW variant).

  • [core-364] Improve robustness of variance computation, using the Welford algorithm.

  • [core-364] Command rand can take now a single argument.

  • [core-364] Commands solve and invert now use the QR-decomposition of matrices (Householder) to do their job. Arguments to choose between LU/SVD options have been removed (it also applies to the corresponding functions in the math evaluator).

  • [math-core-365] Function stats() can now compute the statistics vector from an input vector X seen as an image of size (w,h,d,s), with: stats(X,w,h,d,s).

  • [math-core-365] Function ftt(): Allow multiple axes to be specified as a string.

  • [math-core-364] Pixel access functions have been optimized when used on 1D or 2D images (particularly with linear or cubic interpolations). Before, interpolation were computed on all 3D coordinates.

  • [math-core-364] Function expr() can now take an additionnal vector-valued argument used as a reference image for the given expression.

  • [math-core-364] Function fill() has a new variant fill(A,w,h,d,s,'expr') that fill the vector-valued variable A with the specified expression expr.

  • [math-core-363] Function epoch() now computes epoch from UTC time.

  • [math-core-363] Optimized versions of multi-arguments functions min(), max(), argmin(), ... when invoked with only one or two arguments.

  • [math-core-363] Function lerp(a,b,t) now accepts a vector value for t (that has same size as arguments a and b).

  • [web-363] Added a new code sample “Morph Shape”, in the Gallery section of the G’MIC website.

codesamples_thumb_5

anim_tunnel3d-ezgif.com-optimize(1)

Bugfixes

  • [core-366] Command polygon: Fix integer-rounding of segment coordinates, leading to more precise drawing.

  • [core-365] Fixed sources so that G’MIC can be compiled again with gmic_pixel_type=half option enabled.

  • [core-362] Command object3d: Fix vertice brightness for z-clipped triangles, when Gouraud shading rendering mode is used.

  • [math-core-365] Function ftt(): Fix argument parsing when axis is not specified.

4 Likes

I guess 3D things will be the focus of G’MIC 3.7?

No, not particularly. I’m only adding 3D-related commands when I feel there is a need.

Not sure if a new feature to Packed Ellipses can easily be added but I was wonder if an option for an avoidance mask could be implemented (i.e. have the dots contained in selective regions)? If so, great, if not, I understand, David. :slight_smile:

You could also use gimp to select regions.

Not easy, as the initial algorithm has not been designed for that.
I would rather suggest to use the Pack Sprites filter (that allows a mask), with a few ellipses of different ratios as allowed sprites.
Because when packes, the sprites can be rotated/scaled by the packing algorithm, so you’ll get something similar to what Pack Ellipses does.

That’s cool, David; it’s just Packed Ellipse is so much faster and aesthetically more cool for shaping but maybe I use some of the tricks I use with Packed Ellipse to get Packed Sprites to work like I want it to. :slight_smile:

  • 2025/09/24: Release of version 3.6.2.
1 Like
  • 2025/10/13: Release of version 3.6.3.
1 Like

QR decomposition? I’d like to know some examples because that seems exotic to me. I understand the rest (asides from machine learning, which I’ll learn when I can).

It’s a matrix decomposition algorithm that is mainly used to solve linear systems.
So it is internally used by solve and invert : QR decomposition - Wikipedia

  • 2025/11/21: Release of G’MIC 3.6.4.
1 Like

I got these when running with 3.2RC1


1 Like

2025/12/11: Release of G’MIC v. 3.6.5.

Hi, good job, half way there :slight_smile:
But I’ve just built 3.6.5pre, like, 2 days ago… Should i rebuild for 3.6.6pre or is there not much difference for now?

Not much no, apart from better support for ‘half’ datatype (which is something you should probably not care about :slight_smile: ).

1 Like

Yeah, i guess not, there are traps aplenty already :stuck_out_tongue:

I installed GMIC v 3.6.5
2 messages still appear, but after another OK GMIC opens

I installed GMIC v 3.6.5 in GIMP 3.0.6-1
opens without messages

You mean on GIMP 3.2RC1 ?