From 68d81af31cc9237032e32e44947c5e04eb52b121 Mon Sep 17 00:00:00 2001 From: Jun Chen Date: Wed, 8 Nov 2023 10:21:09 -0800 Subject: [PATCH] Update blip_processors.py --- minigpt4/processors/blip_processors.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/minigpt4/processors/blip_processors.py b/minigpt4/processors/blip_processors.py index fd26160..ee3f694 100644 --- a/minigpt4/processors/blip_processors.py +++ b/minigpt4/processors/blip_processors.py @@ -75,9 +75,8 @@ class Blip2ImageTrainProcessor(BlipImageBaseProcessor): self.transform = transforms.Compose( [ - transforms.RandomResizedCrop( - image_size, - scale=(min_scale, max_scale), + transforms.Resize( + (image_size,image_size), interpolation=InterpolationMode.BICUBIC, ), transforms.ToTensor(), @@ -138,4 +137,4 @@ class Blip2ImageEvalProcessor(BlipImageBaseProcessor): mean = cfg.get("mean", None) std = cfg.get("std", None) - return cls(image_size=image_size, mean=mean, std=std) \ No newline at end of file + return cls(image_size=image_size, mean=mean, std=std)