From 49d73aa003bb7f52ebe331c79e038c6c705cbb83 Mon Sep 17 00:00:00 2001 From: Koan-Sin Tan Date: Thu, 1 Feb 2024 13:50:42 +0800 Subject: [PATCH] clean up --- flutter/assets/tasks.pbtxt | 10 +++++----- flutter/cpp/datasets/imagenet.cc | 8 -------- flutter/integration_test/expected_throughput.dart | 2 +- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/flutter/assets/tasks.pbtxt b/flutter/assets/tasks.pbtxt index 88a6f7522..7795e39fd 100644 --- a/flutter/assets/tasks.pbtxt +++ b/flutter/assets/tasks.pbtxt @@ -247,8 +247,8 @@ task { id: "MobileNetEdgeTPUv2-L" name: "MobileNetEdgeTPUv2-L" offset: 0 - image_width: 224 - image_height: 224 + image_width: 384 + image_height: 384 num_classes: 1000 } } @@ -283,9 +283,9 @@ task { model { id: "MobileNetEdgeTPUv2-L" name: "MobileNetEdgeTPUv2-L" - offset: 1 - image_width: 224 - image_height: 224 + offset: 0 + image_width: 384 + image_height: 384 num_classes: 1000 } } diff --git a/flutter/cpp/datasets/imagenet.cc b/flutter/cpp/datasets/imagenet.cc index 06303141c..90a729ab0 100644 --- a/flutter/cpp/datasets/imagenet.cc +++ b/flutter/cpp/datasets/imagenet.cc @@ -62,18 +62,10 @@ Imagenet::Imagenet(Backend *backend, const std::string &image_dir, // Prepares the preprocessing stage. tflite::evaluation::ImagePreprocessingConfigBuilder builder( "image_preprocessing", DataType2TfType(input_format_.at(0).type)); -#if 0 builder.AddResizingStep(image_width / kCroppingFraction, image_height / kCroppingFraction, true); builder.AddCroppingStep(image_width, image_height, false); -#endif -#if 1 - builder.AddCroppingStep(kCroppingFraction, true); - builder.AddResizingStep(image_width, image_height, false); -#endif - builder.AddDefaultNormalizationStep(); - preprocessing_stage_.reset( new tflite::evaluation::ImagePreprocessingStage(builder.build())); if (preprocessing_stage_->Init() != kTfLiteOk) { diff --git a/flutter/integration_test/expected_throughput.dart b/flutter/integration_test/expected_throughput.dart index d621914c0..85e1d6ee8 100644 --- a/flutter/integration_test/expected_throughput.dart +++ b/flutter/integration_test/expected_throughput.dart @@ -178,7 +178,7 @@ const Map> _imageClassificationOffline = { _kPixelBackend: { _kPixel6: Interval(min: 1000, max: 1700), }, - _kQtiBackend: { + _kQtiBackend: { _kS22Ultra: Interval(min: 2600, max: 3000), }, _kMediatekBackend: {