import{s as el,n as sl,o as ll}from"../chunks/scheduler.9cda857a.js";import{S as al,i as tl,e as i,s as t,c as T,h as nl,a as p,d as l,b as n,f as zs,g as r,j as o,k as Ks,l as il,m as a,n as M,t as m,o as U,p as c}from"../chunks/index.003612b0.js";import{C as pl}from"../chunks/CopyLLMTxtMenu.44d08a39.js";import{C as y}from"../chunks/CodeBlock.a90632f1.js";import{H as d,E as ol}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.e5cfda8c.js";function Tl(gs){let J,fe,we,ue,w,je,h,ge,f,Cs='This guide will show you how to configure your dataset repository with image files. You can find accompanying examples of repositories in this <a href="https://huggingface.co/collections/datasets-examples/image-dataset-6568e7cf28639db76eb92d65" rel="nofollow">Image datasets examples collection</a>.',Ce,u,Is='A dataset with a supported structure and <a href="./datasets-adding#file-formats">file formats</a> automatically has a Dataset Viewer on its page on the Hub.',Ie,j,bs="Additional information about your images - such as captions or bounding boxes for object detection - is automatically loaded as long as you include this information in a metadata file (<code>metadata.csv</code>/<code>metadata.jsonl</code>/<code>metadata.parquet</code>).",be,g,$s='Alternatively, images can be in Parquet files or in TAR archives following the <a href="https://github.com/webdataset/webdataset" rel="nofollow">WebDataset</a> format.',$e,C,ke,I,ks="If your dataset only consists of one column with images, you can simply store your image files at the root:",Qe,b,Be,$,Qs="or in a subdirectory:",Ae,k,ve,Q,Bs='Multiple <a href="./datasets-adding#file-formats">formats</a> are supported at the same time, including PNG, JPEG, TIFF and WebP.',Oe,B,Ve,A,As="If you have several splits, you can put your images into directories named accordingly:",Ne,v,Fe,O,vs='See <a href="./datasets-file-names-and-splits">File names and splits</a> for more information and other ways to organize data by splits.',Ge,V,De,N,Os='If there is additional information you’d like to include about your dataset, like text captions or bounding boxes, add it as a <code>metadata.csv</code> file in your repository. This lets you quickly create datasets for different computer vision tasks like <a href="https://huggingface.co/tasks/image-to-text" rel="nofollow">text captioning</a> or <a href="https://huggingface.co/tasks/object-detection" rel="nofollow">object detection</a>.',Re,F,xe,G,Vs="Your <code>metadata.csv</code> file must have a <code>file_name</code> column which links image files with their metadata:",_e,D,Ze,R,Ns='You can also use a <a href="https://jsonlines.org/" rel="nofollow">JSONL</a> file <code>metadata.jsonl</code>:',qe,x,He,_,Fs='And for bigger datasets or if you are interested in advanced data retrieval features, you can use a <a href="https://parquet.apache.org/" rel="nofollow">Parquet</a> file <code>metadata.parquet</code>.',Ee,Z,Le,q,Gs="Metadata file must be located either in the same directory with the images it is linked to, or in any parent directory, like in this example:",Se,H,Ye,E,Ds="In this case, the <code>file_name</code> column must be a full relative path to the images, not just the filename:",We,L,Xe,S,Rs="Metadata files cannot be put in subdirectories of a directory with the images.",Pe,Y,xs="More generally, any column named <code>file_name</code> or <code>*_file_name</code> should contain the full relative path to the images.",ze,W,Ke,X,_s="For image classification datasets, you can also use a simple setup: use directories to name the image classes. Store your image files in a directory structure like:",es,P,ss,z,Zs="The dataset created with this structure contains two columns: <code>image</code> and <code>label</code> (with values <code>green</code> and <code>red</code>).",ls,K,qs='You can also provide multiple splits. To do so, your dataset directory should have the following structure (see <a href="./datasets-file-names-and-splits">File names and splits</a> for more information):',as,ee,ts,se,Hs='You can disable this automatic addition of the <code>label</code> column in the <a href="./datasets-manual-configuration">YAML configuration</a>. If your directory names have no special meaning, set <code>drop_labels: true</code> in the README header:',ns,le,is,ae,ps,te,os,ne,Es=`The <a href="./datasets-webdataset">WebDataset</a> format is well suited for large scale image datasets (see <a href="https://huggingface.co/datasets/timm/imagenet-12k-wds" rel="nofollow">timm/imagenet-12k-wds</a> for example).
It consists of TAR archives containing images and their metadata and is optimized for streaming. It is useful if you have a large number of images and to get streaming data loaders for large scale training.`,Ts,ie,rs,pe,Ls=`To make a WebDataset TAR archive, create a directory containing the images and metadata files to be archived and create the TAR archive using e.g. the <code>tar</code> command.
The usual size per archive is generally around 1GB.
Make sure each image and metadata pair share the same file prefix, for example:`,Ms,oe,ms,Te,Ss=`Note that for user convenience and to enable the <a href="./datasets-viewer">Dataset Viewer</a>, every dataset hosted in the Hub is automatically converted to Parquet format up to 5GB.
Read more about it in the <a href="./datasets-viewer#access-the-parquet-files">Parquet format</a> documentation.`,Us,re,cs,Me,Ys=`Instead of uploading the images and metadata as individual files, you can embed everything inside a <a href="https://parquet.apache.org/" rel="nofollow">Parquet</a> file.
This is useful if you have a large number of images, if you want to embed multiple image columns, or if you want to store additional information about the images in the same file.
Parquet is also useful for storing data such as raw bytes, which is not supported by JSON/CSV.`,ys,me,Js,Ue,Ws='Parquet files with image data can be created using <code>pandas</code> or the <code>datasets</code> library. To create Parquet files with image data in <code>pandas</code>, you can use <a href="https://github.com/lhoestq/pandas-image-methods" rel="nofollow">pandas-image-methods</a> and <code>df.to_parquet()</code>. In <code>datasets</code>, you can set the column type to <code>Image()</code> and use the <code>ds.to_parquet(...)</code> method or <code>ds.push_to_hub(...)</code>. You can find a guide on loading image datasets in <code>datasets</code> <a href="/docs/datasets/image_load">here</a>.',ds,ce,Xs="Alternatively you can manually set the image type of Parquet created using other tools. First, make sure your image columns are of type <em>struct</em>, with a binary field <code>&quot;bytes&quot;</code> for the image data and a string field <code>&quot;path&quot;</code> for the image file name or path. Then you should specify the feature types of the columns directly in YAML in the README header, for example:",ws,ye,hs,Je,Ps='Note that Parquet is recommended for small images (&lt;1MB per image) and small row groups (100 rows per row group, which is what <code>datasets</code> uses for images). For larger images it is recommended to use the WebDataset format, or to share the original image files (optionally with metadata files, and following the <a href="https://huggingface.co/docs/hub/en/storage-limits" rel="nofollow">repositories recommendations and limits</a> for storage and number of files).',fs,de,us,he,js;return w=new pl({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),h=new d({props:{title:"Image Dataset",local:"image-dataset",headingTag:"h1"}}),C=new d({props:{title:"Only images",local:"only-images",headingTag:"h2"}}),b=new y({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwMS5qcGclMEElRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAyLmpwZyUwQSVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMDMuanBnJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwNC5qcGc=",highlighted:`my_dataset_repository/
├── <span class="hljs-number">1</span><span class="hljs-selector-class">.jpg</span>
├── <span class="hljs-number">2</span><span class="hljs-selector-class">.jpg</span>
├── <span class="hljs-number">3</span><span class="hljs-selector-class">.jpg</span>
└── <span class="hljs-number">4</span>.jpg`,wrap:!1}}),k=new y({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwaW1hZ2VzJTBBJTIwJTIwJTIwJTIwJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwMS5qcGclMEElMjAlMjAlMjAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAyLmpwZyUwQSUyMCUyMCUyMCUyMCVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMDMuanBnJTBBJTIwJTIwJTIwJTIwJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwNC5qcGc=",highlighted:`my_dataset_repository/
└── images
    ├── <span class="hljs-number">1</span><span class="hljs-selector-class">.jpg</span>
    ├── <span class="hljs-number">2</span><span class="hljs-selector-class">.jpg</span>
    ├── <span class="hljs-number">3</span><span class="hljs-selector-class">.jpg</span>
    └── <span class="hljs-number">4</span>.jpg`,wrap:!1}}),B=new y({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwaW1hZ2VzJTBBJTIwJTIwJTIwJTIwJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwMS5qcGclMEElMjAlMjAlMjAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAyLnBuZyUwQSUyMCUyMCUyMCUyMCVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMDMudGlmZiUwQSUyMCUyMCUyMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMDQud2VicA==",highlighted:`my_dataset_repository/
