OpenGVLab / LLaMA-Adapter

[ICLR 2024] Fine-tuning LLaMA to follow Instructions within 1 Hour and 1.2M Parameters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

why read url images using cv2.imread()?

adda1221 opened this issue · comments

Hi, i find that the images is read from url directly using opencv:
image = cv2.imread(image_path)
and the image_path is from:
image_path, caption = sample['url'], sample['caption']

the requestion is, can the url be read by opencv and does this method slow down training?

Sorry for the confusion. The open-sourced dataset is modified from our internal code that reading images from s3 server. If you are using a dataset in your local machines, the url should be the file path.

Sorry for the confusion. The open-sourced dataset is modified from our internal code that reading images from s3 server. If you are using a dataset in your local machines, the url should be the file path.

thanks for reply, got it! can i read the data directly from s3? because the memory of the local machine is small.

I'm afraid of not. You need to add the s3 loading function based on your s3 system's instruction.