Datasets:

Modalities:
Image
Text
Formats:
parquet
ArXiv:
Libraries:
Datasets
Dask
License:
user_id
stringlengths
11
15
image_id
int64
110k
42.4B
labels
sequencelengths
1
9
partition
stringclasses
1 value
fine_grained_labels
sequencelengths
1
36
image
imagewidth (px)
256
256
59769174@N00
14,913,474,848
[ "equipment", "material", "structure" ]
train
[ "bag", "document", "furniture", "material", "printed_page" ]
59769174@N00
7,646,937,304
[ "liquid", "plant", "structure" ]
train
[ "foliage", "lake", "plant", "tree", "wood_natural" ]
59769174@N00
15,251,499,526
[ "equipment", "material" ]
train
[ "bag", "bottle", "textile" ]
59769174@N00
14,913,487,797
[ "outdoor", "plant" ]
train
[ "blue_sky", "foliage", "tree" ]
59769174@N00
14,912,457,908
[ "food", "material" ]
train
[ "birthday_cake", "textile" ]
59769174@N00
7,646,957,796
[ "plant", "structure" ]
train
[ "foliage", "jungle", "plant", "wood_natural" ]
59769174@N00
7,646,897,410
[ "plant" ]
train
[ "foliage", "plant" ]
59769174@N00
7,646,905,216
[ "liquid", "outdoor", "plant", "structure" ]
train
[ "cloudy", "hill", "rocks", "snow", "vegetation" ]
59769174@N00
14,913,472,348
[ "equipment", "material", "structure" ]
train
[ "consumer_electronics", "screenshot", "structure", "textile" ]
59769174@N00
15,793,564,988
[ "outdoor", "plant" ]
train
[ "blue_sky", "plant", "rainbow", "road_other", "sidewalk", "vegetation" ]
59769174@N00
14,882,851,187
[ "material", "outdoor", "plant", "structure" ]
train
[ "cloudy", "fence", "grass", "plant", "tile", "vegetation" ]
59769174@N00
15,100,036,595
[ "equipment", "material", "structure" ]
train
[ "bag", "furniture", "printed_page", "textile" ]
59769174@N00
15,087,964,417
[ "food", "light" ]
train
[ "cake", "candle", "condiment" ]
59769174@N00
7,646,906,078
[ "liquid", "outdoor", "plant", "structure" ]
train
[ "cloudy", "evergreen", "mountain", "river", "rocks", "snow", "vegetation" ]
59769174@N00
15,066,462,181
[ "equipment", "food", "interior_room", "material" ]
train
[ "book", "bottle", "cake_regular", "cakestand", "cupcake", "curtain", "interior_room", "plate", "textile" ]
59769174@N00
14,882,730,029
[ "equipment", "material", "outdoor", "structure" ]
train
[ "container", "fence", "land", "material", "shed", "sky", "structure", "wood_processed" ]
59769174@N00
7,646,909,642
[ "plant", "structure" ]
train
[ "moss", "wood_natural" ]
59769174@N00
15,170,159,358
[ "art", "equipment", "material" ]
train
[ "document", "handwriting", "illustrations", "material" ]
59769174@N00
15,015,454,717
[ "equipment", "material", "outdoor" ]
train
[ "grass", "material", "toy" ]
59769174@N00
7,646,938,434
[ "liquid", "plant" ]
train
[ "forest", "plant", "shrub", "tree", "water_body" ]
59769174@N00
7,646,904,458
[ "liquid", "plant", "structure" ]
train
[ "branch", "moss", "plant", "waterways", "wood_natural" ]
59769174@N00
7,646,898,122
[ "liquid", "plant", "structure" ]
train
[ "creek", "jungle", "moss", "plant", "rocks", "wood_natural" ]
59769174@N00
15,097,040,751
[ "outdoor", "plant" ]
train
[ "blue_sky", "branch", "tree" ]
59769174@N00
15,087,775,399
[ "art", "equipment", "food", "light", "material" ]
train
[ "cake", "candle", "candlestick", "decoration", "drinking_glass", "material", "tray" ]
59769174@N00
14,913,410,610
[ "equipment", "structure" ]
train
[ "document", "sign", "structure" ]
59769174@N00
15,356,397,042
[ "equipment", "interior_room", "structure" ]
train
[ "bedding", "bedroom", "book", "furniture_other", "mattress", "pillow", "poster", "toy_organizer" ]
59769174@N00
15,274,137,212
[ "equipment", "food", "interior_room", "material", "structure" ]
train
[ "bottle", "cabinet", "cake", "chair", "interior_room", "tableware", "teapot", "textile", "wood_processed" ]
59769174@N00
14,913,358,680
[ "equipment", "material" ]
train
[ "handwriting", "textile" ]
59769174@N00
15,046,460,196
[ "liquid", "outdoor", "plant" ]
train
[ "blue_sky", "cloudy", "lake", "plant", "shore", "vegetation" ]
59769174@N00
7,646,907,322
[ "plant" ]
train
[ "branch", "foliage" ]
59769174@N00
14,882,911,677
[ "art", "equipment", "food", "interior_room", "light", "material", "plant", "structure" ]
train
[ "basket_container", "bouquet", "cake", "candle", "consumer_electronics", "flower", "furniture", "interior_room", "placemat", "portal", "table", "textile", "wood_processed" ]
59769174@N00
7,646,901,662
[ "liquid", "outdoor", "plant", "structure" ]
train
[ "bridge", "fence", "foliage", "land", "rocks", "walkway", "waterways", "wood_processed" ]
59769174@N00
7,646,936,916
[ "liquid", "plant" ]
train
[ "lake", "tree", "vegetation" ]
59769174@N00
14,882,725,549
[ "material", "plant" ]
train
[ "material", "plant" ]
59769174@N00
15,097,009,791
[ "equipment", "material" ]
train
[ "consumer_electronics", "container", "tile" ]
59769174@N00
14,913,350,720
[ "liquid", "outdoor" ]
train
[ "cloudy", "ocean", "sunset_sunrise" ]
59769174@N00
14,882,876,127
[ "equipment", "interior_room", "material", "outdoor", "plant", "structure" ]
train
[ "building", "car", "cloudy", "furniture", "interior_room", "raw_glass", "roof", "stool", "street", "tree", "wood_processed" ]
59769174@N00
7,646,939,366
[ "liquid", "plant", "structure" ]
train
[ "lake", "moss", "tree", "vegetation", "wood_natural" ]
59769174@N00
15,069,697,535
[ "art", "equipment", "material", "plant", "structure" ]
train
[ "container", "decorative_plant", "document_other", "engraving", "flag", "foliage", "raw_metal", "structure" ]
59769174@N00
14,913,425,248
[ "art" ]
train
[ "illustrations" ]
59769174@N00
7,646,894,696
[ "liquid", "outdoor", "plant" ]
train
[ "evergreen", "forest", "mountain", "sky", "snow" ]
59769174@N00
16,727,647,064
[ "food", "material" ]
train
[ "birthday_cake", "material" ]
59769174@N00
7,646,957,304
[ "plant" ]
train
[ "foliage", "jungle", "plant" ]
59769174@N00
15,069,426,355
[ "material", "plant" ]
train
[ "material", "plant" ]
59769174@N00
7,646,884,228
[ "liquid", "outdoor", "plant", "structure" ]
train
[ "cloudy", "evergreen", "mountain", "rocks", "snow", "vegetation" ]
59769174@N00
15,955,186,186
[ "equipment", "outdoor", "plant", "structure" ]
train
[ "blue_sky", "car", "cloudy", "rainbow", "road_other", "street_sign", "vegetation" ]
59769174@N00
15,097,029,541
[ "outdoor", "structure" ]
train
[ "building", "cityscape", "night_sky", "street", "window" ]
59769174@N00
14,882,816,940
[ "art", "equipment", "interior_room", "material", "structure" ]
train
[ "chalkboard", "frame", "handwriting", "interior_room", "slipper", "structure", "textile", "wood_processed" ]
59769174@N00
14,913,516,638
[ "equipment", "material", "structure" ]
train
[ "textile", "ticket", "wood_processed" ]
59769174@N00
15,069,207,062
[ "equipment", "material", "structure" ]
train
[ "handwriting", "structure", "textile" ]
59769174@N00
14,882,988,229
[ "equipment", "structure" ]
train
[ "printed_page", "structure" ]
129851880@N07
22,761,096,918
[ "equipment", "food" ]
train
[ "food", "logo_other", "soup", "spoon" ]
129851880@N07
27,942,033,974
[ "equipment", "food" ]
train
[ "baked_goods", "fork" ]
129851880@N07
29,387,913,900
[ "equipment", "food" ]
train
[ "bowl", "food", "meat", "soup", "spoon" ]
129851880@N07
21,678,881,101
[ "equipment", "liquid", "material" ]
train
[ "bowl", "cup", "ladle", "material", "tea_drink", "teapot", "utensil_other" ]
129851880@N07
27,795,027,774
[ "equipment", "food", "liquid", "material", "structure" ]
train
[ "drink", "drinking_glass", "lime", "material", "straw_drinking", "wood_processed" ]
129851880@N07
26,641,744,630
[ "equipment", "food" ]
train
[ "container", "ice_cream", "spoon" ]
129851880@N07
26,427,203,523
[ "food" ]
train
[ "food", "meat", "rice" ]
129851880@N07
22,912,405,029
[ "equipment", "food", "material" ]
train
[ "material", "plate", "quesadilla" ]
129851880@N07
27,754,627,193
[ "art", "equipment", "material" ]
train
[ "engraving", "printed_page", "raw_metal" ]
129851880@N07
27,455,960,515
[ "equipment", "food" ]
train
[ "fork", "meat" ]
129851880@N07
30,999,275,531
[ "equipment", "food", "interior_room", "structure" ]
train
[ "bread", "condiment", "cutting_board", "fork", "interior_room", "plate", "tableware", "waffle", "wood_processed" ]
129851880@N07
28,291,662,521
[ "equipment" ]
train
[ "receipt", "tableware" ]
129851880@N07
28,088,603,261
[ "food", "structure" ]
train
[ "baked_goods", "wood_processed" ]
129851880@N07
26,448,159,774
[ "food" ]
train
[ "lettuce", "sushi" ]
129851880@N07
29,651,535,930
[ "equipment", "food", "structure" ]
train
[ "baked_goods", "bowl", "food", "fried_egg", "meat_other", "placemat", "tableware", "utensil", "wood_processed" ]
129851880@N07
32,339,040,011
[ "equipment", "food" ]
train
[ "food", "kimchi", "lettuce", "logo_other", "meat" ]
129851880@N07
27,522,199,651
[ "equipment", "food" ]
train
[ "clam", "herb_other", "plate", "tomato" ]
129851880@N07
26,385,846,594
[ "equipment", "food" ]
train
[ "bowl", "wonton" ]
129851880@N07
22,056,096,555
[ "equipment", "food" ]
train
[ "container", "lime", "logo", "plate", "seabass" ]
129851880@N07
21,931,391,072
[ "equipment", "food" ]
train
[ "pastry", "plate" ]
129851880@N07
30,179,870,986
[ "equipment", "material" ]
train
[ "coffee_grinder", "cup", "machine", "textile" ]
129851880@N07
22,038,368,963
[ "equipment", "food" ]
train
[ "chopsticks", "dessert", "food", "plate" ]
129851880@N07
28,634,193,466
[ "equipment", "liquid", "structure" ]
train
[ "document_other", "drink", "drinking_glass", "structure" ]
129851880@N07
27,695,744,366
[ "equipment", "food" ]
train
[ "plate", "spoon", "tiramisu" ]
129851880@N07
28,487,386,604
[ "equipment", "food" ]
train
[ "food", "logo_other", "meat", "tableware" ]
129851880@N07
38,689,768,182
[ "equipment", "food", "liquid", "structure" ]
train
[ "apple", "bowl", "drink", "logo", "logo_other", "meat", "mug", "starfruit", "tableware", "vegetable", "wood_processed" ]
129851880@N07
30,144,280,304
[ "equipment", "food", "material" ]
train
[ "container", "cord_other", "food", "material", "plate", "rice", "sushi" ]
129851880@N07
18,183,259,014
[ "equipment" ]
train
[ "hourglass" ]
129851880@N07
35,452,753,070
[ "equipment", "food", "structure" ]
train
[ "lime", "logo", "mackerel", "pepper_veggie_other", "seasonings", "tableware", "wood_processed" ]
129851880@N07
21,658,305,932
[ "equipment" ]
train
[ "cup", "tableware", "teapot" ]
129851880@N07
30,775,707,015
[ "equipment", "food", "material" ]
train
[ "cake", "condiment", "knife", "material", "plate" ]
129851880@N07
27,942,035,574
[ "food", "material", "structure" ]
train
[ "baked_goods", "material", "wood_processed" ]
129851880@N07
28,006,823,020
[ "equipment", "food" ]
train
[ "celery", "pie", "plate" ]
129851880@N07
29,765,711,082
[ "equipment", "food" ]
train
[ "arugula", "meat", "plate" ]
129851880@N07
25,442,024,418
[ "equipment", "food" ]
train
[ "bowl", "fruit", "ice_cream", "spoon" ]
129851880@N07
24,717,929,894
[ "equipment", "food" ]
train
[ "cookware", "grill", "kebab", "souvlaki" ]
129851880@N07
25,632,412,813
[ "equipment", "food", "structure" ]
train
[ "bowl", "food", "furniture", "meat", "plate", "soup", "spoon" ]
129851880@N07
27,273,446,819
[ "equipment", "structure" ]
train
[ "document", "wood_processed" ]
129851880@N07
29,831,336,142
[ "equipment", "food", "liquid", "material" ]
train
[ "cinnamon", "food", "lemon", "material", "mug", "sangria", "tableware" ]
129851880@N07
23,246,182,820
[ "equipment", "liquid", "material" ]
train
[ "bottle", "document", "drink", "material" ]
129851880@N07
29,157,418,872
[ "equipment", "food" ]
train
[ "logo_other", "souvlaki", "tray" ]
129851880@N07
28,719,164,733
[ "equipment", "food", "material", "structure" ]
train
[ "bag_other", "basket_container", "document", "herb_other", "logo_other", "material", "pen", "purse", "tableware", "wood_processed" ]
129851880@N07
33,175,863,033
[ "equipment", "food", "liquid", "structure" ]
train
[ "bottle", "drink", "food", "logo_other", "tableware", "wood_processed" ]
129851880@N07
24,082,604,973
[ "equipment", "food", "material", "plant" ]
train
[ "foliage", "logo_other", "material", "spice", "tableware" ]
129851880@N07
30,477,379,416
[ "equipment", "food", "material", "structure" ]
train
[ "bacon", "bag", "broccoli", "butter", "condiment", "document_other", "material", "potato", "sack", "seasonings_other", "wood_processed" ]
129851880@N07
31,616,828,044
[ "animal", "equipment", "food", "material" ]
train
[ "fish", "green_onion", "material", "plate", "seafood", "soup" ]
129851880@N07
23,213,844,035
[ "equipment", "material", "structure" ]
train
[ "logo", "tile", "toilet_seat", "wood_processed" ]
129851880@N07
21,047,641,994
[ "animal", "equipment", "food", "plant" ]
train
[ "celery", "fish", "food", "orchid", "plate", "soup", "tableware", "tomato" ]
129851880@N07
34,264,535,966
[ "equipment", "food", "material" ]
train
[ "logo", "material", "meat", "parsley", "plate", "tomato", "vegetable" ]