└── images
    ├── <span class="hljs-number">1</span><span class="hljs-selector-class">.jpg</span>
    ├── <span class="hljs-number">2</span><span class="hljs-selector-class">.png</span>
    ├── <span class="hljs-number">3</span><span class="hljs-selector-class">.tiff</span>
    └── <span class="hljs-number">4</span>.webp`,wrap:!1}}),v=new y({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwdHJhaW4lMEElRTIlOTQlODIlQzIlQTAlQzIlQTAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAxLmpwZyUwQSVFMiU5NCU4MiVDMiVBMCVDMiVBMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMDIuanBnJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwdGVzdCUwQSUyMCUyMCUyMCUyMCVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMDMuanBnJTBBJTIwJTIwJTIwJTIwJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwNC5qcGc=",highlighted:`my_dataset_repository/
├── train
│   ├── <span class="hljs-number">1</span><span class="hljs-selector-class">.jpg</span>
│   └── <span class="hljs-number">2</span><span class="hljs-selector-class">.jpg</span>
└── test
    ├── <span class="hljs-number">3</span><span class="hljs-selector-class">.jpg</span>
    └── <span class="hljs-number">4</span>.jpg`,wrap:!1}}),V=new d({props:{title:"Additional columns",local:"additional-columns",headingTag:"h2"}}),F=new y({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwdHJhaW4lMEElMjAlMjAlMjAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAxLmpwZyUwQSUyMCUyMCUyMCUyMCVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMDIuanBnJTBBJTIwJTIwJTIwJTIwJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwMy5qcGclMEElMjAlMjAlMjAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjA0LmpwZyUwQSUyMCUyMCUyMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMG1ldGFkYXRhLmNzdg==",highlighted:`my_dataset_repository/
