rrc: (Default)
I try not to pay attention to AI publicity, but the latest google gemini blog post happened to cross my screen today, and it contained the following image which drew my attention:

Screenshot of a prompt and a Barnsley fern from https://blog.google/products/gemini/gemini-2-5-pro-updates/

It drew my attention because its something I'm very familiar with. I used to generate fractal ferns on my zx spectrum in the late 1980s. So I took a closer look.

So, I'm not quite sure what the Prompt was meant to produce, in this case there is an animation of a fern kind of flapping about a bit. At first glance its very impressive - did the AI analyze the image, "realise" it could compress it to a simple IFS, and then calculate the required affine transformations to generate the fern in the photo?

So I look closer, and the answer is definitely a no. The photo is a fern, but clearly a different species of fern from the fractaly generated one. Just look at the shapes of the leaves. The fractaly generated one however looks very like the iconic Barneley fern.

Inspecting the code generated by gemini reveals that this is exactly the case - down to including the descriptive comment:


// Base Barnsley Fern IFS (Iterated Function System) parameters
const baseFunctions = [
    { a: 0,    b: 0,     c: 0,     d: 0.16,  e: 0, f: 0,    probability: 0.01 }, // Stem
    { a: 0.85, b: 0.04,  c: -0.04, d: 0.85,  e: 0, f: 1.60, probability: 0.85 }, // Smaller leaflets
    { a: 0.20, b: -0.26, c: 0.23,  d: 0.22,  e: 0, f: 1.60, probability: 0.07 }, // Left leaflet
    { a: -0.15,b: 0.28,  c: 0.26,  d: 0.24,  e: 0, f: 0.44, probability: 0.07 }  // Right leaflet
];



So this is not an example of deriving an IFS compression of an image (a technique that was doable in the '90s btw - it was used to compress the images in Microsoft Encarta), but rather a very specially chosen prompt combination of a photo of a fern and a prompt to elicit a Barnsley fern output.

But then, it introduces code to make it 'wave' about. This is done by introducing small random variations into the transformations. But this is done *without* understanding that this is an image if a fern - a plant. And most of these variations result in the stem - a highly important structural part of the fern becoming disconnected:

A n image of a Barnsley like fractal fern, with a disconnected stem.

If the model understood what it was doing, it would generate variations that keep the stem connected.

Mind you, if the model understood what it was doing, it would make the generated fern look more like the one in the photo.

Now, I am not a botanist (far from it), but even to me - and just using the Barnsely fern wikipedia entry, the transforms for the Thelypteridaceae fern in the Mutant varities section of the wikipedia entry would have been a much better match for the photo.

May 2025

S M T W T F S
    123
456 78910
11121314151617
18192021222324
25262728293031

Syndicate

RSS Atom

Most Popular Tags

Active Entries

Style Credit

Expand Cut Tags

No cut tags