sooooner commited on
Commit
0317839
Β·
1 Parent(s): 68c034b
Files changed (1) hide show
  1. utils.py +0 -1
utils.py CHANGED
@@ -89,7 +89,6 @@ class Image2Text:
89
  def load_img(self, inputs, width=480, height=480):
90
  images = [load_image(input_) for input_ in inputs]
91
  images = [aspect_ratio_preserving_resize_and_crop(image, target_width=width, target_height=height) for image in images]
92
- img = self.processor(image , return_tensors="pt", size=(width, height)).pixel_values
93
  imgs = self.processor([image.convert("RGB") for image in images], return_tensors="pt", size=(width, height)).pixel_values
94
  pixel_values = imgs.to(self.device)
95
  return pixel_values
 
89
  def load_img(self, inputs, width=480, height=480):
90
  images = [load_image(input_) for input_ in inputs]
91
  images = [aspect_ratio_preserving_resize_and_crop(image, target_width=width, target_height=height) for image in images]
 
92
  imgs = self.processor([image.convert("RGB") for image in images], return_tensors="pt", size=(width, height)).pixel_values
93
  pixel_values = imgs.to(self.device)
94
  return pixel_values