release initial code
Co-authored-by: Ying Sheng <sqy1415@gmail.com> Co-authored-by: Liangsheng Yin <hnyls2002@gmail.com> Co-authored-by: Zhiqiang Xie <xiezhq@stanford.edu> Co-authored-by: parasol-aser <3848358+parasol-aser@users.noreply.github.com> Co-authored-by: LiviaSun <33578456+ChuyueSun@users.noreply.github.com> Co-authored-by: Cody Yu <hao.yu.cody@gmail.com>
This commit is contained in:
20
benchmark/llava_bench/download_images.py
Normal file
20
benchmark/llava_bench/download_images.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import os
|
||||
|
||||
# Create the 'images' directory if it doesn't exist
|
||||
if not os.path.exists('images'):
|
||||
os.makedirs('images')
|
||||
|
||||
# Base URL
|
||||
base_url = "https://huggingface.co/datasets/liuhaotian/llava-bench-in-the-wild/resolve/main/images/"
|
||||
|
||||
# Loop through image numbers
|
||||
for i in range(1, 25):
|
||||
# Format the image number with leading zeros
|
||||
image_number = str(i).zfill(3)
|
||||
image_url = base_url + image_number + ".jpg"
|
||||
image_path = "images/" + image_number + ".jpg"
|
||||
|
||||
# Download the image using wget
|
||||
os.system(f"wget -O {image_path} {image_url}")
|
||||
|
||||
print("Download complete.")
|
||||
Reference in New Issue
Block a user