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) {