@@ -15,51 +15,51 @@ def get_pipeline():
15
15
# Dithering.dither_type can be 'ordered' for ordered dithering or another string for floyd-steinberg dithering
16
16
dithering_dither_type = random .choice (["ordered" , "floyd-steinberg" ])
17
17
# Dithering.order determines the dimensions of the threshold map
18
- dithering_order = random .choice (range (1 ,10 ))
18
+ dithering_order = random .choice (range (3 ,10 ))
19
19
20
20
# InkBleed.intensity_range is a tuple with bounds for bleed intensity to be selected from
21
- inkbleed_intensity_range = (0.1 , 0.2 )
21
+ inkbleed_intensity_range = (0.1 , 0.4 )
22
22
# InkBleed.color_range is a tuple with bounds for color noise
23
- inkbleed_color_range = (0 , 224 )
23
+ inkbleed_color_range = (0 , 32 )
24
24
# InkBleed.kernel_size determines the radius of the bleed effect
25
- inkbleed_kernel_size = ( 5 , 5 )
25
+ inkbleed_kernel_size = random . choice ([( 7 , 7 ), ( 5 , 5 ), ( 3 , 3 )] )
26
26
# InkBleed.severity determines significance of bleed effect
27
27
inkbleed_severity = (0.4 , 0.6 )
28
28
29
29
# BleedThrough.intensity_range is a tuple with bounds for bleed intensity to be selected from
30
30
bleedthrough_intensity_range = (0.1 , 0.2 )
31
31
# BleedThrough.color_range is a tuple with bounds for color noise
32
- bleedthrough_color_range = (0 , 224 )
32
+ bleedthrough_color_range = (32 , 224 )
33
33
# BleedThrough.ksize is a tuple of height/width pairs for sampling kernel size
34
34
bleedthrough_ksize = (17 , 17 )
35
35
# BleedThrough.sigmaX is the standard deviation of the kernel along the x-axis
36
36
bleedthrough_sigmaX = 0
37
37
# BleedThrough.alpha is the intensity of the bleeding effect, recommended 0.1-0.5
38
- bleedthrough_alpha = 0.3
38
+ bleedthrough_alpha = random . uniform ( 0.05 , 0.1 )
39
39
# BleedThrough.offsets is a pair of x and y distances to shift the bleed with
40
40
bleedthrough_offsets = (10 , 20 )
41
41
42
42
# Letterpress.n_samples is a tuple determining how many points to generate per cluster
43
- letterpress_n_samples = (100 , 200 )
43
+ letterpress_n_samples = (100 , 300 )
44
44
# Letterpress.n_clusters is a tuple determining how many clusters to generate
45
- letterpress_n_clusters = (500 , 1000 )
45
+ letterpress_n_clusters = (300 , 400 )
46
46
# Letterpress.std_range is a pair of ints determining the std deviation range in each blob
47
- letterpress_std_range = (500 , 500 )
47
+ letterpress_std_range = (500 , 3000 )
48
48
# Letterpress.value_range determines values that points in the blob are sampled from
49
- letterpress_value_range = (200 , 255 )
49
+ letterpress_value_range = (150 , 224 )
50
50
# Letterpress.value_threshold_range is the minimum pixel value to enable the effect (e.g. 128)
51
- letterpress_value_threshold_range = (128 , 128 )
51
+ letterpress_value_threshold_range = (96 , 128 )
52
52
# Letterpress.blur enables blur in the noise mask
53
53
letterpress_blur = 1
54
54
55
55
# LowInkLines.count_range is a pair determining how many lines should be drawn
56
- lowinkrandomlines_count_range = (5 , 10 )
57
- lowinkperiodiclines_count_range = (2 , 5 )
56
+ lowinkrandomlines_count_range = (3 , 12 )
57
+ lowinkperiodiclines_count_range = (1 , 2 )
58
58
# LowInkLines.use_consistent_lines is false if we should vary the width and alpha of lines
59
59
lowinkrandomlines_use_consistent_lines = random .choice ([True , False ])
60
60
lowinkperiodiclines_use_consistent_lines = random .choice ([True , False ])
61
61
# LowInkPeriodicLines.period_range is a pair determining how wide the gap between lines can be
62
- lowinkperiodiclines_period_range = (10 , 30 )
62
+ lowinkperiodiclines_period_range = (16 , 32 )
63
63
64
64
# PaperFactory.texture_path is the directory to pull textures from
65
65
paperfactory_texture_path = "./paper_textures"
@@ -75,7 +75,7 @@ def get_pipeline():
75
75
brightnesstexturize_deviation = 0.03
76
76
77
77
# Brightness.range is a pair of floats determining the brightness delta
78
- brightness_range = (0.8 , 1.4 )
78
+ brightness_range = (0.9 , 1.1 )
79
79
80
80
# PageBorder.side determines the page edge of the effect
81
81
pageborder_side = random .choice (["left" , "top" , "bottom" , "right" ])
@@ -95,7 +95,7 @@ def get_pipeline():
95
95
pageborder_value = (32 , 150 )
96
96
97
97
# DirtyRollers.line_width_range determines the width of roller lines
98
- dirtyrollers_line_width_range = (8 , 12 )
98
+ dirtyrollers_line_width_range = (2 , 32 )
99
99
# DirtyRollers.scanline_type changes the background of lines
100
100
dirtyrollers_scanline_type = 0
101
101
@@ -104,7 +104,7 @@ def get_pipeline():
104
104
# LightingGradient.direction indicates the rotation degree of the light strip
105
105
lightinggradient_direction = None
106
106
# LightingGradient.max_brightness and LightingGradient.min_brightness set bounds for how much brightness change will happen
107
- lightinggradient_max_brightness = 255
107
+ lightinggradient_max_brightness = 196
108
108
lightinggradient_min_brightness = 0
109
109
# LightingGradient.mode is linear or gaussian depending on how light should decay
110
110
lightinggradient_mode = random .choice (["linear_dynamic" , "linear_static" , "gaussian" ])
@@ -139,7 +139,7 @@ def get_pipeline():
139
139
# Markup.length_range determines the relative length of the drawn effect
140
140
markup_length_range = (0.5 , 1 )
141
141
# Markup.thickness_range determines the thickness of the drawn effect
142
- markup_thickness_range = (1 , 3 )
142
+ markup_thickness_range = (1 , 2 )
143
143
# Markup.type determines the style of effect
144
144
markup_type = random .choice (["strikethrough" , "crossed" , "highlight" , "underline" ])
145
145
# Markup.color is the color of the ink used to markup
@@ -149,86 +149,70 @@ def get_pipeline():
149
149
# Markup.single_word_mode determines whether to draw across multiple words
150
150
markup_single_word_mode = random .choice ([True , False ])
151
151
# Markup.repetitions determines the number of times the effect is drawn
152
- markup_repetitions = random .randint (1 ,5 )
152
+ markup_repetitions = random .randint (1 ,2 ) if markup_type == "highlight" else 1
153
153
154
154
# PencilScribbles.size_range determines the size of scribbles to draw
155
- pencilscribbles_size_range = (250 , 400 )
155
+ pencilscribbles_size_range = (100 , 700 )
156
156
# PencilScribbles.count_range determines how many scribbles to draw
157
- pencilscribbles_count_range = (1 , 10 )
157
+ pencilscribbles_count_range = (1 , 6 )
158
158
# PencilScribbles.stroke_count_range determines how many strokes per scribble
159
- pencilscribbles_stroke_count_range = (3 , 6 )
159
+ pencilscribbles_stroke_count_range = (1 , 1 )
160
160
# PencilScribbles.thickness_range determines how thick strokes are
161
161
pencilscribbles_thickness_range = (2 , 6 )
162
162
# PencilScribbles.brightness_change is the brightness value of each stroke
163
- pencilscribbles_brightness_change = random .randint (0 , 128 )
163
+ pencilscribbles_brightness_change = random .randint (64 , 224 )
164
164
165
165
# BindingsAndFasteners.overlay_types can be min, max, or mix
166
- bindingsandfasteners_overlay_types = random .choice ([
167
- "min" , "max" , "mix" , "normal" ,
168
- "lighten" , "darken" , "addition" , "subtract" ,
169
- "difference" , "screen" , "dodge" , "multiply" ,
170
- "divide" , "hard_light" , "grain_extract" ,
171
- "grain_merge" , "overlay"
172
- ])
166
+ bindingsandfasteners_overlay_types = "darken"
173
167
# BindingsAndFasteners.foreground is the path to fg image or the image itself
174
168
bindingsandfasteners_foreground = None
175
169
# BindingsAndFasteners.effect_type is "punch_holes", "binding_holes", or "clips"
176
170
bindingsandfasteners_effect_type = random .choice (["punch_holes" , "binding_holes" , "clips" ])
177
171
# BindingsAndFasteners.ntimes gives how many fg images to draw
178
- bindingsandfasteners_ntimes = 3
172
+ bindingsandfasteners_ntimes = ( 10 , 20 ) if bindingsandfasteners_effect_type == "binding_holes" else ( 2 , 3 )
179
173
# BindingsAndFasteners.nscales is the scale of the fg image size
180
- bindingsandfasteners_nscales = (1 ,1 )
174
+ bindingsandfasteners_nscales = (0.9 ,1 )
181
175
# BindingsAndFasteners.edge gives the edge to place the images on
182
- bindingsandfasteners_edge = random . choice ([ "left" , "top" , "bottom" , "right" ])
176
+ bindingsandfasteners_edge = " random"
183
177
# BindingsAndFasteners.edge_offset is how far from the page edge to draw
184
- bindingsandfasteners_edge_offset = 50
178
+ bindingsandfasteners_edge_offset = ( 10 , 50 )
185
179
186
180
# BadPhotoCopy.mask is a mask of noise to generate the effect with
187
181
badphotocopy_mask = None
188
182
# BadPhotoCopy.noise_type determines which mask pattern to use
189
- badphotocopy_noise_type = random . randint ( 1 , 8 )
183
+ badphotocopy_noise_type = - 1 # -1 is random
190
184
# BadPhotoCopy.noise_side determines where to add noise
191
- badphotocopy_noise_side = random .choice ([
192
- "random" ,
193
- "left" ,
194
- "right" ,
195
- "top" ,
196
- "bottom" ,
197
- "top_left" ,
198
- "top_right" ,
199
- "bottom_left" ,
200
- "bottom_right" ,
201
- ])
185
+ badphotocopy_noise_side = "random"
202
186
# BadPhotoCopy.noise_iteration determines how many times to apply noise in the mask
203
- badphotocopy_noise_iteration = (1 , 1 )
187
+ badphotocopy_noise_iteration = (1 , 2 )
204
188
# BadPhotoCopy.noise_size determines the scale of noise in the mask
205
- badphotocopy_noise_size = (1 , 1 )
189
+ badphotocopy_noise_size = (1 , 2 )
206
190
# BadPhotoCopy.noise_value determines the intensity of the noise
207
- badphotocopy_noise_value = (30 , 60 )
191
+ badphotocopy_noise_value = (128 , 196 )
208
192
# BadPhotoCopy.noise_sparsity determines the sparseness of noise
209
- badphotocopy_noise_sparsity = (0.4 , 0.6 )
193
+ badphotocopy_noise_sparsity = (0.3 , 0.6 )
210
194
# BadPhotoCopy.noise_concentration determines the concentration of noise
211
- badphotocopy_noise_concentration = (0.4 , 0.6 )
195
+ badphotocopy_noise_concentration = (0.1 , 0.5 )
212
196
# BadPhotoCopy.blur_noise determines whether or or not to add blur
213
197
badphotocopy_blur_noise = random .choice ([True ,False ])
214
198
# BadPhotoCopy.blur_noise_kernel gives the dimensions for the noise kernel
215
- badphotocopy_blur_noise_kernel = ( 5 , 5 )
199
+ badphotocopy_blur_noise_kernel = random . choice ([( 3 , 3 ), ( 5 , 5 ), ( 7 , 7 )] )
216
200
# BadPhotoCopy.wave_pattern enables the wave pattern in the noise mask
217
201
badphotocopy_wave_pattern = random .choice ([True ,False ])
218
202
# BadPhotoCopy.edge_effect adds the Sobel edge effect to the noise mask
219
203
badphotocopy_edge_effect = random .choice ([True ,False ])
220
204
221
205
# Gamma.range is an interval from which to sample a gamma shift
222
- gamma_range = (0.5 , 1.5 )
206
+ gamma_range = (0.8 , 1.2 )
223
207
224
208
# Geometric.scale is a pair determining how to scale the image
225
209
geometric_scale = (1 , 1 )
226
210
# Geometric.translation is a pair determining where to translate the image
227
211
geometric_translation = (0 , 0 )
228
212
# Geometric.fliplr flips the image left and right
229
- geometric_fliplr = random . choice ([ 0 , 1 ])
213
+ geometric_fliplr = 0
230
214
# Geometric.flipud flips the image up and down
231
- geometric_flipud = random . choice ([ 0 , 1 ])
215
+ geometric_flipud = 0
232
216
# Geometric.crop is a tuple of four points giving the corners of a crop region
233
217
geometric_crop = ()
234
218
# Geometric.rotate_range is a pair determining the rotation angle sample range
0 commit comments