Paul commited on
Commit
3da5180
·
verified ·
1 Parent(s): 336cc28

Upload processor

Browse files
Files changed (1) hide show
  1. image_processing_swin.py +1 -1
image_processing_swin.py CHANGED
@@ -30,7 +30,7 @@ class MyCustomSwinProcessor(ViTImageProcessor):
30
  bottom = pad_h - top
31
 
32
  # Pad with white because its the dataset default background color
33
- return transforms.functional.pad(image, (left, top, right, bottom), fill=255)
34
 
35
  def preprocess(self, images, **kwargs):
36
  images = [self.resize_and_pad(image, target_size=224) for image in images]
 
30
  bottom = pad_h - top
31
 
32
  # Pad with white because its the dataset default background color
33
+ return transforms.functional.pad(image, (left, top, right, bottom), fill=255).totensor()
34
 
35
  def preprocess(self, images, **kwargs):
36
  images = [self.resize_and_pad(image, target_size=224) for image in images]