└── train
    ├── <span class="hljs-number">1</span><span class="hljs-selector-class">.jpg</span>
    ├── <span class="hljs-number">2</span><span class="hljs-selector-class">.jpg</span>
    ├── <span class="hljs-number">3</span><span class="hljs-selector-class">.jpg</span>
    ├── <span class="hljs-number">4</span><span class="hljs-selector-class">.jpg</span>
    └── metadata.csv`,wrap:!1}}),D=new y({props:{code:"ZmlsZV9uYW1lJTJDdGV4dCUwQTEuanBnJTJDYSUyMGRyYXdpbmclMjBvZiUyMGElMjBncmVlbiUyMHBva2Vtb24lMjB3aXRoJTIwcmVkJTIwZXllcyUwQTIuanBnJTJDYSUyMGdyZWVuJTIwYW5kJTIweWVsbG93JTIwdG95JTIwd2l0aCUyMGElMjByZWQlMjBub3NlJTBBMy5qcGclMkNhJTIwcmVkJTIwYW5kJTIwd2hpdGUlMjBiYWxsJTIwd2l0aCUyMGFuJTIwYW5ncnklMjBsb29rJTIwb24lMjBpdHMlMjBmYWNlJTBBNC5qcGclMkNhJTIwY2FydG9vbiUyMGJhbGwlMjB3aXRoJTIwYSUyMHNtaWxlJTIwb24lMjBpdHMlMjBmYWNl",highlighted:`file_name,<span class="hljs-keyword">text</span>
<span class="hljs-number">1.</span>jpg,<span class="hljs-keyword">a</span> drawing <span class="hljs-keyword">of</span> <span class="hljs-keyword">a</span> green pokemon <span class="hljs-keyword">with</span> red eyes
<span class="hljs-number">2.</span>jpg,<span class="hljs-keyword">a</span> green <span class="hljs-keyword">and</span> yellow toy <span class="hljs-keyword">with</span> <span class="hljs-keyword">a</span> red nose
<span class="hljs-number">3.</span>jpg,<span class="hljs-keyword">a</span> red <span class="hljs-keyword">and</span> white ball <span class="hljs-keyword">with</span> <span class="hljs-keyword">an</span> angry look <span class="hljs-keyword">on</span> <span class="hljs-title">its</span> <span class="hljs-title">face</span>
<span class="hljs-number">4.</span>jpg,<span class="hljs-keyword">a</span> cartoon ball <span class="hljs-keyword">with</span> <span class="hljs-keyword">a</span> smile <span class="hljs-keyword">on</span> <span class="hljs-title">its</span> <span class="hljs-title">face</span>`,wrap:!1}}),x=new y({props:{code:"JTdCJTIyZmlsZV9uYW1lJTIyJTNBJTIwJTIyMS5qcGclMjIlMkMlMjJ0ZXh0JTIyJTNBJTIwJTIyYSUyMGRyYXdpbmclMjBvZiUyMGElMjBncmVlbiUyMHBva2Vtb24lMjB3aXRoJTIwcmVkJTIwZXllcyUyMiU3RCUwQSU3QiUyMmZpbGVfbmFtZSUyMiUzQSUyMCUyMjIuanBnJTIyJTJDJTIydGV4dCUyMiUzQSUyMCUyMmElMjBncmVlbiUyMGFuZCUyMHllbGxvdyUyMHRveSUyMHdpdGglMjBhJTIwcmVkJTIwbm9zZSUyMiU3RCUwQSU3QiUyMmZpbGVfbmFtZSUyMiUzQSUyMCUyMjMuanBnJTIyJTJDJTIydGV4dCUyMiUzQSUyMCUyMmElMjByZWQlMjBhbmQlMjB3aGl0ZSUyMGJhbGwlMjB3aXRoJTIwYW4lMjBhbmdyeSUyMGxvb2slMjBvbiUyMGl0cyUyMGZhY2UlMjIlN0QlMEElN0IlMjJmaWxlX25hbWUlMjIlM0ElMjAlMjI0LmpwZyUyMiUyQyUyMnRleHQlMjIlM0ElMjAlMjJhJTIwY2FydG9vbiUyMGJhbGwlMjB3aXRoJTIwYSUyMHNtaWxlJTIwb24lMjBpdHMlMjBmYWNlJTIyJTdE",highlighted:`{<span class="hljs-comment">&quot;file_name&quot;</span>: <span class="hljs-comment">&quot;1.jpg&quot;</span>,<span class="hljs-comment">&quot;text&quot;</span>: <span class="hljs-comment">&quot;a drawing of a green pokemon with red eyes&quot;</span>}
{<span class="hljs-comment">&quot;file_name&quot;</span>: <span class="hljs-comment">&quot;2.jpg&quot;</span>,<span class="hljs-comment">&quot;text&quot;</span>: <span class="hljs-comment">&quot;a green and yellow toy with a red nose&quot;</span>}
{<span class="hljs-comment">&quot;file_name&quot;</span>: <span class="hljs-comment">&quot;3.jpg&quot;</span>,<span class="hljs-comment">&quot;text&quot;</span>: <span class="hljs-comment">&quot;a red and white ball with an angry look on its face&quot;</span>}
{<span class="hljs-comment">&quot;file_name&quot;</span>: <span class="hljs-comment">&quot;4.jpg&quot;</span>,<span class="hljs-comment">&quot;text&quot;</span>: <span class="hljs-comment">&quot;a cartoon ball with a smile on its face&quot;</span>}`,wrap:!1}}),Z=new d({props:{title:"Relative paths",local:"relative-paths",headingTag:"h2"}}),H=new y({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwdHJhaW4lMEElMjAlMjAlMjAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjBpbWFnZXMlMEElMjAlMjAlMjAlMjAlRTIlOTQlODIlQzIlQTAlQzIlQTAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAxLmpwZyUwQSUyMCUyMCUyMCUyMCVFMiU5NCU4MiVDMiVBMCVDMiVBMCUyMCVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMDIuanBnJTBBJTIwJTIwJTIwJTIwJUUyJTk0JTgyJUMyJUEwJUMyJUEwJTIwJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwMy5qcGclMEElMjAlMjAlMjAlMjAlRTIlOTQlODIlQzIlQTAlQzIlQTAlMjAlRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjA0LmpwZyUwQSUyMCUyMCUyMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMG1ldGFkYXRhLmNzdg==",highlighted:`my_dataset_repository/
└── train
    ├── images
    │   ├── <span class="hljs-number">1</span><span class="hljs-selector-class">.jpg</span>
    │   ├── <span class="hljs-number">2</span><span class="hljs-selector-class">.jpg</span>
    │   ├── <span class="hljs-number">3</span><span class="hljs-selector-class">.jpg</span>
    │   └── <span class="hljs-number">4</span><span class="hljs-selector-class">.jpg</span>
    └── metadata.csv`,wrap:!1}}),L=new y({props:{code:"ZmlsZV9uYW1lJTJDdGV4dCUwQWltYWdlcyUyRjEuanBnJTJDYSUyMGRyYXdpbmclMjBvZiUyMGElMjBncmVlbiUyMHBva2Vtb24lMjB3aXRoJTIwcmVkJTIwZXllcyUwQWltYWdlcyUyRjIuanBnJTJDYSUyMGdyZWVuJTIwYW5kJTIweWVsbG93JTIwdG95JTIwd2l0aCUyMGElMjByZWQlMjBub3NlJTBBaW1hZ2VzJTJGMy5qcGclMkNhJTIwcmVkJTIwYW5kJTIwd2hpdGUlMjBiYWxsJTIwd2l0aCUyMGFuJTIwYW5ncnklMjBsb29rJTIwb24lMjBpdHMlMjBmYWNlJTBBaW1hZ2VzJTJGNC5qcGclMkNhJTIwY2FydG9vbiUyMGJhbGwlMjB3aXRoJTIwYSUyMHNtaWxlJTIwb24lMjBpdCdzJTIwZmFjZQ==",highlighted:`file_name,<span class="hljs-keyword">text</span>
