Skip to content

Commit b6fcc07

Browse files
tensorflower-gardenerTF Object Detection Team
authored andcommitted
Improves example in documentation comment explaining keypoint_flip_permutation for RandomHorizontalFlip and RandomVerticalFlip.
PiperOrigin-RevId: 437350619
1 parent 5f05ce2 commit b6fcc07

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

research/object_detection/protos/preprocessor.proto

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,19 @@ message RandomHorizontalFlip {
6767
// flipped indices. This is used in the event that keypoints are specified,
6868
// in which case when the image is horizontally flipped the keypoints will
6969
// need to be permuted. E.g. for keypoints representing left_eye, right_eye,
70-
// nose_tip, mouth, left_ear, right_ear (in that order), one might specify
71-
// the keypoint_flip_permutation below:
70+
// and nose (in that order), one might specify:
71+
// keypoint_flip_permutation below:
7272
// keypoint_flip_permutation: 1
7373
// keypoint_flip_permutation: 0
7474
// keypoint_flip_permutation: 2
75-
// keypoint_flip_permutation: 3
76-
// keypoint_flip_permutation: 5
77-
// keypoint_flip_permutation: 4
78-
// If nothing is specified the order of keypoint will be mantained.
75+
//
76+
// original image horizontally flipped image
77+
// ___________________________ ___________________________
78+
// / / / | \ \ \
79+
// left eye, 0 right eye, 1 | left eye, 1 right eye, 0
80+
// nose, 2 | nose, 2
81+
// ___________________________ ___________________________
82+
// If nothing is specified, the order of keypoint will be mantained.
7983
repeated int32 keypoint_flip_permutation = 1;
8084

8185
// The probability of running this augmentation for each image.
@@ -89,14 +93,20 @@ message RandomVerticalFlip {
8993
// flipped indices. This is used in the event that keypoints are specified,
9094
// in which case when the image is vertically flipped the keypoints will
9195
// need to be permuted. E.g. for keypoints representing left_eye, right_eye,
92-
// nose_tip, mouth, left_ear, right_ear (in that order), one might specify
93-
// the keypoint_flip_permutation below:
96+
// and nose (in that order), one might specify:
9497
// keypoint_flip_permutation: 1
9598
// keypoint_flip_permutation: 0
9699
// keypoint_flip_permutation: 2
97-
// keypoint_flip_permutation: 3
98-
// keypoint_flip_permutation: 5
99-
// keypoint_flip_permutation: 4
100+
// ___________________________
101+
// / / / | original image
102+
// left eye, 0 right eye, 1 |
103+
// nose, 2 |
104+
// ___________________________
105+
// \ \ \ | vertically flipped image
106+
// nose, 2 |
107+
// right eye, 0 left eye, 1 |
108+
// ___________________________
109+
// If nothing is specified, the order of keypoint will be mantained.
100110
repeated int32 keypoint_flip_permutation = 1;
101111

102112
// The probability of running this augmentation for each image.

0 commit comments

Comments
 (0)