File size: 1,155 Bytes
99a5cca
 
986e653
99a5cca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# YFCC100M subset from OpenAI

Subset of [YFCC100M](https://arxiv.org/abs/1503.01817) used by OpenAI for [CLIP](https://github.com/openai/CLIP/blob/main/data/yfcc100m.md), filtered to contain only the images that we could retrieve.

| Split | train | validation |
| --- | --- | --- |
| Number of samples | 14,808,859 | 16,374 |
| Size | 1.9 TB | 2.1 GB |

Features:
* from the original dataset: `title`, `description`, `photoid`, `uid`, `unickname`, `datetaken`, `dateuploaded`, `capturedevice`, `usertags`, `machinetags`, `longitude`, `latitude`, `accuracy`, `pageurl`, `downloadurl`, `licensename`, `licenseurl`, `serverid`, `farmid`, `secret`, `secretoriginal`, `ext`, `marker`, `key`
* `img`: image content, can be loaded with `PIL.Image.open(io.BytesIO(item['img']))`
* `title_clean` and `description_clean`: derived from `title` and `description` using `clean_text` function detailed below

```python
def clean_text(text):
    # decode url
    text = urllib.parse.unquote_plus(text)
    # remove html tags
    text = re.sub('<[^<]+?>', '', text)
    # remove multiple spaces + "\r" + "\n" + "\t"
    text = " ".join(text.split())
    return text
```