Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
imagewidth (px)
85
5.52k
End of preview. Expand in Data Studio

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

MHPv2 Triples(英文定位提示)

本数据集由 MHP v2(train 划分)转换而来,已整理为“图像-二值实例掩码-提示词”的三元组形式,可直接用于定位提示+编辑占位符的训练/评测。

目录结构

  • images/:RGB 原图
  • masks/:对应实例的二值人体掩码(255=前景,0=背景)
  • annotations.json:三元组清单

annotations.json 格式

每条样例如下(路径为相对当前目录):

{
  "image_path": "images/train_21656.jpg",
  "mask_path": "masks/train_21656_05_01.png",
  "prompt_loc": "the left person",
  "prompt_edit": "[EDIT_PROMPT]",
  "category": "person",
  "position_idx": 1
}

字段说明:

  • image_path:图像相对路径。
  • mask_path:掩码相对路径(二值,单实例)。
  • prompt_loc:英文定位提示(已按人数自适应规则生成)。
  • prompt_edit:编辑占位符,固定为 "[EDIT_PROMPT]"。
  • category:类别(此数据集固定为 person)。
  • position_idx:从左到右的序号(1-based)。

定位提示规则(英文)

  • 2 人:the left/right person
  • 3 人:the left/middle/right person
  • 3 人:靠近哪侧就用哪侧的序数(如 the 2nd person from the left / the 3rd person from the right)

  • 垂直对(两人 x 很近、y 相差大):the upper/lower person
  • 语言可在上游配置切换,目前该版本使用英文。

掩码来源与生成

  • 源自 MHP v2 的 parsing_annos 颜色分割;转换时取 RGB 非零像素作为前景(忽略 alpha),合成为二值实例掩码。

统计(当前版本)

  • 记录条数(records):41043
  • 图像文件数(images/):15403
  • 掩码文件数(masks/):41056
  • 注释中涉及的唯一图像数:15390
  • 每图平均实例数:≈ 2.667
  • 含 ≥4 人的图像数:2518

注:图像总数与注释涉及的图像数略有差异属正常(个别图像可能被过滤或未生成有效掩码)。

使用建议

  • 加载样例(Python):
import json, os
root = "/root/autodl-tmp/mhpv2_triples_en"
ann  = json.load(open(os.path.join(root, "annotations.json"), "r", encoding="utf-8"))
for r in ann[:5]:
    img = os.path.join(root, r["image_path"])  # images/...
    msk = os.path.join(root, r["mask_path"])   # masks/...
    loc = r["prompt_loc"]                      # 英文定位提示
    # 在此处加载图像/掩码并送入你的管线
  • 仅查看多人样本:可按 image_path 聚合,筛 len(records_of_this_image) >= K。

许可与来源

  • 上游数据:MHP v2(2018)。请遵循其原始许可与使用条款。
  • 本整理版本仅用于学术/实验。
Downloads last month
15