Skip to content

Commit

Permalink
fixed opend image operation exeption. its cause was tensor operation …
Browse files Browse the repository at this point in the history
…after the code (2).
  • Loading branch information
ryogrid committed Oct 24, 2024
1 parent 96ea8c2 commit cff9b37
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions colab_env/tagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,6 @@ def prepare_image(self, image: Image.Image) -> Image.Image:
padded_image: Image.Image = Image.new("RGB", (max_dim, max_dim), (255, 255, 255))
padded_image.paste(image, (pad_left, pad_top))

# if max_dim != target_size:
# padded_image = padded_image.resize(
# (target_size, target_size),
# Image.BICUBIC,
# )

# image_array: np.ndarray = np.asarray(padded_image, dtype=np.float32)
# image_array = image_array[:, :, ::-1]
#
# return np.expand_dims(image_array, axis=0)

return padded_image

def load_labels_hf(
Expand Down

0 comments on commit cff9b37

Please sign in to comment.