Truck2 / gen_src.py
Wendy-Fly's picture
Upload gen_src.py with huggingface_hub
fa02f10 verified
import os
from PIL import Image
file_path = '/home/zbz5349/WorkSpace/aigeeks/ml-mgie/all'
src_img_path = '/home/zbz5349/WorkSpace/aigeeks/Qwen2.5-VL/magicbrush_dataset/data'
save_src_path = '/home/zbz5349/WorkSpace/aigeeks/ml-mgie/src_all_100'
os.makedirs(save_src_path,exist_ok=True)
idx = 0
for file in os.listdir(file_path):
img_path = os.path.join(src_img_path, file)
img = Image.open(img_path)
save_img_path = os.path.join(save_src_path,file)
img.save(save_img_path)