purr icon indicating copy to clipboard operation
purr copied to clipboard

Feature Request: scale attenuation

Open oovm opened this issue 5 years ago • 2 comments

I hope to generate larger brushes in the initial steps, and generate smaller brushes for fine-tuning in later steps.

which means:

https://github.com/chux0519/purr/blob/fc017a55a6a82bcf87ea0f3271d8e547fa3e04e3/src/core/mod.rs#L71

change to

pub struct PurrContext {
    pub scale: PurrScale
}

pub enum PurrScale {
    Constant(f32),
    Multiplier(Vec<f32>)
}

where length of multiplier should be equal to numbers of shapes.

oovm avatar Nov 21 '20 14:11 oovm

I see what you mean. It's a great idea. But it has nothing to do with the scale parameter, which is not actually used to control the size of the brushes. It is a fixed scaling parameter, e.g., if you use a 1024x1024 image as input, the program will first scale it to 256x256 by default (which can be controlled by the -r parameter) to reduce the amount of computation (since the output image itself is an approximation), so the scale will be fixed at 1024 / 256 = 4.0 (if not scaling, then the output image will be 256x256).

The features you describe may be more relevant to the model itself or to the graphics themselves, such as modifying the process for each generation here: https://github.com/chux0519/purr/blob/master/src/core/hill_climb.rs#L87 Or refactor PurrShape::random so that it senses the steps that are being performed now, and thus affects the size and scope of the generation, I haven't figured it out yet, I'll try to implement it when I have more free time. (sorry for the late reply, I just saw this issue today)

chux0519 avatar Nov 28 '20 12:11 chux0519