Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
freedomtan committed Feb 2, 2024
1 parent 59ce53c commit 07c1213
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
10 changes: 5 additions & 5 deletions flutter/assets/tasks.pbtxt
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down Expand Up @@ -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
}
}
8 changes: 0 additions & 8 deletions flutter/cpp/datasets/imagenet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 07c1213

Please sign in to comment.