Flip
Flip layer (flip) simply flips data (image + annotation) vertically or horizontally.
1
{
2
"action": "flip",
3
"src": ["$data1"],
4
"dst": "$data2",
5
"settings": {
6
"axis": "vertical"
7
}
8
}
Copied!
"axis" field can be one of two values horizontal or vertical.
Here are the possible results:
Original image
"axis": "vertical"
"axis": "horizontal"

Example

1
[
2
{
3
"dst": "$data",
4
"src": [
5
"myproj/*"
6
],
7
"action": "data",
8
"settings": {
9
"classes_mapping": "default"
10
}
11
},
12
{
13
"dst": "$flip_vert",
14
"src": [
15
"$data"
16
],
17
"action": "flip",
18
"settings": {
19
"axis": "vertical"
20
}
21
},
22
{
23
"dst": "flip_ver",
24
"src": [
25
"$data",
26
"$flip_vert"
27
],
28
"action": "supervisely",
29
"settings": {}
30
}
31
]
Copied!
In this example we just get all data (images + annotations) from project myproj, apply vertical flip to images and save both original and flipped version.
Last modified 1yr ago
Copy link
Contents
Example