--- license: cc-by-4.0 configs: - config_name: embeddings data_files: data/*.parquet - config_name: id_mapping data_files: id_mapping/*.parquet task_categories: - image-to-text - image-to-image tags: - images - CLIP - embeddings - FAISS size_categories: - 1M This is a dataset containing image urls and their CLIP embeddings, based on the [datacomp_small](https://huggingface.co/datasets/mlfoundations/datacomp_small) dataset, and processed with [fondant](https://github.com/ml6team/fondant). ## Dataset Details ### Dataset Description Large (image) datasets are often unwieldy to use due to their sheer size. Assume for instance that we would like to extract all the cat images from such a dataset. We would have to look at every image to classify if it's a cat image or not. And if we want to extract all the dog images next, we again need to look at every image. Instead, we can look at every image once, and calculate a (CLIP) embedding representing its content. Combining these embeddings into an index, we can efficiently search through the dataset with a query, finding specific images, without having to look at each one. ![CLIP index](https://cdn-uploads.huggingface.co/production/uploads/6454cb0e1a543cf97b1b6fd6/Mgl9UAqiwJrV4WDb8Y2-k.png) This is what LAION did for their [LAION-5b dataset](https://laion.ai/blog/laion-5b/), which made it possible to use, like we did in our [ControlNet example](https://github.com/ml6team/fondant-usecase-controlnet). Unfortunately, the LAION-5b dataset and index have been [taken offline](https://laion.ai/notes/laion-maintanence/) (temporarily) and there [aren't any alternatives](https://github.com/rom1504/clip-retrieval/issues/324). This is why we built an index for the Datacomp-12M dataset. While it is a lot smaller than LAION-5b, it should already enable a lot of use cases again, and can hopefully be the start towards building indices for more and larger datasets. - **License:** cc-by-4.0 ### Dataset Sources - **Original data:** [datacomp_small](https://huggingface.co/datasets/mlfoundations/datacomp_small) - **Repository:** [fondant-clip-index](https://github.com/ml6team/fondant-clip-index) ## Uses We provide an [example use case](https://github.com/ml6team/fondant-usecase-controlnet) which uses the FAISS index of this dataset to create a dataset of interior design images, used for the fine-tuning of a ControlNet model: ## Dataset Structure The data repository is structured as follows: - [data/](https://huggingface.co/datasets/fondant-ai/datacomp-small-clip/viewer): The dataset containing ids, urls, and CLIP embeddings - [faiss](https://huggingface.co/datasets/fondant-ai/datacomp-small-clip/blob/main/faiss): The faiss index - [id_mapping/](https://huggingface.co/datasets/fondant-ai/datacomp-small-clip/tree/main/id_mapping): The mapping of the faiss ids to the original urls ## Terms and Conditions Under no circumstances can Fondant be held liable by a third party for (i) the accuracy or correctness of the content, (ii) an alleged infringement of intellectual property rights or (iii) any other alleged claim, action, injunction or suit resulting from the publication or use of the dataset. ## Dataset Card Contact - Email: [info@fondant.ai](mailto:info@fondant.ai) - Discord: [https://discord.gg/HnTdWhydGp](https://discord.gg/HnTdWhydGp)