verl icon indicating copy to clipboard operation
verl copied to clipboard

使用verl进行多模态RL训练的时候(图片存储在本地服务器),生成训练和测试数据的时候,这个"images"字段中应该填入什么?求大神解答一下哦

Open lmingze opened this issue 1 month ago • 1 comments

data = { "data_source": data_source, "prompt": [ { "role": "user", "content": prompt, } ], "images": images, "ability": "math", "reward_model": {"style": "rule", "ground_truth": answer}, "extra_info": { "split": split, "index": idx, "answer": answer, "question": problem, }, }

lmingze avatar Nov 11 '25 09:11 lmingze

def process_image(image: dict | Image.Image) -> Image.Image: if isinstance(image, Image.Image): return image.convert("RGB")

if "bytes" in image:
    assert "image" not in image, "Cannot have both `bytes` and `image`"
    image["image"] = Image.open(BytesIO(image["bytes"]))

return fetch_image(image) 可以是一个Image.Image ,也可以是一个字典,存储图像的二进程,使用字段为bytes

yszhli avatar Nov 13 '25 13:11 yszhli