-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathparameters.json
245 lines (245 loc) · 9.27 KB
/
parameters.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
{
"version": 1,
"type": "synthetic-data",
"info": {
"name": "Composite Image Generator",
"description": "Uses background and object images to generate an object detection dataset"
},
"parameters": [
{
"name": "Composite Directory",
"value": "/mnt/s3fs/composite-image-portal/composites",
"type": "string",
"help": "What folder are the source composite images found in? (there should be background and object folders). Mount an Upload Portal with name 'composite-image-portal' to this transformation block with the root path '/mnt/s3fs/composite-image-portal' to allow for easy updating of source images.",
"param": "composite-dir"
},
{
"name": "Remove background from raw objects (with rembg)?",
"value": false,
"type": "boolean",
"help": "Whether to remove the background from raw object images and add them to the composites directory. This can be quite a slow process.",
"param": "remove-background"
},
{
"name": "Raw Object Directory",
"value": "/mnt/s3fs/composite-image-portal/raw_objects",
"type": "string",
"help": "This directory should contain images of your object on a plain background, this will be removed and cropped then placed in the composites directory to be used as objects. Mount an Upload Portal with name 'composite-image-portal' to this transformation block with the root path '/mnt/s3fs/composite-image-portal' to allow for easy updating of source images.",
"param": "raw-object-dir",
"showIf": {
"parameter": "remove-background",
"operator": "eq",
"value": "true"
}
},
{
"name": "Resize raw object images to match background",
"value": "fit-width",
"type": "select",
"help": "How to resize the raw object images",
"valid": [
{
"label": "Do not resize",
"value": "no-resize"
},
{
"label": "Fit raw image to background width ",
"value": "fit-width"
},
{
"label": "Fit raw image to background height",
"value": "fit-height"
},
{
"label": "Custom scaling factor for each raw file",
"value": "custom-scaling-factor"
},
{
"label": "Custom pixel widths for each raw file",
"value": "custom-pixels"
}
],
"param": "resize-raw-objects",
"showIf": {
"parameter": "remove-background",
"operator": "eq",
"value": "true"
}
},
{
"name": "Custom pixel widths for each raw file [filename,width]",
"value": "[voltagetester_side.jpg,100],[voltagetester_top.jpg,100],[voltagetester_top2.jpg,100],[tape_top.jpg,50],[else,25]",
"type": "string",
"help": "Comma-separated list of pixel widths for each label in the format [label,width]. By default any non-mentioned labels will not be resized, you can change this by passing [else,75]",
"param": "custom-raw-resize-pixels",
"showIf": {
"parameter": "resize-raw-objects",
"operator": "eq",
"value": "custom-pixels"
}
},
{
"name": "Custom Scaling Factor (how much to multiply all your raw images by)",
"value": 0.5,
"type": "float",
"help": "Scaling factor to apply to all raw images",
"param": "custom-raw-resize-scaling-factor",
"showIf": {
"parameter": "resize-raw-objects",
"operator": "eq",
"value": "custom-scaling-factor"
}
},
{
"name": "Ignore previously resized raw objects found in composites directory",
"value": true,
"type": "boolean",
"help": "If you have already resized your raw objects and they are in the composites directory, you can skip resizing them again",
"param": "ignore-already-resized",
"showIf": {
"parameter": "remove-background",
"operator": "eq",
"value": "true"
}
},
{
"name": "Labels",
"value": "all",
"type": "string",
"help": "Which objects to generate images for, as a comma-separated list. Set as 'all' to generate images for all objects",
"param": "labels"
},
{
"name": "Number of images",
"value": 10,
"type": "int",
"help": "Number of images to generate",
"param": "images"
},
{
"name": "Object area",
"value": "-1",
"type": "string",
"help": "x1,y1,x2,y2 coordinates of the valid area to place objects in the composite image, or -1 for the whole image",
"param": "object-area"
},
{
"name": "Crop objects outside the chosen area",
"value": true,
"type": "boolean",
"help": "Whether to crop objects that are outside the object area so that only the part of the object that is inside the area is visible",
"param": "crop-object-outside-area"
},
{
"name": "Minimum number of objects",
"value": 0,
"type": "int",
"help": "Minimum number of objects to generate in each image",
"param": "min-objects"
},
{
"name": "Maximum number of objects",
"value": 5,
"type": "int",
"help": "Maximum number of objects to generate in each image",
"param": "objects"
},
{
"name": "Allow overlap",
"value": false,
"type": "boolean",
"help": "Whether objects are allowed to overlap",
"param": "allow-overlap"
},
{
"name": "Allow rotate",
"value": true,
"type": "boolean",
"help": "Whether to apply random rotation to objects",
"param": "allow-rotate"
},
{
"name": "Apply motion blur?",
"value": false,
"type": "boolean",
"help": "Whether to apply blur to objects to simulate motion",
"param": "apply-motion-blur"
},
{
"name": "Motion blur direction",
"value": -90,
"type": "int",
"help": "What direction to apply blur to objects to simulate motion (-1 for random)",
"param": "motion-blur-direction",
"showIf": {
"parameter": "apply-motion-blur",
"operator": "eq",
"value": "true"
}
},
{
"name": "Apply fisheye lens effect",
"value": false,
"type": "boolean",
"help": "Whether to apply fisheye lens effect to the final images",
"param": "apply-fisheye"
},
{
"name": "Apply fisheye lens effect to all layers",
"value": true,
"type": "boolean",
"help": "Whether to apply fisheye lens effect to all layers or just to the objects (in case your background images are already fisheyed)",
"param": "apply-fisheye-all-layers",
"showIf": {
"parameter": "apply-fisheye",
"operator": "eq",
"value": "true"
}
},
{
"name": "Fisheye lens effect strength",
"value": 2,
"type": "float",
"help": "Strength of the fisheye lens effect",
"param": "fisheye-strength",
"showIf": {
"parameter": "apply-fisheye",
"operator": "eq",
"value": "true"
}
},
{
"name": "Crop to fisheye?",
"value": true,
"type": "boolean",
"help": "Whether to crop the image to remove black borders after applying fisheye lens effect",
"param": "crop-fisheye",
"showIf": {
"parameter": "apply-fisheye",
"operator": "eq",
"value": "true"
}
},
{
"name": "Upload to category",
"value": "split",
"type": "select",
"valid": [
{
"label": "Split 80/20 between training and testing",
"value": "split"
},
{
"label": "Training",
"value": "training"
},
{
"label": "Testing",
"value": "testing"
}
],
"help": "Data will be uploaded to this category in your project",
"param": "upload-category"
}
]
}