images/<span class="hljs-number">1.</span>jpg,<span class="hljs-keyword">a</span> drawing <span class="hljs-keyword">of</span> <span class="hljs-keyword">a</span> green pokemon <span class="hljs-keyword">with</span> red eyes
images/<span class="hljs-number">2.</span>jpg,<span class="hljs-keyword">a</span> green <span class="hljs-keyword">and</span> yellow toy <span class="hljs-keyword">with</span> <span class="hljs-keyword">a</span> red nose
images/<span class="hljs-number">3.</span>jpg,<span class="hljs-keyword">a</span> red <span class="hljs-keyword">and</span> white ball <span class="hljs-keyword">with</span> <span class="hljs-keyword">an</span> angry look <span class="hljs-keyword">on</span> <span class="hljs-title">its</span> <span class="hljs-title">face</span>
images/<span class="hljs-number">4.</span>jpg,<span class="hljs-keyword">a</span> cartoon ball <span class="hljs-keyword">with</span> <span class="hljs-keyword">a</span> smile <span class="hljs-keyword">on</span> <span class="hljs-title">it</span><span class="hljs-string">&#x27;s face</span>`,wrap:!1}}),W=new d({props:{title:"Image classification",local:"image-classification",headingTag:"h2"}}),P=new y({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwZ3JlZW4lMEElRTIlOTQlODIlQzIlQTAlQzIlQTAlMjAlRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAxLmpwZyUwQSVFMiU5NCU4MiVDMiVBMCVDMiVBMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMDIuanBnJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwcmVkJTBBJTIwJTIwJTIwJTIwJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwMy5qcGclMEElMjAlMjAlMjAlMjAlRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjA0LmpwZw==",highlighted:`my_dataset_repository/
├── green
│   ├── <span class="hljs-number">1</span><span class="hljs-selector-class">.jpg</span>
│   └── <span class="hljs-number">2</span><span class="hljs-selector-class">.jpg</span>
└── red
    ├── <span class="hljs-number">3</span><span class="hljs-selector-class">.jpg</span>
    └── <span class="hljs-number">4</span>.jpg`,wrap:!1}}),ee=new y({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwdGVzdCUwQSVFMiU5NCU4MiVDMiVBMCVDMiVBMCUyMCVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMGdyZWVuJTBBJUUyJTk0JTgyJUMyJUEwJUMyJUEwJTIwJUUyJTk0JTgyJUMyJUEwJUMyJUEwJTIwJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwMi5qcGclMEElRTIlOTQlODIlQzIlQTAlQzIlQTAlMjAlRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjByZWQlMEElRTIlOTQlODIlQzIlQTAlQzIlQTAlMjAlMjAlMjAlMjAlMjAlRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjA0LmpwZyUwQSVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMHRyYWluJTBBJTIwJTIwJTIwJTIwJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwZ3JlZW4lMEElMjAlMjAlMjAlMjAlRTIlOTQlODIlQzIlQTAlQzIlQTAlMjAlRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjAxLmpwZyUwQSUyMCUyMCUyMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMHJlZCUwQSUyMCUyMCUyMCUyMCUyMCUyMCUyMCUyMCVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMDMuanBn",highlighted:`my_dataset_repository/
