10
$\begingroup$

I have created some nice patterns using the MidJourney tool. I'd like to find a way to extend these patterns, and I was thinking about an AI tool that takes one of these patterns and extends it in all directions surrounding the original pattern.

Just to give you an idea, this is one of those patterns:

Enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ Re "imagine pattern": Do you mean "image pattern"? $\endgroup$ Commented Sep 29, 2022 at 11:21
  • $\begingroup$ @PeterMortensen They may very well have meant "imagine", given that Midjourney has an "imagine" command, as described in the Midjourney page linked to in the question. $\endgroup$
    – NotThatGuy
    Commented Sep 29, 2022 at 14:35
  • $\begingroup$ @NotThatGuy yes, you are right, it was a mistake due to the /imagine command :-) $\endgroup$ Commented Sep 29, 2022 at 16:38

2 Answers 2

15
$\begingroup$

As Edoardo says in their excellent answer, the task at hand can be approached as an outpainting problem and there's some great tools available to do this.

To throw an alternative into the ring, I'd point to an example in the field of texture synthesis - Self-Organising Textures built with Neural Cellular Automata.

The theory revolves around teaching a very small neural network to generate an image using learned, local update rules. When given a loss function that compares the style of two images, the model can generate textures that seamlessly extend the original.

Within the Self-Organising Texture article, there's a a Google Colab which allows you to import a target image and train the model to reproduce it. I used your image as the target, and it was able to quickly (<20 minutes) make a model that captured the overall pattern of your image:

Version of the provided texture recreated and extended by a learned Neural Cellular Automata (NCA) model. That original texture resembles sun-bleached tree roots, thickly interwined and laced together with cobwebs tightly strung between many of them. This reproduction lacks some high quality details such as small twigs in the cobwebs, but overall faithfully reproduces arcs and twists of the original branches.

There are options for refining the resulting texture with different loss functions, and even exerting a degree of artistic control using relative noise levels in the generation process. One of the creators of the models, Alexander Mordvintsev, has an excellent YouTube channel where he walks through some of these techniques and I'd highly recommend checking it out if you want to pursue using this method. Have fun!

$\endgroup$
2
  • 1
    $\begingroup$ I've tested the link Colab you put in your reply, and it works great, but how do I change the resolution of the generated pattern ? $\endgroup$ Commented Sep 30, 2022 at 11:44
  • $\begingroup$ I'll start by saying that control of these systems is something of an open question! In this case, the biggest resolution bottleneck is when the image is loaded - it's then constrained to 128x128 pixels, meaning that much of the fine detail is never shown to the model. You can change this by upping the value in the imread() call but this will make the training time longer. Alternatively, you could train two separate models, one of the "branches" and one on a zoom in of the "detail" between and use the noise method I linked in my answer to make them work together. Good luck :) $\endgroup$ Commented Sep 30, 2022 at 15:09
9
$\begingroup$

The task you would like to accomplish is referred to as "outpainting". See example below.

Enter image description here

Very recently, OpenAI released an outpainting feature that extends the possible operations to perform with their diffusion model DALL-E.

It is also worth to mention the Stability AI Stable Diffusion model infinity extension (from which I took the example GIF image above). The nice thing of stable diffusion is that, unlike DALL-E, it has been publicly released.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .