MME-RealWorld-Base64
收藏魔搭社区2025-12-21 更新2025-06-14 收录
下载链接:
https://modelscope.cn/datasets/thomas/MME-RealWorld-Base64
下载链接
链接失效反馈官方服务:
资源简介:
# MME-RealWorld Dataset
This dataset contains multiple JSON files split into chunks. It includes information such as questions, images encoded in base64, and other related metadata.
## Usage
You can load the dataset using the `datasets` library:
```python
from datasets import load_dataset
dataset = load_dataset('yifanzhang114/MME-RealWorld-Base64', data_dir='MME-RealWorld')
dataset = load_dataset('yifanzhang114/MME-RealWorld-Base64', data_dir='MME-RealWorld-CN')
## the image can be decoded by
def decode_base64_to_image(base64_string, target_size=-1):
image_data = base64.b64decode(base64_string)
image = Image.open(io.BytesIO(image_data))
if image.mode in ('RGBA', 'P'):
image = image.convert('RGB')
if target_size > 0:
image.thumbnail((target_size, target_size))
return image
```
# MME-RealWorld 数据集
本数据集包含多个分块存储的JSON文件,涵盖问题、base64编码的图像以及其他相关元数据等信息。
## 使用方法
你可借助`datasets`库加载本数据集:
python
from datasets import load_dataset
dataset = load_dataset('yifanzhang114/MME-RealWorld-Base64', data_dir='MME-RealWorld')
dataset = load_dataset('yifanzhang114/MME-RealWorld-Base64', data_dir='MME-RealWorld-CN')
## 图像解码
可通过以下函数将base64字符串解码为图像:
python
def decode_base64_to_image(base64_string, target_size=-1):
image_data = base64.b64decode(base64_string)
image = Image.open(io.BytesIO(image_data))
if image.mode in ('RGBA', 'P'):
image = image.convert('RGB')
if target_size > 0:
image.thumbnail((target_size, target_size))
return image
提供机构:
maas
创建时间:
2025-02-17



