import{s as Ee,n as qe,o as He}from"../chunks/scheduler.d6170356.js";import{S as Se,i as Ye,g as i,s as t,r as T,A as Le,h as p,f as l,c as n,j as xe,u as M,x as U,k as _e,y as We,a,v as r,d as m,t as o,w as c}from"../chunks/index.fcd4cc08.js";import{C as J}from"../chunks/CodeBlock.7b16bdef.js";import{H as w,E as Xe}from"../chunks/EditOnGithub.da2b595c.js";function ze(Je){let y,ys,cs,ws,d,ds,j,ye='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,we='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,de="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,je='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,he="If your dataset only consists of one column with images, you can simply store your image files at the root:",Cs,I,Is,b,ue="or in a subdirectory:",bs,$,$s,k,fe='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,ge="If you have several splits, you can put your images into directories named accordingly:",Bs,A,As,O,Ce='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,Ie='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>.',vs,N,Ns,F,be="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,$e='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,ke="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,Qe="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,Be="Metadata file cannot be put in subdirectories of a directory with the images.",Hs,S,Ss,Y,Ae="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,Oe="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,Ve='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,ve='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,se,es,ee,ls,Ne=`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.`,le,as,ae,ts,Fe=`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:`,te,ns,ne,is,Ge=`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.`,ie,ps,pe,Ts,De=`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.`,Te,Ms,Me,Us,Re=`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:`,Ue,rs,re,ms,Ze='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="../datasets/image_load">here</a>.',me,os,oe,Js,ce;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 J({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 J({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 J({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 J({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 J({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 J({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 J({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 J({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 J({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 J({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 J({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 J({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"}}),es=new w({props:{title:"WebDataset format",local:"webdataset-format",headingTag:"h3"}}),as=new J({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 J({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 J({props:{code:"bXlfZGF0YXNldF9yZXBvc2l0b3J5JTJGJTBBJUUyJTk0JTk0JUUyJTk0JTgwJUUyJTk0JTgwJTIwdHJhaW4ucGFycXVldA==",highlighted:`my_dataset_repository/
└── train.parquet`,wrap:!1}}),rs=new J({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 Xe({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/datasets-image.md"}}),{c(){y=i("meta"),ys=t(),cs=i("p"),ws=t(),T(d.$$.fragment),ds=t(),j=i("p"),j.innerHTML=ye,js=t(),h=i("p"),h.innerHTML=we,hs=t(),u=i("p"),u.innerHTML=de,us=t(),f=i("p"),f.innerHTML=je,fs=t(),T(g.$$.fragment),gs=t(),C=i("p"),C.textContent=he,Cs=t(),T(I.$$.fragment),Is=t(),b=i("p"),b.textContent=ue,bs=t(),T($.$$.fragment),$s=t(),k=i("p"),k.innerHTML=fe,ks=t(),T(Q.$$.fragment),Qs=t(),B=i("p"),B.textContent=ge,Bs=t(),T(A.$$.fragment),As=t(),O=i("p"),O.innerHTML=Ce,Os=t(),T(V.$$.fragment),Vs=t(),v=i("p"),v.innerHTML=Ie,vs=t(),T(N.$$.fragment),Ns=t(),F=i("p"),F.innerHTML=be,Fs=t(),T(G.$$.fragment),Gs=t(),D=i("p"),D.innerHTML=$e,Ds=t(),T(R.$$.fragment),Rs=t(),T(Z.$$.fragment),Zs=t(),x=i("p"),x.textContent=ke,xs=t(),T(_.$$.fragment),_s=t(),E=i("p"),E.innerHTML=Qe,Es=t(),T(q.$$.fragment),qs=t(),H=i("p"),H.textContent=Be,Hs=t(),T(S.$$.fragment),Ss=t(),Y=i("p"),Y.textContent=Ae,Ys=t(),T(L.$$.fragment),Ls=t(),W=i("p"),W.innerHTML=Oe,Ws=t(),X=i("p"),X.innerHTML=Ve,Xs=t(),T(z.$$.fragment),zs=t(),P=i("p"),P.innerHTML=ve,Ps=t(),T(K.$$.fragment),Ks=t(),T(ss.$$.fragment),se=t(),T(es.$$.fragment),ee=t(),ls=i("p"),ls.innerHTML=Ne,le=t(),T(as.$$.fragment),ae=t(),ts=i("p"),ts.innerHTML=Fe,te=t(),T(ns.$$.fragment),ne=t(),is=i("p"),is.innerHTML=Ge,ie=t(),T(ps.$$.fragment),pe=t(),Ts=i("p"),Ts.innerHTML=De,Te=t(),T(Ms.$$.fragment),Me=t(),Us=i("p"),Us.innerHTML=Re,Ue=t(),T(rs.$$.fragment),re=t(),ms=i("p"),ms.innerHTML=Ze,me=t(),T(os.$$.fragment),oe=t(),Js=i("p"),this.h()},l(s){const e=Le("svelte-u9bgzb",document.head);y=p(e,"META",{name:!0,content:!0}),e.forEach(l),ys=n(s),cs=p(s,"P",{}),xe(cs).forEach(l),ws=n(s),M(d.$$.fragment,s),ds=n(s),j=p(s,"P",{"data-svelte-h":!0}),U(j)!=="svelte-v7rbuf"&&(j.innerHTML=ye),js=n(s),h=p(s,"P",{"data-svelte-h":!0}),U(h)!=="svelte-u1gdfq"&&(h.innerHTML=we),hs=n(s),u=p(s,"P",{"data-svelte-h":!0}),U(u)!=="svelte-rrdb68"&&(u.innerHTML=de),us=n(s),f=p(s,"P",{"data-svelte-h":!0}),U(f)!=="svelte-8l0ovg"&&(f.innerHTML=je),fs=n(s),M(g.$$.fragment,s),gs=n(s),C=p(s,"P",{"data-svelte-h":!0}),U(C)!=="svelte-37nscg"&&(C.textContent=he),Cs=n(s),M(I.$$.fragment,s),Is=n(s),b=p(s,"P",{"data-svelte-h":!0}),U(b)!=="svelte-19pjkki"&&(b.textContent=ue),bs=n(s),M($.$$.fragment,s),$s=n(s),k=p(s,"P",{"data-svelte-h":!0}),U(k)!=="svelte-e5vckm"&&(k.innerHTML=fe),ks=n(s),M(Q.$$.fragment,s),Qs=n(s),B=p(s,"P",{"data-svelte-h":!0}),U(B)!=="svelte-l8z8xp"&&(B.textContent=ge),Bs=n(s),M(A.$$.fragment,s),As=n(s),O=p(s,"P",{"data-svelte-h":!0}),U(O)!=="svelte-kefeul"&&(O.innerHTML=Ce),Os=n(s),M(V.$$.fragment,s),Vs=n(s),v=p(s,"P",{"data-svelte-h":!0}),U(v)!=="svelte-1ehvjow"&&(v.innerHTML=Ie),vs=n(s),M(N.$$.fragment,s),Ns=n(s),F=p(s,"P",{"data-svelte-h":!0}),U(F)!=="svelte-16f2gib"&&(F.innerHTML=be),Fs=n(s),M(G.$$.fragment,s),Gs=n(s),D=p(s,"P",{"data-svelte-h":!0}),U(D)!=="svelte-1md2l6g"&&(D.innerHTML=$e),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=ke),xs=n(s),M(_.$$.fragment,s),_s=n(s),E=p(s,"P",{"data-svelte-h":!0}),U(E)!=="svelte-1wjvumb"&&(E.innerHTML=Qe),Es=n(s),M(q.$$.fragment,s),qs=n(s),H=p(s,"P",{"data-svelte-h":!0}),U(H)!=="svelte-10b2eaw"&&(H.textContent=Be),Hs=n(s),M(S.$$.fragment,s),Ss=n(s),Y=p(s,"P",{"data-svelte-h":!0}),U(Y)!=="svelte-z798u1"&&(Y.textContent=Ae),Ys=n(s),M(L.$$.fragment,s),Ls=n(s),W=p(s,"P",{"data-svelte-h":!0}),U(W)!=="svelte-1j7sm10"&&(W.innerHTML=Oe),Ws=n(s),X=p(s,"P",{"data-svelte-h":!0}),U(X)!=="svelte-jxxgnh"&&(X.innerHTML=Ve),Xs=n(s),M(z.$$.fragment,s),zs=n(s),P=p(s,"P",{"data-svelte-h":!0}),U(P)!=="svelte-op9ivs"&&(P.innerHTML=ve),Ps=n(s),M(K.$$.fragment,s),Ks=n(s),M(ss.$$.fragment,s),se=n(s),M(es.$$.fragment,s),ee=n(s),ls=p(s,"P",{"data-svelte-h":!0}),U(ls)!=="svelte-1xyr3zu"&&(ls.innerHTML=Ne),le=n(s),M(as.$$.fragment,s),ae=n(s),ts=p(s,"P",{"data-svelte-h":!0}),U(ts)!=="svelte-1gf9xhb"&&(ts.innerHTML=Fe),te=n(s),M(ns.$$.fragment,s),ne=n(s),is=p(s,"P",{"data-svelte-h":!0}),U(is)!=="svelte-1uixi8y"&&(is.innerHTML=Ge),ie=n(s),M(ps.$$.fragment,s),pe=n(s),Ts=p(s,"P",{"data-svelte-h":!0}),U(Ts)!=="svelte-k79ne"&&(Ts.innerHTML=De),Te=n(s),M(Ms.$$.fragment,s),Me=n(s),Us=p(s,"P",{"data-svelte-h":!0}),U(Us)!=="svelte-w9nyrz"&&(Us.innerHTML=Re),Ue=n(s),M(rs.$$.fragment,s),re=n(s),ms=p(s,"P",{"data-svelte-h":!0}),U(ms)!=="svelte-1it0raa"&&(ms.innerHTML=Ze),me=n(s),M(os.$$.fragment,s),oe=n(s),Js=p(s,"P",{}),xe(Js).forEach(l),this.h()},h(){_e(y,"name","hf:doc:metadata"),_e(y,"content",Pe)},m(s,e){We(document.head,y),a(s,ys,e),a(s,cs,e),a(s,ws,e),r(d,s,e),a(s,ds,e),a(s,j,e),a(s,js,e),a(s,h,e),a(s,hs,e),a(s,u,e),a(s,us,e),a(s,f,e),a(s,fs,e),r(g,s,e),a(s,gs,e),a(s,C,e),a(s,Cs,e),r(I,s,e),a(s,Is,e),a(s,b,e),a(s,bs,e),r($,s,e),a(s,$s,e),a(s,k,e),a(s,ks,e),r(Q,s,e),a(s,Qs,e),a(s,B,e),a(s,Bs,e),r(A,s,e),a(s,As,e),a(s,O,e),a(s,Os,e),r(V,s,e),a(s,Vs,e),a(s,v,e),a(s,vs,e),r(N,s,e),a(s,Ns,e),a(s,F,e),a(s,Fs,e),r(G,s,e),a(s,Gs,e),a(s,D,e),a(s,Ds,e),r(R,s,e),a(s,Rs,e),r(Z,s,e),a(s,Zs,e),a(s,x,e),a(s,xs,e),r(_,s,e),a(s,_s,e),a(s,E,e),a(s,Es,e),r(q,s,e),a(s,qs,e),a(s,H,e),a(s,Hs,e),r(S,s,e),a(s,Ss,e),a(s,Y,e),a(s,Ys,e),r(L,s,e),a(s,Ls,e),a(s,W,e),a(s,Ws,e),a(s,X,e),a(s,Xs,e),r(z,s,e),a(s,zs,e),a(s,P,e),a(s,Ps,e),r(K,s,e),a(s,Ks,e),r(ss,s,e),a(s,se,e),r(es,s,e),a(s,ee,e),a(s,ls,e),a(s,le,e),r(as,s,e),a(s,ae,e),a(s,ts,e),a(s,te,e),r(ns,s,e),a(s,ne,e),a(s,is,e),a(s,ie,e),r(ps,s,e),a(s,pe,e),a(s,Ts,e),a(s,Te,e),r(Ms,s,e),a(s,Me,e),a(s,Us,e),a(s,Ue,e),r(rs,s,e),a(s,re,e),a(s,ms,e),a(s,me,e),r(os,s,e),a(s,oe,e),a(s,Js,e),ce=!0},p:qe,i(s){ce||(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(es.$$.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),ce=!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(es.$$.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),ce=!1},d(s){s&&(l(ys),l(cs),l(ws),l(ds),l(j),l(js),l(h),l(hs),l(u),l(us),l(f),l(fs),l(gs),l(C),l(Cs),l(Is),l(b),l(bs),l($s),l(k),l(ks),l(Qs),l(B),l(Bs),l(As),l(O),l(Os),l(Vs),l(v),l(vs),l(Ns),l(F),l(Fs),l(Gs),l(D),l(Ds),l(Rs),l(Zs),l(x),l(xs),l(_s),l(E),l(Es),l(qs),l(H),l(Hs),l(Ss),l(Y),l(Ys),l(Ls),l(W),l(Ws),l(X),l(Xs),l(zs),l(P),l(Ps),l(Ks),l(se),l(ee),l(ls),l(le),l(ae),l(ts),l(te),l(ne),l(is),l(ie),l(pe),l(Ts),l(Te),l(Me),l(Us),l(Ue),l(re),l(ms),l(me),l(oe),l(Js)),l(y),c(d,s),c(g,s),c(I,s),c($,s),c(Q,s),c(A,s),c(V,s),c(N,s),c(G,s),c(R,s),c(Z,s),c(_,s),c(q,s),c(S,s),c(L,s),c(z,s),c(K,s),c(ss,s),c(es,s),c(as,s),c(ns,s),c(ps,s),c(Ms,s),c(rs,s),c(os,s)}}}const Pe='{"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 Ke(Je){return He(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class tl extends Se{constructor(y){super(),Ye(this,y,Ke,ze,Ee,{})}}export{tl as component};
