Cyril666 commited on
Commit
282c2a2
·
verified ·
1 Parent(s): 672428a

Update processing_videollama3.py

Browse files
Files changed (1) hide show
  1. processing_videollama3.py +2 -0
processing_videollama3.py CHANGED
@@ -295,6 +295,8 @@ class Videollama3Qwen2Processor(ProcessorMixin):
295
 
296
  def load_images(self, image_path: Union[str, List[str], Image.Image, List[Image.Image]]):
297
  def load_single_image(image_path):
 
 
298
  if isinstance(image_path, str) and os.path.isfile(image_path):
299
  # images = [cv2.cvtColor(cv2.imread(image_path), cv2.COLOR_BGR2RGB)]
300
  images = Image.open(image_path).convert('RGB')
 
295
 
296
  def load_images(self, image_path: Union[str, List[str], Image.Image, List[Image.Image]]):
297
  def load_single_image(image_path):
298
+ if isinstance(image_path, str) and image_path.startswith("file://"):
299
+ image_path = image_path.replace("file://", "")
300
  if isinstance(image_path, str) and os.path.isfile(image_path):
301
  # images = [cv2.cvtColor(cv2.imread(image_path), cv2.COLOR_BGR2RGB)]
302
  images = Image.open(image_path).convert('RGB')