Federated Learning Annotated Image Repository (FLAIR): A large labelled image dataset for benchmarking in federated learning

FLAIR was published at NeurIPS 2022 (paper)

(Preferred) Benchmarking FLAIR is available in pfl-research (repo, paper).

The ml-flair repo contains a setup for benchmarking with TensorFlow Federated and notebooks for exploring data.

FLAIR is a large dataset of images that captures a number of characteristics encountered in federated learning (FL) and privacy-preserving ML tasks. This dataset comprises approximately 430,000 images from 51,000 Flickr users, which will better reflect federated learning problems arising in practice, and it is being released to aid research in the field.

alt text

Image Labels

These images have been annotated by humans and assigned labels from a taxonomy of more than 1,600 fine-grained labels. All main subjects present in the images have been labeled, so images may have multiple labels. The taxonomy is hierarchical where the fine-grained labels can be mapped to 17 coarse-grained categories. The dataset includes both fine-grained and coarse-grained labels so researchers can vary the complexity of a machine learning task.

User Labels and their use for Federated Learning

We have used image metadata to extract artist names/IDs for the purposes of creating user datasets for federated learning. While optimization algorithms for machine learning are often designed under the assumption that each example is an independent sample from the distribution, federated learning applications deviate from this assumption in a few different ways that are reflected in our user-annotated examples. Different users differ in the number of images they have, as well as the number of classes represented in their image collection. Further, images of the same class but taken by different users are likely to have some distribution shift. These properties of the dataset better reflect federated learning applications, and we expect that benchmark tasks on this dataset will benefit from algorithms designed to handle such data heterogeneity.

