Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 606319053
  • Loading branch information
tensorflower-gardener committed Feb 12, 2024
1 parent c0abb86 commit f5146ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion official/vision/serving/semantic_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ def _build_inputs(self, image):
"""Builds classification model inputs for serving."""

# Normalizes image with mean and std pixel values.
image_feature = self.params.task.train_data.image_feature
image = preprocess_ops.normalize_image(
image, offset=preprocess_ops.MEAN_RGB, scale=preprocess_ops.STDDEV_RGB)
image,
offset=image_feature.mean,
scale=image_feature.stddev)

if self.params.task.train_data.preserve_aspect_ratio:
image, image_info = preprocess_ops.resize_and_crop_image(
Expand Down

0 comments on commit f5146ac

Please sign in to comment.