├── test
│   ├── <span class="hljs-built_in">green</span>
│   │   └── <span class="hljs-number">2.</span>jpg
│   └── <span class="hljs-built_in">red</span>
│       └── <span class="hljs-number">4.</span>jpg
└── train
    ├── <span class="hljs-built_in">green</span>
    │   └── <span class="hljs-number">1.</span>jpg
    └── <span class="hljs-built_in">red</span>
        └── <span class="hljs-number">3.</span>jpg`,wrap:!1}}),le=new y({props:{code:"Y29uZmlncyUzQSUwQSUyMCUyMC0lMjBjb25maWdfbmFtZSUzQSUyMGRlZmF1bHQlMjAlMjAlMjMlMjBOYW1lJTIwb2YlMjB0aGUlMjBkYXRhc2V0JTIwc3Vic2V0JTJDJTIwaWYlMjBhcHBsaWNhYmxlLiUwQSUyMCUyMCUyMCUyMGRyb3BfbGFiZWxzJTNBJTIwdHJ1ZQ==",highlighted:`<span class="hljs-attr">configs:</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">config_name:</span> <span class="hljs-string">default</span>  <span class="hljs-comment"># Name of the dataset subset, if applicable.</span>
    <span class="hljs-attr">drop_labels:</span> <span class="hljs-literal">true</span>`,wrap:!1}}),ae=new d({props:{title:"Large scale datasets",local:"large-scale-datasets",headingTag:"h2"}}),te=new d({props:{title:"WebDataset format",local:"webdataset-format",headingTag:"h3"}}),ie=new y({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTlDJUUyJTk0JTgwJUUyJTk0JTgwJTIwdHJhaW4tMDAwMC50YXIlMEElRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjB0cmFpbi0wMDAxLnRhciUwQSVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMC4uLiUwQSVFMiU5NCU5NCVFMiU5NCU4MCVFMiU5NCU4MCUyMHRyYWluLTEwMjMudGFy",highlighted:`my_dataset_repository/