Dataset split

We include a standard train/val/test. The partition is based on user ids with ratio 8:1:1, i.e. train, val and test sets have disjoint users. Below are the numbers for each partition:

Partition Train Val Test
Number of users 41,131 5,141 5,142
Number of images 345,879 39,239 43,960

We recommend using the provided split for reproducible benchmarks.

Dataset structure

{'user_id': '59769174@N00',
 'image_id': 14913474848,
 'labels': ['equipment', 'material', 'structure'],
 'partition': 'train',
 'fine_grained_labels': ['bag', 'document', 'furniture', 'material', 'printed_page'],
 'image': <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=256x256>}

Field image_id is the Flickr PhotoID and user_id is the Flickr NSID that owns the image. Group by user_id to construct a realistic heterogeneous federated dataset. Field partition denotes which train/dev/test partition the image belongs to. Field fine_grained_labels is a list of annotated labels presenting the subjects in the image and labels is the list of coarse-grained labels obtained by mapping fine-grained labels to higher-order categories. The file label_relationship.txt includes the mapping from ~1,600 fine-grained labels to 17 higher-order categories.

(Recommended) Benchmark FLAIR with pfl-research

Available at https://github.com/apple/pfl-research/tree/develop/benchmarks/flair.

Benchmark FLAIR with TensorFlow Federated

