facesyntheticsspigacaptioned
收藏魔搭社区2025-11-27 更新2025-05-17 收录
下载链接:
https://modelscope.cn/datasets/multimodalart/facesyntheticsspigacaptioned
下载链接
链接失效反馈官方服务:
资源简介:
# Dataset Card for "face_synthetics_spiga_captioned"
This is a copy of the [Microsoft FaceSynthetics dataset with SPIGA-calculated landmark annotations](https://huggingface.co/datasets/pcuenq/face_synthetics_spiga), and additional BLIP-generated captions.
For a copy of the original FaceSynthetics dataset with no extra annotations, please refer to [pcuenq/face_synthetics](https://huggingface.co/datasets/pcuenq/face_synthetics).
Here is the code for parsing the dataset and generating the BLIP captions:
```py
from transformers import pipeline
dataset_name = "pcuenq/face_synthetics_spiga"
faces = load_dataset(dataset_name)
faces = faces["train"]
captioner = pipeline("image-to-text",model="Salesforce/blip-image-captioning-large", device=0)
def caption_image_data(example):
image = example["image"]
image_caption = captioner(image)[0]['generated_text']
example['image_caption'] = image_caption
return example
faces_proc = faces.map(caption_image_data)
faces_proc.push_to_hub(f"multimodalart/face_synthetics_spiga_captioned")
```
# 「face_synthetics_spiga_captioned」数据集卡片
本数据集为[带有SPIGA计算得到的面部地标注释的Microsoft FaceSynthetics数据集](https://huggingface.co/datasets/pcuenq/face_synthetics_spiga)的副本,并额外包含BLIP生成的图像字幕。
如需获取无额外注释的原始FaceSynthetics数据集副本,请访问[pcuenq/face_synthetics](https://huggingface.co/datasets/pcuenq/face_synthetics)。
以下为解析该数据集并生成BLIP图像字幕的代码:
py
from transformers import pipeline
dataset_name = "pcuenq/face_synthetics_spiga"
faces = load_dataset(dataset_name)
faces = faces["train"]
captioner = pipeline("image-to-text",model="Salesforce/blip-image-captioning-large", device=0)
def caption_image_data(example):
image = example["image"]
image_caption = captioner(image)[0]['generated_text']
example['image_caption'] = image_caption
return example
faces_proc = faces.map(caption_image_data)
faces_proc.push_to_hub(f"multimodalart/face_synthetics_spiga_captioned")
提供机构:
maas
创建时间:
2025-05-16



