import{s as El,n as ql,o as Hl}from"../chunks/scheduler.d6170356.js";import{S as Sl,i as Yl,g as i,s as t,r as T,A as Ll,h as p,f as e,c as n,j as xl,u as M,x as U,k as _l,y as Wl,a,v as r,d as m,t as o,w as J}from"../chunks/index.fcd4cc08.js";import{C as c}from"../chunks/CodeBlock.7b16bdef.js";import{H as w,E as Xl}from"../chunks/EditOnGithub.da2b595c.js";function zl(cl){let y,ys,Js,ws,d,ds,j,yl='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>.',js,h,wl='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.',hs,u,dl="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>).",us,f,jl='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.',fs,g,gs,C,hl="If your dataset only consists of one column with images, you can simply store your image files at the root:",Cs,I,Is,b,ul="or in a subdirectory:",bs,$,$s,k,fl='Multiple <a href="./datasets-adding#file-formats">formats</a> are supported at the same time, including PNG, JPEG, TIFF and WebP.',ks,Q,Qs,B,gl="If you have several splits, you can put your images into directories named accordingly:",Bs,A,As,O,Cl='See <a href="./datasets-file-names-and-splits">File names and splits</a> for more information and other ways to organize data by splits.',Os,V,Vs,v,Il="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 text captioning or object detection.",vs,N,Ns,F,bl="Your <code>metadata.csv</code> file must have a <code>file_name</code> column which links image files with their metadata:",Fs,G,Gs,D,$l='You can also use a <a href="https://jsonlines.org/" rel="nofollow">JSONL</a> file <code>metadata.jsonl</code>:',Ds,R,Rs,Z,Zs,x,kl="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:",xs,_,_s,E,Ql="In this case, the <code>file_name</code> column must be a full relative path to the images, not just the filename:",Es,q,qs,H,Bl="Metadata file cannot be put in subdirectories of a directory with the images.",Hs,S,Ss,Y,Al="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:",Ys,L,Ls,W,Ol="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>).",Ws,X,Vl='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):',Xs,z,zs,P,vl='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:',Ps,K,Ks,ss,sl,ls,ll,es,Nl=`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.`,el,as,al,ts,Fl=`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:`,tl,ns,nl,is,Gl=`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.`,il,ps,pl,Ts,Dl=`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.`,Tl,Ms,Ml,Us,Rl=`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.
You should specify the feature types of the columns directly in YAML in the README header, for example:`,Ul,rs,rl,ms,Zl='Alternatively, Parquet files with Image data can be created using the <code>datasets</code> library by setting the column type to <code>Image()</code> and using the <code>.to_parquet(...)</code> method or <code>.push_to_hub(...)</code>. You can find a guide on loading image datasets in <code>datasets</code> <a href="https://huggingface.co/docs/datasets/image_load" rel="nofollow">here</a>.',ml,os,ol,cs,Jl;return d=new w({props:{title:"Image Dataset",local:"image-dataset",headingTag:"h1"}}),g=new w({props:{title:"Only images",local:"only-images",headingTag:"h2"}}),I=new c({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}}),$=new c({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}}),Q=new c({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}}),A=new c({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 w({props:{title:"Additional columns",local:"additional-columns",headingTag:"h2"}}),N=new c({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}}),G=new c({props:{code:"ZmlsZV9uYW1lJTJDdGV4dCUwQTEuanBnJTJDYSUyMGRyYXdpbmclMjBvZiUyMGElMjBncmVlbiUyMHBva2Vtb24lMjB3aXRoJTIwcmVkJTIwZXllcyUwQTIuanBnJTJDYSUyMGdyZWVuJTIwYW5kJTIweWVsbG93JTIwdG95JTIwd2l0aCUyMGElMjByZWQlMjBub3NlJTBBMy5qcGclMkNhJTIwcmVkJTIwYW5kJTIwd2hpdGUlMjBiYWxsJTIwd2l0aCUyMGFuJTIwYW5ncnklMjBsb29rJTIwb24lMjBpdHMlMjBmYWNlJTBBNC5qcGclMkNhJTIwY2FydG9vbiUyMGJhbGwlMjB3aXRoJTIwYSUyMHNtaWxlJTIwb24lMjBpdCdzJTIwZmFjZQ==",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">it</span><span class="hljs-string">&#x27;s face</span>`,wrap:!1}}),R=new c({props:{code:"JTdCJTIyZmlsZV9uYW1lJTIyJTNBJTIwJTIyMS5qcGclMjIlMkMlMjJ0ZXh0JTIyJTNBJTIwJTIyYSUyMGRyYXdpbmclMjBvZiUyMGElMjBncmVlbiUyMHBva2Vtb24lMjB3aXRoJTIwcmVkJTIwZXllcyUyMiU3RCUwQSU3QiUyMmZpbGVfbmFtZSUyMiUzQSUyMCUyMjIuanBnJTIyJTJDJTIydGV4dCUyMiUzQSUyMCUyMmElMjBncmVlbiUyMGFuZCUyMHllbGxvdyUyMHRveSUyMHdpdGglMjBhJTIwcmVkJTIwbm9zZSUyMiU3RCUwQSU3QiUyMmZpbGVfbmFtZSUyMiUzQSUyMCUyMjMuanBnJTIyJTJDJTIydGV4dCUyMiUzQSUyMCUyMmElMjByZWQlMjBhbmQlMjB3aGl0ZSUyMGJhbGwlMjB3aXRoJTIwYW4lMjBhbmdyeSUyMGxvb2slMjBvbiUyMGl0cyUyMGZhY2UlMjIlN0QlMEElN0IlMjJmaWxlX25hbWUlMjIlM0ElMjAlMjI0LmpwZyUyMiUyQyUyMnRleHQlMjIlM0ElMjAlMjJhJTIwY2FydG9vbiUyMGJhbGwlMjB3aXRoJTIwYSUyMHNtaWxlJTIwb24lMjBpdCdzJTIwZmFjZSUyMiU3RA==",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 it&#x27;s face&quot;</span>}`,wrap:!1}}),Z=new w({props:{title:"Relative paths",local:"relative-paths",headingTag:"h2"}}),_=new c({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}}),q=new c({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}}),S=new w({props:{title:"Image classification",local:"image-classification",headingTag:"h2"}}),L=new c({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}}),z=new c({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}}),K=new c({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}}),ss=new w({props:{title:"Large scale datasets",local:"large-scale-datasets",headingTag:"h2"}}),ls=new w({props:{title:"WebDataset format",local:"webdataset-format",headingTag:"h3"}}),as=new c({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}}),ns=new c({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}}),ps=new w({props:{title:"Parquet format",local:"parquet-format",headingTag:"h3"}}),Ms=new c({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwdHJhaW4ucGFycXVldA==",highlighted:`my_dataset_repository/
└── train.parquet`,wrap:!1}}),rs=new c({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}}),os=new Xl({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/datasets-image.md"}}),{c(){y=i("meta"),ys=t(),Js=i("p"),ws=t(),T(d.$$.fragment),ds=t(),j=i("p"),j.innerHTML=yl,js=t(),h=i("p"),h.innerHTML=wl,hs=t(),u=i("p"),u.innerHTML=dl,us=t(),f=i("p"),f.innerHTML=jl,fs=t(),T(g.$$.fragment),gs=t(),C=i("p"),C.textContent=hl,Cs=t(),T(I.$$.fragment),Is=t(),b=i("p"),b.textContent=ul,bs=t(),T($.$$.fragment),$s=t(),k=i("p"),k.innerHTML=fl,ks=t(),T(Q.$$.fragment),Qs=t(),B=i("p"),B.textContent=gl,Bs=t(),T(A.$$.fragment),As=t(),O=i("p"),O.innerHTML=Cl,Os=t(),T(V.$$.fragment),Vs=t(),v=i("p"),v.innerHTML=Il,vs=t(),T(N.$$.fragment),Ns=t(),F=i("p"),F.innerHTML=bl,Fs=t(),T(G.$$.fragment),Gs=t(),D=i("p"),D.innerHTML=$l,Ds=t(),T(R.$$.fragment),Rs=t(),T(Z.$$.fragment),Zs=t(),x=i("p"),x.textContent=kl,xs=t(),T(_.$$.fragment),_s=t(),E=i("p"),E.innerHTML=Ql,Es=t(),T(q.$$.fragment),qs=t(),H=i("p"),H.textContent=Bl,Hs=t(),T(S.$$.fragment),Ss=t(),Y=i("p"),Y.textContent=Al,Ys=t(),T(L.$$.fragment),Ls=t(),W=i("p"),W.innerHTML=Ol,Ws=t(),X=i("p"),X.innerHTML=Vl,Xs=t(),T(z.$$.fragment),zs=t(),P=i("p"),P.innerHTML=vl,Ps=t(),T(K.$$.fragment),Ks=t(),T(ss.$$.fragment),sl=t(),T(ls.$$.fragment),ll=t(),es=i("p"),es.innerHTML=Nl,el=t(),T(as.$$.fragment),al=t(),ts=i("p"),ts.innerHTML=Fl,tl=t(),T(ns.$$.fragment),nl=t(),is=i("p"),is.innerHTML=Gl,il=t(),T(ps.$$.fragment),pl=t(),Ts=i("p"),Ts.innerHTML=Dl,Tl=t(),T(Ms.$$.fragment),Ml=t(),Us=i("p"),Us.innerHTML=Rl,Ul=t(),T(rs.$$.fragment),rl=t(),ms=i("p"),ms.innerHTML=Zl,ml=t(),T(os.$$.fragment),ol=t(),cs=i("p"),this.h()},l(s){const l=Ll("svelte-u9bgzb",document.head);y=p(l,"META",{name:!0,content:!0}),l.forEach(e),ys=n(s),Js=p(s,"P",{}),xl(Js).forEach(e),ws=n(s),M(d.$$.fragment,s),ds=n(s),j=p(s,"P",{"data-svelte-h":!0}),U(j)!=="svelte-v7rbuf"&&(j.innerHTML=yl),js=n(s),h=p(s,"P",{"data-svelte-h":!0}),U(h)!=="svelte-u1gdfq"&&(h.innerHTML=wl),hs=n(s),u=p(s,"P",{"data-svelte-h":!0}),U(u)!=="svelte-rrdb68"&&(u.innerHTML=dl),us=n(s),f=p(s,"P",{"data-svelte-h":!0}),U(f)!=="svelte-8l0ovg"&&(f.innerHTML=jl),fs=n(s),M(g.$$.fragment,s),gs=n(s),C=p(s,"P",{"data-svelte-h":!0}),U(C)!=="svelte-37nscg"&&(C.textContent=hl),Cs=n(s),M(I.$$.fragment,s),Is=n(s),b=p(s,"P",{"data-svelte-h":!0}),U(b)!=="svelte-19pjkki"&&(b.textContent=ul),bs=n(s),M($.$$.fragment,s),$s=n(s),k=p(s,"P",{"data-svelte-h":!0}),U(k)!=="svelte-e5vckm"&&(k.innerHTML=fl),ks=n(s),M(Q.$$.fragment,s),Qs=n(s),B=p(s,"P",{"data-svelte-h":!0}),U(B)!=="svelte-l8z8xp"&&(B.textContent=gl),Bs=n(s),M(A.$$.fragment,s),As=n(s),O=p(s,"P",{"data-svelte-h":!0}),U(O)!=="svelte-kefeul"&&(O.innerHTML=Cl),Os=n(s),M(V.$$.fragment,s),Vs=n(s),v=p(s,"P",{"data-svelte-h":!0}),U(v)!=="svelte-1ncvl1g"&&(v.innerHTML=Il),vs=n(s),M(N.$$.fragment,s),Ns=n(s),F=p(s,"P",{"data-svelte-h":!0}),U(F)!=="svelte-16f2gib"&&(F.innerHTML=bl),Fs=n(s),M(G.$$.fragment,s),Gs=n(s),D=p(s,"P",{"data-svelte-h":!0}),U(D)!=="svelte-1md2l6g"&&(D.innerHTML=$l),Ds=n(s),M(R.$$.fragment,s),Rs=n(s),M(Z.$$.fragment,s),Zs=n(s),x=p(s,"P",{"data-svelte-h":!0}),U(x)!=="svelte-1gwaj92"&&(x.textContent=kl),xs=n(s),M(_.$$.fragment,s),_s=n(s),E=p(s,"P",{"data-svelte-h":!0}),U(E)!=="svelte-1wjvumb"&&(E.innerHTML=Ql),Es=n(s),M(q.$$.fragment,s),qs=n(s),H=p(s,"P",{"data-svelte-h":!0}),U(H)!=="svelte-10b2eaw"&&(H.textContent=Bl),Hs=n(s),M(S.$$.fragment,s),Ss=n(s),Y=p(s,"P",{"data-svelte-h":!0}),U(Y)!=="svelte-z798u1"&&(Y.textContent=Al),Ys=n(s),M(L.$$.fragment,s),Ls=n(s),W=p(s,"P",{"data-svelte-h":!0}),U(W)!=="svelte-1j7sm10"&&(W.innerHTML=Ol),Ws=n(s),X=p(s,"P",{"data-svelte-h":!0}),U(X)!=="svelte-jxxgnh"&&(X.innerHTML=Vl),Xs=n(s),M(z.$$.fragment,s),zs=n(s),P=p(s,"P",{"data-svelte-h":!0}),U(P)!=="svelte-op9ivs"&&(P.innerHTML=vl),Ps=n(s),M(K.$$.fragment,s),Ks=n(s),M(ss.$$.fragment,s),sl=n(s),M(ls.$$.fragment,s),ll=n(s),es=p(s,"P",{"data-svelte-h":!0}),U(es)!=="svelte-1xyr3zu"&&(es.innerHTML=Nl),el=n(s),M(as.$$.fragment,s),al=n(s),ts=p(s,"P",{"data-svelte-h":!0}),U(ts)!=="svelte-1gf9xhb"&&(ts.innerHTML=Fl),tl=n(s),M(ns.$$.fragment,s),nl=n(s),is=p(s,"P",{"data-svelte-h":!0}),U(is)!=="svelte-1uixi8y"&&(is.innerHTML=Gl),il=n(s),M(ps.$$.fragment,s),pl=n(s),Ts=p(s,"P",{"data-svelte-h":!0}),U(Ts)!=="svelte-k79ne"&&(Ts.innerHTML=Dl),Tl=n(s),M(Ms.$$.fragment,s),Ml=n(s),Us=p(s,"P",{"data-svelte-h":!0}),U(Us)!=="svelte-w9nyrz"&&(Us.innerHTML=Rl),Ul=n(s),M(rs.$$.fragment,s),rl=n(s),ms=p(s,"P",{"data-svelte-h":!0}),U(ms)!=="svelte-1ubddch"&&(ms.innerHTML=Zl),ml=n(s),M(os.$$.fragment,s),ol=n(s),cs=p(s,"P",{}),xl(cs).forEach(e),this.h()},h(){_l(y,"name","hf:doc:metadata"),_l(y,"content",Pl)},m(s,l){Wl(document.head,y),a(s,ys,l),a(s,Js,l),a(s,ws,l),r(d,s,l),a(s,ds,l),a(s,j,l),a(s,js,l),a(s,h,l),a(s,hs,l),a(s,u,l),a(s,us,l),a(s,f,l),a(s,fs,l),r(g,s,l),a(s,gs,l),a(s,C,l),a(s,Cs,l),r(I,s,l),a(s,Is,l),a(s,b,l),a(s,bs,l),r($,s,l),a(s,$s,l),a(s,k,l),a(s,ks,l),r(Q,s,l),a(s,Qs,l),a(s,B,l),a(s,Bs,l),r(A,s,l),a(s,As,l),a(s,O,l),a(s,Os,l),r(V,s,l),a(s,Vs,l),a(s,v,l),a(s,vs,l),r(N,s,l),a(s,Ns,l),a(s,F,l),a(s,Fs,l),r(G,s,l),a(s,Gs,l),a(s,D,l),a(s,Ds,l),r(R,s,l),a(s,Rs,l),r(Z,s,l),a(s,Zs,l),a(s,x,l),a(s,xs,l),r(_,s,l),a(s,_s,l),a(s,E,l),a(s,Es,l),r(q,s,l),a(s,qs,l),a(s,H,l),a(s,Hs,l),r(S,s,l),a(s,Ss,l),a(s,Y,l),a(s,Ys,l),r(L,s,l),a(s,Ls,l),a(s,W,l),a(s,Ws,l),a(s,X,l),a(s,Xs,l),r(z,s,l),a(s,zs,l),a(s,P,l),a(s,Ps,l),r(K,s,l),a(s,Ks,l),r(ss,s,l),a(s,sl,l),r(ls,s,l),a(s,ll,l),a(s,es,l),a(s,el,l),r(as,s,l),a(s,al,l),a(s,ts,l),a(s,tl,l),r(ns,s,l),a(s,nl,l),a(s,is,l),a(s,il,l),r(ps,s,l),a(s,pl,l),a(s,Ts,l),a(s,Tl,l),r(Ms,s,l),a(s,Ml,l),a(s,Us,l),a(s,Ul,l),r(rs,s,l),a(s,rl,l),a(s,ms,l),a(s,ml,l),r(os,s,l),a(s,ol,l),a(s,cs,l),Jl=!0},p:ql,i(s){Jl||(m(d.$$.fragment,s),m(g.$$.fragment,s),m(I.$$.fragment,s),m($.$$.fragment,s),m(Q.$$.fragment,s),m(A.$$.fragment,s),m(V.$$.fragment,s),m(N.$$.fragment,s),m(G.$$.fragment,s),m(R.$$.fragment,s),m(Z.$$.fragment,s),m(_.$$.fragment,s),m(q.$$.fragment,s),m(S.$$.fragment,s),m(L.$$.fragment,s),m(z.$$.fragment,s),m(K.$$.fragment,s),m(ss.$$.fragment,s),m(ls.$$.fragment,s),m(as.$$.fragment,s),m(ns.$$.fragment,s),m(ps.$$.fragment,s),m(Ms.$$.fragment,s),m(rs.$$.fragment,s),m(os.$$.fragment,s),Jl=!0)},o(s){o(d.$$.fragment,s),o(g.$$.fragment,s),o(I.$$.fragment,s),o($.$$.fragment,s),o(Q.$$.fragment,s),o(A.$$.fragment,s),o(V.$$.fragment,s),o(N.$$.fragment,s),o(G.$$.fragment,s),o(R.$$.fragment,s),o(Z.$$.fragment,s),o(_.$$.fragment,s),o(q.$$.fragment,s),o(S.$$.fragment,s),o(L.$$.fragment,s),o(z.$$.fragment,s),o(K.$$.fragment,s),o(ss.$$.fragment,s),o(ls.$$.fragment,s),o(as.$$.fragment,s),o(ns.$$.fragment,s),o(ps.$$.fragment,s),o(Ms.$$.fragment,s),o(rs.$$.fragment,s),o(os.$$.fragment,s),Jl=!1},d(s){s&&(e(ys),e(Js),e(ws),e(ds),e(j),e(js),e(h),e(hs),e(u),e(us),e(f),e(fs),e(gs),e(C),e(Cs),e(Is),e(b),e(bs),e($s),e(k),e(ks),e(Qs),e(B),e(Bs),e(As),e(O),e(Os),e(Vs),e(v),e(vs),e(Ns),e(F),e(Fs),e(Gs),e(D),e(Ds),e(Rs),e(Zs),e(x),e(xs),e(_s),e(E),e(Es),e(qs),e(H),e(Hs),e(Ss),e(Y),e(Ys),e(Ls),e(W),e(Ws),e(X),e(Xs),e(zs),e(P),e(Ps),e(Ks),e(sl),e(ll),e(es),e(el),e(al),e(ts),e(tl),e(nl),e(is),e(il),e(pl),e(Ts),e(Tl),e(Ml),e(Us),e(Ul),e(rl),e(ms),e(ml),e(ol),e(cs)),e(y),J(d,s),J(g,s),J(I,s),J($,s),J(Q,s),J(A,s),J(V,s),J(N,s),J(G,s),J(R,s),J(Z,s),J(_,s),J(q,s),J(S,s),J(L,s),J(z,s),J(K,s),J(ss,s),J(ls,s),J(as,s),J(ns,s),J(ps,s),J(Ms,s),J(rs,s),J(os,s)}}}const Pl='{"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 Kl(cl){return Hl(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class te extends Sl{constructor(y){super(),Yl(this,y,Kl,zl,El,{})}}export{te as component};