Available at https://github.com/apple/ml-flair. This repo also provide scripts to explore the images and labels in more detail.

Prepare the dataset in HDF5

We found a single HDF5 file to be efficient for FL. If you want to process the dataset for general usage in FL, we recommend using this preprocessing script to construct a HDF5 file.

By default the script will group the images and labels by train/val/test split and then by user ids, making it suitable for federated learning experiments. With the flag --not_group_data_by_user, the script will simply group the images and labels by train/val/test split and ignore the user ids, which is the typical setup for centralized training.
⚠️ Warning: the hdf5 file take up to ~80GB disk space to store after processing.

Use dataset directly with HuggingFace

The dataset can also be used with the datasets package. To group datapoints by user, simply construct a mapping and then query the dataset by index:

from datasets import load_dataset
from collections import defaultdict
ds = load_dataset('apple/flair', split='val')

user_to_ix = defaultdict(list)
for i, record in enumerate(ds):
    user_to_ix[record['user_id']].append(i)

def load_user_data(user_id):
    return [ds[i] for i in user_to_ix[user_id]]

load_user_data('81594342@N00')

Disclaimer

The annotations and Apple’s other rights in the dataset are licensed under CC-BY-NC 4.0 license. The images are copyright of the respective owners, the license terms of which can be found using the links provided in ATTRIBUTIONS.TXT (by matching the Image ID). Apple makes no representations or warranties regarding the license status of each image and you should verify the license for each image yourself.

Citing FLAIR

@article{song2022flair,
  title={FLAIR: Federated Learning Annotated Image Repository},
  author={Song, Congzheng and Granqvist, Filip and Talwar, Kunal},
  journal={Advances in Neural Information Processing Systems},
  volume={35},
  pages={37792--37805},
  year={2022}
}
Downloads last month
258
Edit dataset card