Skip to content

Commit 5e75502

Browse files
lu-wang-gtflite-support-robot
authored andcommitted
Fix the Task Library C API test
PiperOrigin-RevId: 398638668
1 parent 4d96d0f commit 5e75502

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tensorflow_lite_support/c/test/task/vision/image_classifier_test.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ TEST_F(ImageClassifierClassifyTest, SucceedsWithImageData) {
129129

130130
TfLiteFrameBuffer frame_buffer = {
131131
.format = kRGB,
132+
.orientation = kTopLeft,
132133
.dimension = {.width = image_data.width, .height = image_data.height},
133134
.buffer = image_data.pixel_data};
134135

@@ -152,6 +153,7 @@ TEST_F(ImageClassifierClassifyTest, SucceedsWithRoiWithinImageBounds) {
152153

153154
TfLiteFrameBuffer frame_buffer = {
154155
.format = kRGB,
156+
.orientation = kTopLeft,
155157
.dimension = {.width = image_data.width, .height = image_data.height},
156158
.buffer = image_data.pixel_data};
157159

@@ -178,6 +180,7 @@ TEST_F(ImageClassifierClassifyTest, FailsWithRoiOutsideImageBounds) {
178180

179181
TfLiteFrameBuffer frame_buffer = {
180182
.format = kRGB,
183+
.orientation = kTopLeft,
181184
.dimension = {.width = image_data.width, .height = image_data.height},
182185
.buffer = image_data.pixel_data};
183186

@@ -217,6 +220,7 @@ TEST(ImageClassifierWithUserDefinedOptionsClassifyTest,
217220

218221
TfLiteFrameBuffer frame_buffer = {
219222
.format = kRGB,
223+
.orientation = kTopLeft,
220224
.dimension = {.width = image_data.width, .height = image_data.height},
221225
.buffer = image_data.pixel_data};
222226

@@ -262,6 +266,7 @@ TEST(ImageClassifierWithUserDefinedOptionsClassifyTest,
262266

263267
TfLiteFrameBuffer frame_buffer = {
264268
.format = kRGB,
269+
.orientation = kTopLeft,
265270
.dimension = {.width = image_data.width, .height = image_data.height},
266271
.buffer = image_data.pixel_data};
267272

0 commit comments

Comments
 (0)