import{s as zs,n as Ks,o as el}from"../chunks/scheduler.d6170356.js";import{S as sl,i as ll,g as i,s as t,r as T,A as al,h as p,f as l,c as n,j as Xs,u as r,x as o,k as Ps,y as tl,a,v as M,d as m,t as c,w as U}from"../chunks/index.fcd4cc08.js";import{C as y}from"../chunks/CodeBlock.db16bf50.js";import{H as d,E as nl}from"../chunks/getInferenceSnippets.0f6acb26.js";function il(fs){let J,we,de,ue,h,fe,w,js='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>.',je,u,gs='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.',ge,f,Cs="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>).",Ce,j,Is='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.',Ie,g,be,C,bs="If your dataset only consists of one column with images, you can simply store your image files at the root:",$e,I,ke,b,$s="or in a subdirectory:",Qe,$,Be,k,ks='Multiple <a href="./datasets-adding#file-formats">formats</a> are supported at the same time, including PNG, JPEG, TIFF and WebP.',Ae,Q,ve,B,Qs="If you have several splits, you can put your images into directories named accordingly:",Oe,A,Ve,v,Bs='See <a href="./datasets-file-names-and-splits">File names and splits</a> for more information and other ways to organize data by splits.',Ne,O,Fe,V,As='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>.',Ge,N,De,F,vs="Your <code>metadata.csv</code> file must have a <code>file_name</code> column which links image files with their metadata:",Re,G,_e,D,Os='You can also use a <a href="https://jsonlines.org/" rel="nofollow">JSONL</a> file <code>metadata.jsonl</code>:',xe,R,Ze,_,Vs='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>.',qe,x,He,Z,Ns="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:",Ee,q,Le,H,Fs="In this case, the <code>file_name</code> column must be a full relative path to the images, not just the filename:",Ye,E,Se,L,Gs="Metadata files cannot be put in subdirectories of a directory with the images.",We,Y,Ds="More generally, any column named <code>file_name</code> or <code>*_file_name</code> should contain the full relative path to the images.",Xe,S,Pe,W,Rs="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:",ze,X,Ke,P,_s="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>).",es,z,xs='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):',ss,K,ls,ee,Zs='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:',as,se,ts,le,ns,ae,is,te,qs=`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.`,ps,ne,os,ie,Hs=`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:`,Ts,pe,rs,oe,Es=`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.`,Ms,Te,ms,re,Ls=`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.`,cs,Me,Us,me,Ys='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>.',ys,ce,Ss="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:",Js,Ue,ds,ye,Ws='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).',hs,Je,ws,he,us;return h=new d({props:{title:"Image Dataset",local:"image-dataset",headingTag:"h1"}}),g=new d({props:{title:"Only images",local:"only-images",headingTag:"h2"}}),I=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}}),$=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}}),Q=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}}),A=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}}),O=new d({props:{title:"Additional columns",local:"additional-columns",headingTag:"h2"}}),N=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}}),G=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}}),R=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}}),x=new d({props:{title:"Relative paths",local:"relative-paths",headingTag:"h2"}}),q=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}}),E=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}}),S=new d({props:{title:"Image classification",local:"image-classification",headingTag:"h2"}}),X=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}}),K=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}}),se=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}}),le=new d({props:{title:"Large scale datasets",local:"large-scale-datasets",headingTag:"h2"}}),ae=new d({props:{title:"WebDataset format",local:"webdataset-format",headingTag:"h3"}}),ne=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}}),pe=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}}),Te=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}}),Ue=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}}),Je=new nl({props:{source:"https://github.com/huggingface/hub-docs/blob/main/docs/hub/datasets-image.md"}}),{c(){J=i("meta"),we=t(),de=i("p"),ue=t(),T(h.$$.fragment),fe=t(),w=i("p"),w.innerHTML=js,je=t(),u=i("p"),u.innerHTML=gs,ge=t(),f=i("p"),f.innerHTML=Cs,Ce=t(),j=i("p"),j.innerHTML=Is,Ie=t(),T(g.$$.fragment),be=t(),C=i("p"),C.textContent=bs,$e=t(),T(I.$$.fragment),ke=t(),b=i("p"),b.textContent=$s,Qe=t(),T($.$$.fragment),Be=t(),k=i("p"),k.innerHTML=ks,Ae=t(),T(Q.$$.fragment),ve=t(),B=i("p"),B.textContent=Qs,Oe=t(),T(A.$$.fragment),Ve=t(),v=i("p"),v.innerHTML=Bs,Ne=t(),T(O.$$.fragment),Fe=t(),V=i("p"),V.innerHTML=As,Ge=t(),T(N.$$.fragment),De=t(),F=i("p"),F.innerHTML=vs,Re=t(),T(G.$$.fragment),_e=t(),D=i("p"),D.innerHTML=Os,xe=t(),T(R.$$.fragment),Ze=t(),_=i("p"),_.innerHTML=Vs,qe=t(),T(x.$$.fragment),He=t(),Z=i("p"),Z.textContent=Ns,Ee=t(),T(q.$$.fragment),Le=t(),H=i("p"),H.innerHTML=Fs,Ye=t(),T(E.$$.fragment),Se=t(),L=i("p"),L.textContent=Gs,We=t(),Y=i("p"),Y.innerHTML=Ds,Xe=t(),T(S.$$.fragment),Pe=t(),W=i("p"),W.textContent=Rs,ze=t(),T(X.$$.fragment),Ke=t(),P=i("p"),P.innerHTML=_s,es=t(),z=i("p"),z.innerHTML=xs,ss=t(),T(K.$$.fragment),ls=t(),ee=i("p"),ee.innerHTML=Zs,as=t(),T(se.$$.fragment),ts=t(),T(le.$$.fragment),ns=t(),T(ae.$$.fragment),is=t(),te=i("p"),te.innerHTML=qs,ps=t(),T(ne.$$.fragment),os=t(),ie=i("p"),ie.innerHTML=Hs,Ts=t(),T(pe.$$.fragment),rs=t(),oe=i("p"),oe.innerHTML=Es,Ms=t(),T(Te.$$.fragment),ms=t(),re=i("p"),re.innerHTML=Ls,cs=t(),T(Me.$$.fragment),Us=t(),me=i("p"),me.innerHTML=Ys,ys=t(),ce=i("p"),ce.innerHTML=Ss,Js=t(),T(Ue.$$.fragment),ds=t(),ye=i("p"),ye.innerHTML=Ws,hs=t(),T(Je.$$.fragment),ws=t(),he=i("p"),this.h()},l(e){const s=al("svelte-u9bgzb",document.head);J=p(s,"META",{name:!0,content:!0}),s.forEach(l),we=n(e),de=p(e,"P",{}),Xs(de).forEach(l),ue=n(e),r(h.$$.fragment,e),fe=n(e),w=p(e,"P",{"data-svelte-h":!0}),o(w)!=="svelte-v7rbuf"&&(w.innerHTML=js),je=n(e),u=p(e,"P",{"data-svelte-h":!0}),o(u)!=="svelte-u1gdfq"&&(u.innerHTML=gs),ge=n(e),f=p(e,"P",{"data-svelte-h":!0}),o(f)!=="svelte-1ymhost"&&(f.innerHTML=Cs),Ce=n(e),j=p(e,"P",{"data-svelte-h":!0}),o(j)!=="svelte-8l0ovg"&&(j.innerHTML=Is),Ie=n(e),r(g.$$.fragment,e),be=n(e),C=p(e,"P",{"data-svelte-h":!0}),o(C)!=="svelte-37nscg"&&(C.textContent=bs),$e=n(e),r(I.$$.fragment,e),ke=n(e),b=p(e,"P",{"data-svelte-h":!0}),o(b)!=="svelte-19pjkki"&&(b.textContent=$s),Qe=n(e),r($.$$.fragment,e),Be=n(e),k=p(e,"P",{"data-svelte-h":!0}),o(k)!=="svelte-e5vckm"&&(k.innerHTML=ks),Ae=n(e),r(Q.$$.fragment,e),ve=n(e),B=p(e,"P",{"data-svelte-h":!0}),o(B)!=="svelte-l8z8xp"&&(B.textContent=Qs),Oe=n(e),r(A.$$.fragment,e),Ve=n(e),v=p(e,"P",{"data-svelte-h":!0}),o(v)!=="svelte-kefeul"&&(v.innerHTML=Bs),Ne=n(e),r(O.$$.fragment,e),Fe=n(e),V=p(e,"P",{"data-svelte-h":!0}),o(V)!=="svelte-1ehvjow"&&(V.innerHTML=As),Ge=n(e),r(N.$$.fragment,e),De=n(e),F=p(e,"P",{"data-svelte-h":!0}),o(F)!=="svelte-16f2gib"&&(F.innerHTML=vs),Re=n(e),r(G.$$.fragment,e),_e=n(e),D=p(e,"P",{"data-svelte-h":!0}),o(D)!=="svelte-1md2l6g"&&(D.innerHTML=Os),xe=n(e),r(R.$$.fragment,e),Ze=n(e),_=p(e,"P",{"data-svelte-h":!0}),o(_)!=="svelte-17vzj19"&&(_.innerHTML=Vs),qe=n(e),r(x.$$.fragment,e),He=n(e),Z=p(e,"P",{"data-svelte-h":!0}),o(Z)!=="svelte-1gwaj92"&&(Z.textContent=Ns),Ee=n(e),r(q.$$.fragment,e),Le=n(e),H=p(e,"P",{"data-svelte-h":!0}),o(H)!=="svelte-1wjvumb"&&(H.innerHTML=Fs),Ye=n(e),r(E.$$.fragment,e),Se=n(e),L=p(e,"P",{"data-svelte-h":!0}),o(L)!=="svelte-1xb8ill"&&(L.textContent=Gs),We=n(e),Y=p(e,"P",{"data-svelte-h":!0}),o(Y)!=="svelte-15baaod"&&(Y.innerHTML=Ds),Xe=n(e),r(S.$$.fragment,e),Pe=n(e),W=p(e,"P",{"data-svelte-h":!0}),o(W)!=="svelte-z798u1"&&(W.textContent=Rs),ze=n(e),r(X.$$.fragment,e),Ke=n(e),P=p(e,"P",{"data-svelte-h":!0}),o(P)!=="svelte-1j7sm10"&&(P.innerHTML=_s),es=n(e),z=p(e,"P",{"data-svelte-h":!0}),o(z)!=="svelte-jxxgnh"&&(z.innerHTML=xs),ss=n(e),r(K.$$.fragment,e),ls=n(e),ee=p(e,"P",{"data-svelte-h":!0}),o(ee)!=="svelte-op9ivs"&&(ee.innerHTML=Zs),as=n(e),r(se.$$.fragment,e),ts=n(e),r(le.$$.fragment,e),ns=n(e),r(ae.$$.fragment,e),is=n(e),te=p(e,"P",{"data-svelte-h":!0}),o(te)!=="svelte-1xyr3zu"&&(te.innerHTML=qs),ps=n(e),r(ne.$$.fragment,e),os=n(e),ie=p(e,"P",{"data-svelte-h":!0}),o(ie)!=="svelte-1gf9xhb"&&(ie.innerHTML=Hs),Ts=n(e),r(pe.$$.fragment,e),rs=n(e),oe=p(e,"P",{"data-svelte-h":!0}),o(oe)!=="svelte-1uixi8y"&&(oe.innerHTML=Es),Ms=n(e),r(Te.$$.fragment,e),ms=n(e),re=p(e,"P",{"data-svelte-h":!0}),o(re)!=="svelte-k79ne"&&(re.innerHTML=Ls),cs=n(e),r(Me.$$.fragment,e),Us=n(e),me=p(e,"P",{"data-svelte-h":!0}),o(me)!=="svelte-y4diuk"&&(me.innerHTML=Ys),ys=n(e),ce=p(e,"P",{"data-svelte-h":!0}),o(ce)!=="svelte-149tbjs"&&(ce.innerHTML=Ss),Js=n(e),r(Ue.$$.fragment,e),ds=n(e),ye=p(e,"P",{"data-svelte-h":!0}),o(ye)!=="svelte-59yffi"&&(ye.innerHTML=Ws),hs=n(e),r(Je.$$.fragment,e),ws=n(e),he=p(e,"P",{}),Xs(he).forEach(l),this.h()},h(){Ps(J,"name","hf:doc:metadata"),Ps(J,"content",pl)},m(e,s){tl(document.head,J),a(e,we,s),a(e,de,s),a(e,ue,s),M(h,e,s),a(e,fe,s),a(e,w,s),a(e,je,s),a(e,u,s),a(e,ge,s),a(e,f,s),a(e,Ce,s),a(e,j,s),a(e,Ie,s),M(g,e,s),a(e,be,s),a(e,C,s),a(e,$e,s),M(I,e,s),a(e,ke,s),a(e,b,s),a(e,Qe,s),M($,e,s),a(e,Be,s),a(e,k,s),a(e,Ae,s),M(Q,e,s),a(e,ve,s),a(e,B,s),a(e,Oe,s),M(A,e,s),a(e,Ve,s),a(e,v,s),a(e,Ne,s),M(O,e,s),a(e,Fe,s),a(e,V,s),a(e,Ge,s),M(N,e,s),a(e,De,s),a(e,F,s),a(e,Re,s),M(G,e,s),a(e,_e,s),a(e,D,s),a(e,xe,s),M(R,e,s),a(e,Ze,s),a(e,_,s),a(e,qe,s),M(x,e,s),a(e,He,s),a(e,Z,s),a(e,Ee,s),M(q,e,s),a(e,Le,s),a(e,H,s),a(e,Ye,s),M(E,e,s),a(e,Se,s),a(e,L,s),a(e,We,s),a(e,Y,s),a(e,Xe,s),M(S,e,s),a(e,Pe,s),a(e,W,s),a(e,ze,s),M(X,e,s),a(e,Ke,s),a(e,P,s),a(e,es,s),a(e,z,s),a(e,ss,s),M(K,e,s),a(e,ls,s),a(e,ee,s),a(e,as,s),M(se,e,s),a(e,ts,s),M(le,e,s),a(e,ns,s),M(ae,e,s),a(e,is,s),a(e,te,s),a(e,ps,s),M(ne,e,s),a(e,os,s),a(e,ie,s),a(e,Ts,s),M(pe,e,s),a(e,rs,s),a(e,oe,s),a(e,Ms,s),M(Te,e,s),a(e,ms,s),a(e,re,s),a(e,cs,s),M(Me,e,s),a(e,Us,s),a(e,me,s),a(e,ys,s),a(e,ce,s),a(e,Js,s),M(Ue,e,s),a(e,ds,s),a(e,ye,s),a(e,hs,s),M(Je,e,s),a(e,ws,s),a(e,he,s),us=!0},p:Ks,i(e){us||(m(h.$$.fragment,e),m(g.$$.fragment,e),m(I.$$.fragment,e),m($.$$.fragment,e),m(Q.$$.fragment,e),m(A.$$.fragment,e),m(O.$$.fragment,e),m(N.$$.fragment,e),m(G.$$.fragment,e),m(R.$$.fragment,e),m(x.$$.fragment,e),m(q.$$.fragment,e),m(E.$$.fragment,e),m(S.$$.fragment,e),m(X.$$.fragment,e),m(K.$$.fragment,e),m(se.$$.fragment,e),m(le.$$.fragment,e),m(ae.$$.fragment,e),m(ne.$$.fragment,e),m(pe.$$.fragment,e),m(Te.$$.fragment,e),m(Me.$$.fragment,e),m(Ue.$$.fragment,e),m(Je.$$.fragment,e),us=!0)},o(e){c(h.$$.fragment,e),c(g.$$.fragment,e),c(I.$$.fragment,e),c($.$$.fragment,e),c(Q.$$.fragment,e),c(A.$$.fragment,e),c(O.$$.fragment,e),c(N.$$.fragment,e),c(G.$$.fragment,e),c(R.$$.fragment,e),c(x.$$.fragment,e),c(q.$$.fragment,e),c(E.$$.fragment,e),c(S.$$.fragment,e),c(X.$$.fragment,e),c(K.$$.fragment,e),c(se.$$.fragment,e),c(le.$$.fragment,e),c(ae.$$.fragment,e),c(ne.$$.fragment,e),c(pe.$$.fragment,e),c(Te.$$.fragment,e),c(Me.$$.fragment,e),c(Ue.$$.fragment,e),c(Je.$$.fragment,e),us=!1},d(e){e&&(l(we),l(de),l(ue),l(fe),l(w),l(je),l(u),l(ge),l(f),l(Ce),l(j),l(Ie),l(be),l(C),l($e),l(ke),l(b),l(Qe),l(Be),l(k),l(Ae),l(ve),l(B),l(Oe),l(Ve),l(v),l(Ne),l(Fe),l(V),l(Ge),l(De),l(F),l(Re),l(_e),l(D),l(xe),l(Ze),l(_),l(qe),l(He),l(Z),l(Ee),l(Le),l(H),l(Ye),l(Se),l(L),l(We),l(Y),l(Xe),l(Pe),l(W),l(ze),l(Ke),l(P),l(es),l(z),l(ss),l(ls),l(ee),l(as),l(ts),l(ns),l(is),l(te),l(ps),l(os),l(ie),l(Ts),l(rs),l(oe),l(Ms),l(ms),l(re),l(cs),l(Us),l(me),l(ys),l(ce),l(Js),l(ds),l(ye),l(hs),l(ws),l(he)),l(J),U(h,e),U(g,e),U(I,e),U($,e),U(Q,e),U(A,e),U(O,e),U(N,e),U(G,e),U(R,e),U(x,e),U(q,e),U(E,e),U(S,e),U(X,e),U(K,e),U(se,e),U(le,e),U(ae,e),U(ne,e),U(pe,e),U(Te,e),U(Me,e),U(Ue,e),U(Je,e)}}}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 ol(fs){return el(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class cl extends sl{constructor(J){super(),ll(this,J,ol,il,zs,{})}}export{cl as component};