├── train<span class="hljs-string">-0000</span>.tar
├── train<span class="hljs-string">-0001</span>.tar
├── ...
└── train<span class="hljs-string">-1023</span>.tar`,wrap:!1}}),oe=new y({props:{code:"dHJhaW4tMDAwMCUyRiUwQSVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMDAwMC5qcGclMEElRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAwMDAuanNvbiUwQSVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMDAwMS5qcGclMEElRTIlOTQlOUMlRTIlOTQlODAlRTIlOTQlODAlMjAwMDEuanNvbiUwQSVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMC4uLiUwQSVFMiU5NCU5QyVFMiU5NCU4MCVFMiU5NCU4MCUyMDk5OS5qcGclMEElRTIlOTQlOTQlRTIlOTQlODAlRTIlOTQlODAlMjA5OTkuanNvbg==",highlighted:`train-<span class="hljs-number">0000</span>/
├── <span class="hljs-number">000</span><span class="hljs-selector-class">.jpg</span>
├── <span class="hljs-number">000</span><span class="hljs-selector-class">.json</span>
├── <span class="hljs-number">001</span><span class="hljs-selector-class">.jpg</span>
├── <span class="hljs-number">001</span><span class="hljs-selector-class">.json</span>
├── ...
├── <span class="hljs-number">999</span><span class="hljs-selector-class">.jpg</span>
└── <span class="hljs-number">999</span>.json`,wrap:!1}}),re=new d({props:{title:"Parquet format",local:"parquet-format",headingTag:"h3"}}),me=new y({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwdHJhaW4ucGFycXVldA==",highlighted:`my_dataset_repository/
└── train.parquet`,wrap:!1}}),ye=new y({props:{code:"ZGF0YXNldF9pbmZvJTNBJTBBJTIwJTIwZmVhdHVyZXMlM0ElMEElMjAlMjAtJTIwbmFtZSUzQSUyMGltYWdlJTBBJTIwJTIwJTIwJTIwZHR5cGUlM0ElMjBpbWFnZSUwQSUyMCUyMC0lMjBuYW1lJTNBJTIwY2FwdGlvbiUwQSUyMCUyMCUyMCUyMGR0eXBlJTNBJTIwc3RyaW5n",highlighted:`<span class="hljs-attr">dataset_info:</span>
  <span class="hljs-attr">features:</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">image</span>
    <span class="hljs-attr">dtype:</span> <span class="hljs-string">image</span>
  <span class="hljs-bullet">-</span> <span class="hljs-attr">name:</span> <span class="hljs-string">caption</span>
    <span class="hljs-attr">dtype:</span> <span class="hljs-string">string</span>`,wrap:!1}}),de=new ol({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/datasets-image.md"}}),{c(){J=i("meta"),fe=t(),we=i("p"),ue=t(),T(w.$$.fragment),je=t(),T(h.$$.fragment),ge=t(),f=i("p"),f.innerHTML=Cs,Ce=t(),u=i("p"),u.innerHTML=Is,Ie=t(),j=i("p"),j.innerHTML=bs,be=t(),g=i("p"),g.innerHTML=$s,$e=t(),T(C.$$.fragment),ke=t(),I=i("p"),I.textContent=ks,Qe=t(),T(b.$$.fragment),Be=t(),$=i("p"),$.textContent=Qs,Ae=t(),T(k.$$.fragment),ve=t(),Q=i("p"),Q.innerHTML=Bs,Oe=t(),T(B.$$.fragment),Ve=t(),A=i("p"),A.textContent=As,Ne=t(),T(v.$$.fragment),Fe=t(),O=i("p"),O.innerHTML=vs,Ge=t(),T(V.$$.fragment),De=t(),N=i("p"),N.innerHTML=Os,Re=t(),T(F.$$.fragment),xe=t(),G=i("p"),G.innerHTML=Vs,_e=t(),T(D.$$.fragment),Ze=t(),R=i("p"),R.innerHTML=Ns,qe=t(),T(x.$$.fragment),He=t(),_=i("p"),_.innerHTML=Fs,Ee=t(),T(Z.$$.fragment),Le=t(),q=i("p"),q.textContent=Gs,Se=t(),T(H.$$.fragment),Ye=t(),E=i("p"),E.innerHTML=Ds,We=t(),T(L.$$.fragment),Xe=t(),S=i("p"),S.textContent=Rs,Pe=t(),Y=i("p"),Y.innerHTML=xs,ze=t(),T(W.$$.fragment),Ke=t(),X=i("p"),X.textContent=_s,es=t(),T(P.$$.fragment),ss=t(),z=i("p"),z.innerHTML=Zs,ls=t(),K=i("p"),K.innerHTML=qs,as=t(),T(ee.$$.fragment),ts=t(),se=i("p"),se.innerHTML=Hs,ns=t(),T(le.$$.fragment),is=t(),T(ae.$$.fragment),ps=t(),T(te.$$.fragment),os=t(),ne=i("p"),ne.innerHTML=Es,Ts=t(),T(ie.$$.fragment),rs=t(),pe=i("p"),pe.innerHTML=Ls,Ms=t(),T(oe.$$.fragment),ms=t(),Te=i("p"),Te.innerHTML=Ss,Us=t(),T(re.$$.fragment),cs=t(),Me=i("p"),Me.innerHTML=Ys,ys=t(),T(me.$$.fragment),Js=t(),Ue=i("p"),Ue.innerHTML=Ws,ds=t(),ce=i("p"),ce.innerHTML=Xs,ws=t(),T(ye.$$.fragment),hs=t(),Je=i("p"),Je.innerHTML=Ps,fs=t(),T(de.$$.fragment),us=t(),he=i("p"),this.h()},l(e){const s=nl("svelte-u9bgzb",document.head);J=p(s,"META",{name:!0,content:!0}),s.forEach(l),fe=n(e),we=p(e,"P",{}),zs(we).forEach(l),ue=n(e),r(w.$$.fragment,e),je=n(e),r(h.$$.fragment,e),ge=n(e),f=p(e,"P",{"data-svelte-h":!0}),o(f)!=="svelte-v7rbuf"&&(f.innerHTML=Cs),Ce=n(e),u=p(e,"P",{"data-svelte-h":!0}),o(u)!=="svelte-u1gdfq"&&(u.innerHTML=Is),Ie=n(e),j=p(e,"P",{"data-svelte-h":!0}),o(j)!=="svelte-1ymhost"&&(j.innerHTML=bs),be=n(e),g=p(e,"P",{"data-svelte-h":!0}),o(g)!=="svelte-8l0ovg"&&(g.innerHTML=$s),$e=n(e),r(C.$$.fragment,e),ke=n(e),I=p(e,"P",{"data-svelte-h":!0}),o(I)!=="svelte-37nscg"&&(I.textContent=ks),Qe=n(e),r(b.$$.fragment,e),Be=n(e),$=p(e,"P",{"data-svelte-h":!0}),o($)!=="svelte-19pjkki"&&($.textContent=Qs),Ae=n(e),r(k.$$.fragment,e),ve=n(e),Q=p(e,"P",{"data-svelte-h":!0}),o(Q)!=="svelte-e5vckm"&&(Q.innerHTML=Bs),Oe=n(e),r(B.$$.fragment,e),Ve=n(e),A=p(e,"P",{"data-svelte-h":!0}),o(A)!=="svelte-l8z8xp"&&(A.textContent=As),Ne=n(e),r(v.$$.fragment,e),Fe=n(e),O=p(e,"P",{"data-svelte-h":!0}),o(O)!=="svelte-kefeul"&&(O.innerHTML=vs),Ge=n(e),r(V.$$.fragment,e),De=n(e),N=p(e,"P",{"data-svelte-h":!0}),o(N)!=="svelte-1ehvjow"&&(N.innerHTML=Os),Re=n(e),r(F.$$.fragment,e),xe=n(e),G=p(e,"P",{"data-svelte-h":!0}),o(G)!=="svelte-16f2gib"&&(G.innerHTML=Vs),_e=n(e),r(D.$$.fragment,e),Ze=n(e),R=p(e,"P",{"data-svelte-h":!0}),o(R)!=="svelte-1md2l6g"&&(R.innerHTML=Ns),qe=n(e),r(x.$$.fragment,e),He=n(e),_=p(e,"P",{"data-svelte-h":!0}),o(_)!=="svelte-17vzj19"&&(_.innerHTML=Fs),Ee=n(e),r(Z.$$.fragment,e),Le=n(e),q=p(e,"P",{"data-svelte-h":!0}),o(q)!=="svelte-1gwaj92"&&(q.textContent=Gs),Se=n(e),r(H.$$.fragment,e),Ye=n(e),E=p(e,"P",{"data-svelte-h":!0}),o(E)!=="svelte-1wjvumb"&&(E.innerHTML=Ds),We=n(e),r(L.$$.fragment,e),Xe=n(e),S=p(e,"P",{"data-svelte-h":!0}),o(S)!=="svelte-1xb8ill"&&(S.textContent=Rs),Pe=n(e),Y=p(e,"P",{"data-svelte-h":!0}),o(Y)!=="svelte-15baaod"&&(Y.innerHTML=xs),ze=n(e),r(W.$$.fragment,e),Ke=n(e),X=p(e,"P",{"data-svelte-h":!0}),o(X)!=="svelte-z798u1"&&(X.textContent=_s),es=n(e),r(P.$$.fragment,e),ss=n(e),z=p(e,"P",{"data-svelte-h":!0}),o(z)!=="svelte-1j7sm10"&&(z.innerHTML=Zs),ls=n(e),K=p(e,"P",{"data-svelte-h":!0}),o(K)!=="svelte-jxxgnh"&&(K.innerHTML=qs),as=n(e),r(ee.$$.fragment,e),ts=n(e),se=p(e,"P",{"data-svelte-h":!0}),o(se)!=="svelte-op9ivs"&&(se.innerHTML=Hs),ns=n(e),r(le.$$.fragment,e),is=n(e),r(ae.$$.fragment,e),ps=n(e),r(te.$$.fragment,e),os=n(e),ne=p(e,"P",{"data-svelte-h":!0}),o(ne)!=="svelte-1xyr3zu"&&(ne.innerHTML=Es),Ts=n(e),r(ie.$$.fragment,e),rs=n(e),pe=p(e,"P",{"data-svelte-h":!0}),o(pe)!=="svelte-1gf9xhb"&&(pe.innerHTML=Ls),Ms=n(e),r(oe.$$.fragment,e),ms=n(e),Te=p(e,"P",{"data-svelte-h":!0}),o(Te)!=="svelte-1uixi8y"&&(Te.innerHTML=Ss),Us=n(e),r(re.$$.fragment,e),cs=n(e),Me=p(e,"P",{"data-svelte-h":!0}),o(Me)!=="svelte-k79ne"&&(Me.innerHTML=Ys),ys=n(e),r(me.$$.fragment,e),Js=n(e),Ue=p(e,"P",{"data-svelte-h":!0}),o(Ue)!=="svelte-y4diuk"&&(Ue.innerHTML=Ws),ds=n(e),ce=p(e,"P",{"data-svelte-h":!0}),o(ce)!=="svelte-149tbjs"&&(ce.innerHTML=Xs),ws=n(e),r(ye.$$.fragment,e),hs=n(e),Je=p(e,"P",{"data-svelte-h":!0}),o(Je)!=="svelte-59yffi"&&(Je.innerHTML=Ps),fs=n(e),r(de.$$.fragment,e),us=n(e),he=p(e,"P",{}),zs(he).forEach(l),this.h()},h(){Ks(J,"name","hf:doc:metadata"),Ks(J,"content",rl)},m(e,s){il(document.head,J),a(e,fe,s),a(e,we,s),a(e,ue,s),M(w,e,s),a(e,je,s),M(h,e,s),a(e,ge,s),a(e,f,s),a(e,Ce,s),a(e,u,s),a(e,Ie,s),a(e,j,s),a(e,be,s),a(e,g,s),a(e,$e,s),M(C,e,s),a(e,ke,s),a(e,I,s),a(e,Qe,s),M(b,e,s),a(e,Be,s),a(e,$,s),a(e,Ae,s),M(k,e,s),a(e,ve,s),a(e,Q,s),a(e,Oe,s),M(B,e,s),a(e,Ve,s),a(e,A,s),a(e,Ne,s),M(v,e,s),a(e,Fe,s),a(e,O,s),a(e,Ge,s),M(V,e,s),a(e,De,s),a(e,N,s),a(e,Re,s),M(F,e,s),a(e,xe,s),a(e,G,s),a(e,_e,s),M(D,e,s),a(e,Ze,s),a(e,R,s),a(e,qe,s),M(x,e,s),a(e,He,s),a(e,_,s),a(e,Ee,s),M(Z,e,s),a(e,Le,s),a(e,q,s),a(e,Se,s),M(H,e,s),a(e,Ye,s),a(e,E,s),a(e,We,s),M(L,e,s),a(e,Xe,s),a(e,S,s),a(e,Pe,s),a(e,Y,s),a(e,ze,s),M(W,e,s),a(e,Ke,s),a(e,X,s),a(e,es,s),M(P,e,s),a(e,ss,s),a(e,z,s),a(e,ls,s),a(e,K,s),a(e,as,s),M(ee,e,s),a(e,ts,s),a(e,se,s),a(e,ns,s),M(le,e,s),a(e,is,s),M(ae,e,s),a(e,ps,s),M(te,e,s),a(e,os,s),a(e,ne,s),a(e,Ts,s),M(ie,e,s),a(e,rs,s),a(e,pe,s),a(e,Ms,s),M(oe,e,s),a(e,ms,s),a(e,Te,s),a(e,Us,s),M(re,e,s),a(e,cs,s),a(e,Me,s),a(e,ys,s),M(me,e,s),a(e,Js,s),a(e,Ue,s),a(e,ds,s),a(e,ce,s),a(e,ws,s),M(ye,e,s),a(e,hs,s),a(e,Je,s),a(e,fs,s),M(de,e,s),a(e,us,s),a(e,he,s),js=!0},p:sl,i(e){js||(m(w.$$.fragment,e),m(h.$$.fragment,e),m(C.$$.fragment,e),m(b.$$.fragment,e),m(k.$$.fragment,e),m(B.$$.fragment,e),m(v.$$.fragment,e),m(V.$$.fragment,e),m(F.$$.fragment,e),m(D.$$.fragment,e),m(x.$$.fragment,e),m(Z.$$.fragment,e),m(H.$$.fragment,e),m(L.$$.fragment,e),m(W.$$.fragment,e),m(P.$$.fragment,e),m(ee.$$.fragment,e),m(le.$$.fragment,e),m(ae.$$.fragment,e),m(te.$$.fragment,e),m(ie.$$.fragment,e),m(oe.$$.fragment,e),m(re.$$.fragment,e),m(me.$$.fragment,e),m(ye.$$.fragment,e),m(de.$$.fragment,e),js=!0)},o(e){U(w.$$.fragment,e),U(h.$$.fragment,e),U(C.$$.fragment,e),U(b.$$.fragment,e),U(k.$$.fragment,e),U(B.$$.fragment,e),U(v.$$.fragment,e),U(V.$$.fragment,e),U(F.$$.fragment,e),U(D.$$.fragment,e),U(x.$$.fragment,e),U(Z.$$.fragment,e),U(H.$$.fragment,e),U(L.$$.fragment,e),U(W.$$.fragment,e),U(P.$$.fragment,e),U(ee.$$.fragment,e),U(le.$$.fragment,e),U(ae.$$.fragment,e),U(te.$$.fragment,e),U(ie.$$.fragment,e),U(oe.$$.fragment,e),U(re.$$.fragment,e),U(me.$$.fragment,e),U(ye.$$.fragment,e),U(de.$$.fragment,e),js=!1},d(e){e&&(l(fe),l(we),l(ue),l(je),l(ge),l(f),l(Ce),l(u),l(Ie),l(j),l(be),l(g),l($e),l(ke),l(I),l(Qe),l(Be),l($),l(Ae),l(ve),l(Q),l(Oe),l(Ve),l(A),l(Ne),l(Fe),l(O),l(Ge),l(De),l(N),l(Re),l(xe),l(G),l(_e),l(Ze),l(R),l(qe),l(He),l(_),l(Ee),l(Le),l(q),l(Se),l(Ye),l(E),l(We),l(Xe),l(S),l(Pe),l(Y),l(ze),l(Ke),l(X),l(es),l(ss),l(z),l(ls),l(K),l(as),l(ts),l(se),l(ns),l(is),l(ps),l(os),l(ne),l(Ts),l(rs),l(pe),l(Ms),l(ms),l(Te),l(Us),l(cs),l(Me),l(ys),l(Js),l(Ue),l(ds),l(ce),l(ws),l(hs),l(Je),l(fs),l(us),l(he)),l(J),c(w,e),c(h,e),c(C,e),c(b,e),c(k,e),c(B,e),c(v,e),c(V,e),c(F,e),c(D,e),c(x,e),c(Z,e),c(H,e),c(L,e),c(W,e),c(P,e),c(ee,e),c(le,e),c(ae,e),c(te,e),c(ie,e),c(oe,e),c(re,e),c(me,e),c(ye,e),c(de,e)}}}const rl='{"title":"Image Dataset","local":"image-dataset","sections":[{"title":"Only images","local":"only-images","sections":[],"depth":2},{"title":"Additional columns","local":"additional-columns","sections":[],"depth":2},{"title":"Relative paths","local":"relative-paths","sections":[],"depth":2},{"title":"Image classification","local":"image-classification","sections":[],"depth":2},{"title":"Large scale datasets","local":"large-scale-datasets","sections":[{"title":"WebDataset format","local":"webdataset-format","sections":[],"depth":3},{"title":"Parquet format","local":"parquet-format","sections":[],"depth":3}],"depth":2}],"depth":1}';function Ml(gs){return ll(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class dl extends al{constructor(J){super(),tl(this,J,Ml,Tl,el,{})}}export{dl as component};
