Sliding Window
This layer (sliding_window) is used to crop part of image with its annotations by sliding of window from left to rigth, from top to bottom.
1
{
2
"action": "sliding_window",
3
"src": ["$sample1"],
4
"dst": "$sample2",
5
"settings": {
6
"window": {
7
"width": 128,
8
"height": 128
9
},
10
"min_overlap": {
11
"x": 32,
12
"y": 32
13
}
14
}
15
}
Copied!

Settings

  • window
    • width โ€” sliding window width
    • height โ€” sliding window height
  • min_overlap
    • x โ€” sliding window overlap x (must be less than sliding window width, minimal 1px)
    • y โ€” sliding window overlap y (must be less than sliding window height, minimal 1px)

Example

1
[
2
{
3
"dst": "$sample_1",
4
"src": [
5
"Birds Small/*"
6
],
7
"action": "data",
8
"settings": {
9
"classes_mapping": "default"
10
}
11
},
12
{
13
"dst": "$sample_2",
14
"src": [
15
"$sample_1"
16
],
17
"action": "sliding_window",
18
"settings": {
19
"window": {
20
"width": 192,
21
"height": 192
22
},
23
"min_overlap": {
24
"x": 32,
25
"y": 32
26
}
27
}
28
},
29
{
30
"dst": "Birds Small Cropped",
31
"src": [
32
"$sample_2"
33
],
34
"action": "supervisely",
35
"settings": {}
36
}
37
]
Copied!
Last modified 1yr ago
Copy link