fondant-cc-25m / README.md
shayorshay's picture
Fix typo in surt_url
8dafc87
metadata
license: cc
task_categories:
  - text-to-image
tags:
  - art
size_categories:
  - 10M<n<100M

Dataset Card for Fondant Creative Commons 25 million (fondant-cc-25m)

image/png

Table of Contents

Dataset Description

Changelog

Release Description
v0.1 Release of the Fondant-cc-25m dataset

Dataset Summary

Fondant-cc-25m contains 25 million image URLs with their respective Creative Commons license information collected from the Common Crawl web corpus. The dataset was created using Fondant, an open source framework that aims to simplify and speed up large-scale data processing by making self-contained pipeline components reusable across pipelines, infrastructures and shareable within the community.

Supported Tasks and Leaderboards

This dataset can be used for training or fine-tuning image generation or computer vision models.

How to use it

We have prepared a sample Fondant pipeline for downloading the dataset or part of it.

To execute the pipeline locally, you must have docker compose, Python >=3.8 and Git installed on your system.

  1. Install Fondant by running:
pip install fondant
  1. Clone the Fondant GitHub repository
git clone https://github.com/ml6team/fondant.git
  1. Make sure that Docker Compose is running, navigate to examples/pipelines/filter-cc-25m, and initiate the pipeline by executing:
fondant run pipeline --local

Note: For local testing purposes, the pipeline will only download the first 100,000 images. If you want to download the full dataset, you will need to modify the component arguments in the pipeline.py file, specifically the following part:

load_from_hf_hub = ComponentOp(
    component_dir="components/load_from_hf_hub",
    arguments={
        "dataset_name": "fondant-ai/fondant-cc-25m",
        "column_name_mapping": load_component_column_mapping,
        "n_rows_to_load": <HERE INSERT THE NUMBER OF IMAGES YOU WANT TO DOWNLOAD>
    },
)
  1. To visually inspect the results quickly, you can use:
fondant explore --base_path ./data
  1. You can also choose to download images to your local machine if you prefer, we have provided an example script that enabled this:

To run the script, you can simply execute the following:

python extract_images.py --parquet_file <Path to the Parquet file or folder containing the images> --save_folder <The folder where to save the images to>

How to contribute

If you want to contribute to the dataset, the best way is to help us develop pipeline components for further processing. Components we are currently looking to add are the following (GitHub issues):

  • πŸ‘― Image-based deduplication
  • πŸ–₯️✎ Automatic captioning
  • 🎨 Visual quality / aesthetic quality estimation
  • πŸ” Watermark detection
  • πŸ”ž Not safe for work (NSFW) content detection
  • πŸ“‡ CLIP embedding generation
  • 😐 Face detection
  • πŸ™‹πŸ»β€β™‚οΈ Personal Identifiable Information (PII) detection
  • πŸ“ Text detection
  • πŸ€– AI generated image detection
  • πŸ‘¬ Image-text CLIP similarity
  • πŸ‘¨β€πŸŽ¨ Any components that you propose to develop\

We are also looking for core framework contributors and users who are willing to give feedback on usability and suggest potential improvements

Dataset Structure

Data Instances

Each data instance corresponds to one image. The URL of the image is in the image_url feature, and other features (alt_text, webpage_url, etc) provide some metadata. Note that images have been deduplicated only based on their URLs.

Data Fields

  • image_url (string): image url to download the image
  • alt_text (string): alternative text of the image
  • webpage_url (string): webpage source of the image
  • license_type (string): creative commons license type of the image
  • license_location (string): location of the license on the webpage
  • surt_url (string): sort friendly image url with top level domain as the prefix

Data Splits

We do not provide any canonical splits for fondant-cc-25m.

Dataset Creation

Curation Rationale

Current AI image generation models such as Stable Diffusion and Dall-E are trained on hundreds of millions of images from the public Internet including copyrighted work. This creates legal risks and uncertainties for users of these images and is unfair towards copyright holders who may not want their proprietary work reproduced without consent. By releasing a Creative Commons image dataset, we hope to mitigate legal risks and empower ethical AI development that respects copyright. This dataset is the first step towards our goal of a 500M Creative Commons image dataset.

Source Data

fondant-cc-25m is built from CommonCrawl dumps. These dumps are constructed from crawling publicly available web pages.

Data Collection and Preprocessing

Permissive licenses have minimal restrictions on how the image can be copied, modified, and redistributed. The full list of licenses can be found here. We examined HTML tags of the webpages for the presence of Creative Commons license URLs. A webpage was marked permissive only when a license URL was found in its footer, aside or sidebar. This was the case only in around 0.164% of a 100k random sample from Common Crawl. This suggests that image generation models trained on a random sample from the public internet may be trained on up to 99.836% copyrighted images.

Subsequently, all the image URLs present on the web page were collected together with the license information. A manual check of a random sample of 1032 images showed that 96.32% were attributed the correct license whil 3.68% were not. False positives could be due to parsing errors but also incorrect attributions: images indicated by the publisher to be CC which are not. More information on our approach can be found in this blogpost.

Personal and Sensitive Information

The released dataset may contain sensitive information such as names, emails and addresses that have previously been published to the Internet. In the event that the dataset contains personal information, researchers should only use public, non-personal information in support of conducting and publishing their open-access research. Personal information should not be used for spamming purposes, including sending unsolicited emails or selling of personal information. Complaints, removal requests, and "do not contact" requests can be sent to info@fondant.ai. The PII filtering pipeline for this dataset is still a work in progress. Researchers that wish to contribute to the anonymization pipeline of the project can join here.

Opting out

Fondant-cc-25m is based on CommonCrawl. Their crawler honors opt-out requests in the robots.txt, see the CC FAQ for details.

We are giving the public the ability to have their image removed from the dataset upon request. The process for submitting and enacting removal requests will keep evolving throughout the project as we receive feedback and build up more data governance tools. If you'd like to have your data removed from the dataset, contact us.

Considerations for Using the Data

Discussion of Biases

As toxic or biased data is prevalent on the internet, it is possible that our dataset contains such content.

Additional Information

Dataset Curators

  1. Sharon Grundmann, ML6, sharon.grundmann@ml6.eu
  2. Matthias Richter, ML6, matthias.richter@ml6.eu
  3. Robbe Sneyders, ML6, robbe.sneyders@ml6.eu

Licensing Information

Fondant-cc-25m is a collection of images with various Creative Commons and other public licenses. Any use of all or part of the images gathered in Fondant-cc-25m must abide by the terms of the original licenses, including attribution clauses when relevant. We facilitate this by providing provenance information for each data point.

The list of Creative Commons license types included in the dataset can be found here.

Contact