--- configs: - config_name: default data_files: - split: train path: data/train-* - split: validation path: data/validation-* - split: test path: data/test-* dataset_info: features: - name: id dtype: string - name: image dtype: image - name: width dtype: int32 - name: height dtype: int32 - name: boxes list: list: float32 length: 4 - name: labels list: class_label: names: '0': __background__ '1': tortoise '2': container '3': magpie '4': sea turtle '5': football '6': ambulance '7': ladder '8': toothbrush '9': syringe '10': sink '11': toy '12': organ (musical instrument) '13': cassette deck '14': apple '15': human eye '16': cosmetics '17': paddle '18': snowman '19': beer '20': chopsticks '21': human beard '22': bird '23': parking meter '24': traffic light '25': croissant '26': cucumber '27': radish '28': towel '29': doll '30': skull '31': washing machine '32': glove '33': tick '34': belt '35': sunglasses '36': banjo '37': cart '38': ball '39': backpack '40': bicycle '41': home appliance '42': centipede '43': boat '44': surfboard '45': boot '46': headphones '47': hot dog '48': shorts '49': fast food '50': bus '51': boy '52': screwdriver '53': bicycle wheel '54': barge '55': laptop '56': miniskirt '57': drill (tool) '58': dress '59': bear '60': waffle '61': pancake '62': brown bear '63': woodpecker '64': blue jay '65': pretzel '66': bagel '67': tower '68': teapot '69': person '70': bow and arrow '71': swimwear '72': beehive '73': brassiere '74': bee '75': bat (animal) '76': starfish '77': popcorn '78': burrito '79': chainsaw '80': balloon '81': wrench '82': tent '83': vehicle registration plate '84': lantern '85': toaster '86': flashlight '87': billboard '88': tiara '89': limousine '90': necklace '91': carnivore '92': scissors '93': stairs '94': computer keyboard '95': printer '96': traffic sign '97': chair '98': shirt '99': poster '100': cheese '101': sock '102': fire hydrant '103': land vehicle '104': earrings '105': tie '106': watercraft '107': cabinetry '108': suitcase '109': muffin '110': bidet '111': snack '112': snowmobile '113': clock '114': medical equipment '115': cattle '116': cello '117': jet ski '118': camel '119': coat '120': suit '121': desk '122': cat '123': bronze sculpture '124': juice '125': gondola '126': beetle '127': cannon '128': computer mouse '129': cookie '130': office building '131': fountain '132': coin '133': calculator '134': cocktail '135': computer monitor '136': box '137': stapler '138': christmas tree '139': cowboy hat '140': hiking equipment '141': studio couch '142': drum '143': dessert '144': wine rack '145': drink '146': zucchini '147': ladle '148': human mouth '149': dairy product '150': dice '151': oven '152': dinosaur '153': ratchet (device) '154': couch '155': cricket ball '156': winter melon '157': spatula '158': whiteboard '159': pencil sharpener '160': door '161': hat '162': shower '163': eraser '164': fedora '165': guacamole '166': dagger '167': scarf '168': dolphin '169': sombrero '170': tin can '171': mug '172': tap '173': harbor seal '174': stretcher '175': can opener '176': goggles '177': human body '178': roller skates '179': coffee cup '180': cutting board '181': blender '182': plumbing fixture '183': stop sign '184': office supplies '185': volleyball (ball) '186': vase '187': slow cooker '188': wardrobe '189': coffee '190': whisk '191': paper towel '192': personal care '193': food '194': sun hat '195': tree house '196': flying disc '197': skirt '198': gas stove '199': salt and pepper shakers '200': mechanical fan '201': face powder '202': fax '203': fruit '204': french fries '205': nightstand '206': barrel '207': kite '208': tart '209': treadmill '210': fox '211': flag '212': french horn '213': window blind '214': human foot '215': golf cart '216': jacket '217': egg (food) '218': street light '219': guitar '220': pillow '221': human leg '222': isopod '223': grape '224': human ear '225': power plugs and sockets '226': panda '227': giraffe '228': woman '229': door handle '230': rhinoceros '231': bathtub '232': goldfish '233': houseplant '234': goat '235': baseball bat '236': baseball glove '237': mixing bowl '238': marine invertebrates '239': kitchen utensil '240': light switch '241': house '242': horse '243': stationary bicycle '244': hammer '245': ceiling fan '246': sofa bed '247': adhesive tape '248': harp '249': sandal '250': bicycle helmet '251': saucer '252': harpsichord '253': human hair '254': heater '255': harmonica '256': hamster '257': curtain '258': bed '259': kettle '260': fireplace '261': scale '262': drinking straw '263': insect '264': hair dryer '265': kitchenware '266': indoor rower '267': invertebrate '268': food processor '269': bookcase '270': refrigerator '271': wood-burning stove '272': punching bag '273': common fig '274': cocktail shaker '275': jaguar (animal) '276': golf ball '277': fashion accessory '278': alarm clock '279': filing cabinet '280': artichoke '281': table '282': tableware '283': kangaroo '284': koala '285': knife '286': bottle '287': bottle opener '288': lynx '289': lavender (plant) '290': lighthouse '291': dumbbell '292': human head '293': bowl '294': humidifier '295': porch '296': lizard '297': billiard table '298': mammal '299': mouse '300': motorcycle '301': musical instrument '302': swim cap '303': frying pan '304': snowplow '305': bathroom cabinet '306': missile '307': bust '308': man '309': waffle iron '310': milk '311': ring binder '312': plate '313': mobile phone '314': baked goods '315': mushroom '316': crutch '317': pitcher (container) '318': mirror '319': personal flotation device '320': table tennis racket '321': pencil case '322': musical keyboard '323': scoreboard '324': briefcase '325': kitchen knife '326': nail (construction) '327': tennis ball '328': plastic bag '329': oboe '330': chest of drawers '331': ostrich '332': piano '333': girl '334': plant '335': potato '336': hair spray '337': sports equipment '338': pasta '339': penguin '340': pumpkin '341': pear '342': infant bed '343': polar bear '344': mixer '345': cupboard '346': jacuzzi '347': pizza '348': digital clock '349': pig '350': reptile '351': rifle '352': lipstick '353': skateboard '354': raven '355': high heels '356': red panda '357': rose '358': rabbit '359': sculpture '360': saxophone '361': shotgun '362': seafood '363': submarine sandwich '364': snowboard '365': sword '366': picture frame '367': sushi '368': loveseat '369': ski '370': squirrel '371': tripod '372': stethoscope '373': submarine '374': scorpion '375': segway '376': training bench '377': snake '378': coffee table '379': skyscraper '380': sheep '381': television '382': trombone '383': tea '384': tank '385': taco '386': telephone '387': torch '388': tiger '389': strawberry '390': trumpet '391': tree '392': tomato '393': train '394': tool '395': picnic basket '396': cooking spray '397': trousers '398': bowling equipment '399': football helmet '400': truck '401': measuring cup '402': coffeemaker '403': violin '404': vehicle '405': handbag '406': paper cutter '407': wine '408': weapon '409': wheel '410': worm '411': wok '412': whale '413': zebra '414': auto part '415': jug '416': pizza cutter '417': cream '418': monkey '419': lion '420': bread '421': platter '422': chicken '423': eagle '424': helicopter '425': owl '426': duck '427': turtle '428': hippopotamus '429': crocodile '430': toilet '431': toilet paper '432': squid '433': clothing '434': footwear '435': lemon '436': spider '437': deer '438': frog '439': banana '440': rocket '441': wine glass '442': countertop '443': tablet computer '444': waste container '445': swimming pool '446': dog '447': book '448': elephant '449': shark '450': candle '451': leopard '452': axe '453': hand dryer '454': soap dispenser '455': porcupine '456': flower '457': canary '458': cheetah '459': palm tree '460': hamburger '461': maple '462': building '463': fish '464': lobster '465': garden asparagus '466': furniture '467': hedgehog '468': airplane '469': spoon '470': otter '471': bull '472': oyster '473': horizontal bar '474': convenience store '475': bomb '476': bench '477': ice cream '478': caterpillar '479': butterfly '480': parachute '481': orange '482': antelope '483': beaker '484': moths and butterflies '485': window '486': closet '487': castle '488': jellyfish '489': goose '490': mule '491': swan '492': peach '493': coconut '494': seat belt '495': raccoon '496': chisel '497': fork '498': lamp '499': camera '500': squash (plant) '501': racket '502': human face '503': human arm '504': vegetable '505': diaper '506': unicycle '507': falcon '508': chime '509': snail '510': shellfish '511': cabbage '512': carrot '513': mango '514': jeans '515': flowerpot '516': pineapple '517': drawer '518': stool '519': envelope '520': cake '521': dragonfly '522': common sunflower '523': microwave oven '524': honeycomb '525': marine mammal '526': sea lion '527': ladybug '528': shelf '529': watch '530': candy '531': salad '532': parrot '533': handgun '534': sparrow '535': van '536': grinder '537': spice rack '538': light bulb '539': corded phone '540': sports uniform '541': tennis racket '542': wall clock '543': serving tray '544': kitchen & dining room table '545': dog bed '546': cake stand '547': cat furniture '548': bathroom accessory '549': facial tissue holder '550': pressure cooker '551': kitchen appliance '552': tire '553': ruler '554': luggage and bags '555': microphone '556': broccoli '557': umbrella '558': pastry '559': grapefruit '560': band-aid '561': animal '562': bell pepper '563': turkey '564': lily '565': pomegranate '566': doughnut '567': glasses '568': human nose '569': pen '570': ant '571': car '572': aircraft '573': human hand '574': skunk '575': teddy bear '576': watermelon '577': cantaloupe '578': dishwasher '579': flute '580': balance beam '581': sandwich '582': shrimp '583': sewing machine '584': binoculars '585': rays and skates '586': ipod '587': accordion '588': willow '589': crab '590': crown '591': seahorse '592': perfume '593': alpaca '594': taxi '595': canoe '596': remote control '597': wheelchair '598': rugby ball '599': armadillo '600': maracas '601': helmet - name: relations struct: - name: subject_index list: int64 - name: object_index list: int64 - name: predicate list: class_label: names: '0': __background__ '1': at '2': holds '3': wears '4': surf '5': hang '6': drink '7': holding_hands '8': 'on' '9': ride '10': dance '11': skateboard '12': catch '13': highfive '14': inside_of '15': eat '16': cut '17': contain '18': handshake '19': kiss '20': talk_on_phone '21': interacts_with '22': under '23': hug '24': throw '25': hits '26': snowboard '27': kick '28': ski '29': plays '30': read splits: - name: train num_bytes: 37969157094 num_examples: 126368 - name: validation num_bytes: 536519603 num_examples: 1813 - name: test num_bytes: 1596173138 num_examples: 5322 download_size: 40106623995 dataset_size: 40101849835 --- # Open Images V6 Relationships OIV6 是基于 Open Images V6 的视觉关系检测数据集,包含 133,503 张图片、 601 个对象前景类别和 30 个关系谓词前景类别。图片字节直接嵌入 Parquet, 可通过 Hugging Face `Image` feature 解码。 ## 数据集规模 | Split | 图片 | 对象 | 关系 | | --- | ---: | ---: | ---: | | `train` | 126,368 | 512,259 | 348,560 | | `validation` | 1,813 | 6,386 | 4,951 | | `test` | 5,322 | 19,284 | 14,403 | | **总计** | **133,503** | **537,929** | **367,914** | 三个 split 互不重叠。每个样本都包含至少一个对象和一条关系。 ## 加载 ```python from datasets import load_dataset dataset = load_dataset("wliafe/OIV6") sample = dataset["train"][0] image = sample["image"] # PIL.Image.Image print(sample["id"], image.size) ``` 图片已嵌入 Parquet,不需要额外下载或拼接图片目录。 ## 数据字段 | 字段 | 类型 | 说明 | | --- | --- | --- | | `id` | `string` | Open Images 图片 ID | | `image` | `Image` | 可直接解码的嵌入式 JPEG | | `width` | `int32` | JPEG 实际宽度,单位为像素 | | `height` | `int32` | JPEG 实际高度,单位为像素 | | `boxes` | `List[[float32; 4]]` | 与对象平行的 `[x1, y1, x2, y2]` 边界框 | | `labels` | `List[ClassLabel]` | 与 `boxes` 平行的对象类别 | | `relations.subject_index` | `List[int64]` | 关系主语在当前对象数组中的索引 | | `relations.object_index` | `List[int64]` | 关系宾语在当前对象数组中的索引 | | `relations.predicate` | `List[ClassLabel]` | 关系谓词类别 | `boxes` 和 `labels` 长度相同。三个关系数组也具有相同长度;相同位置的主语索引、 宾语索引和谓词共同表示一条有向关系。 ## 类别与关系名称 对象和谓词 taxonomy 均在索引 `0` 保留 `__background__`: - 对象前景类别编号为 `1`–`601`。 - 谓词前景类别编号为 `1`–`30`。 - `subject_index` 和 `object_index` 是当前样本对象数组的零基位置,不是类别 ID。 ```python features = dataset["train"].features object_names = features["labels"].feature.names predicate_names = features["relations"]["predicate"].feature.names sample = dataset["train"][0] for subject, object_, predicate in zip( sample["relations"]["subject_index"], sample["relations"]["object_index"], sample["relations"]["predicate"], ): print( object_names[sample["labels"][subject]], predicate_names[predicate], object_names[sample["labels"][object_]], ) ``` ## 坐标约定 `boxes` 使用实际图片像素坐标下的 `[x1, y1, x2, y2]` 格式,坐标位于图片 边界内。`width` 和 `height` 与解码后 `image` 的尺寸一致。边界框表示对象检测 区域,不是实例分割轮廓。 ## 使用限制 - 对象和关系类别呈长尾分布,模型结果可能被高频类别主导。 - 标注可能包含遗漏、歧义或类别噪声。 - 本仓库不重新授予原始图片版权;使用者应遵守 Open Images 的许可与使用要求。 - 比较模型结果时,应确认使用相同的 taxonomy、background 编号和 split。 ## 引用 使用本数据集时,请引用 Open Images: ```bibtex @article{kuznetsova2020open, title={The Open Images Dataset V4: Unified Image Classification, Object Detection, and Visual Relationship Detection at Scale}, author={Kuznetsova, Alina and Rom, Hassan and Alldrin, Neil and Uijlings, Jasper and Krasin, Ivan and Pont-Tuset, Jordi and Kamali, Shahab and Popov, Stefan and Malloci, Matteo and Kolesnikov, Alexander and Duerig, Tom and Ferrari, Vittorio}, journal={International Journal of Computer Vision}, volume={128}, pages={1956--1981}, year={2020} } ```