import{s as _n,n as xn,o as kn}from"../chunks/scheduler.1f027d5a.js";import{S as Zn,i as In,e as a,s as n,c as o,h as Hn,a as p,d as l,b as i,f as fs,g as f,j as m,k as ue,q as ps,l as ye,m as s,n as r,t as M,o as u,p as y}from"../chunks/index.6117a65d.js";import{C as Ln}from"../chunks/CopyLLMTxtMenu.610b106b.js";import{D as Fn,C as c}from"../chunks/DocNotebookDropdown.4ae0d470.js";import{H as b,E as Gn}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.bd18ae98.js";function zn(rs){let h,ce,re,ge,C,he,T,be,U,de,$,Ms='<em>作者: <a href="https://huggingface.co/jamarks" rel="nofollow">Jacob Marks</a></em>',ve,w,us='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_cover_image.jpg" alt="Art Analysis Cover Image"/>',je,J,ys="<strong>视觉数据如图像非常富含信息，但其非结构化的性质使得分析变得困难。</strong>",Ce,_,cs='在这个 Notebook 中，我们将探索如何使用多模态嵌入和计算属性来分析图像中的艺术风格。我们将使用来自 🤗 Hub 的 <a href="https://huggingface.co/datasets/huggan/wikiart" rel="nofollow">WikiArt 数据集</a>，并将其加载到 <strong>FiftyOne</strong> 中进行数据分析和可视化。我们将以多种方式深入分析数据：',Te,x,gs='<li><p><strong>图像相似性搜索与语义搜索</strong>：我们将使用预训练的 <a href="https://huggingface.co/openai/clip-vit-base-patch32" rel="nofollow">CLIP</a> 模型，从 🤗 Transformers 生成数据集中的图像的多模态嵌入，并索引数据以进行无结构搜索。</p></li> <li><p><strong>聚类与可视化</strong>：我们将基于艺术风格使用嵌入对图像进行聚类，并使用 UMAP 降维算法可视化结果。</p></li> <li><p><strong>独特性分析</strong>：我们将使用嵌入为每张图像分配一个独特性评分，依据它与数据集中其他图像的相似度。</p></li> <li><p><strong>图像质量分析</strong>：我们将计算每张图像的亮度、对比度和饱和度等质量指标，并查看这些指标与图像的艺术风格如何相关。</p></li>',Ue,k,$e,Z,hs="为了运行这个 Notebook ，你需要安装下面的库：",we,I,Je,H,bs='为了下载的更加轻量快捷，安装 <a href="https://pypi.org/project/hf-transfer/" rel="nofollow">HF Transfer</a>:',_e,L,xe,F,ds="并且通过设置环境变量 <code>HF_HUB_ENABLE_HF_TRANSFER</code> 来启用它：",ke,G,Ze,d,vs="<b>注意：</b> 本 Notebook 在以下版本下进行了测试：<code>transformers==4.40.0</code>，<code>huggingface_hub==0.22.2</code>，和 <code>fiftyone==0.23.8</code>。",Ie,z,js="现在我们来导入本 Notebook 中需要的模块：",He,W,Le,X,Cs='我们首先通过 🤗 Hub 将 WikiArt 数据集加载到 <strong>FiftyOne</strong> 中。这个数据集也可以通过 Hugging Face 的 <code>datasets</code> 库加载，但我们将使用 <a href="https://docs.voxel51.com/integrations/huggingface.html#huggingface-hub" rel="nofollow">FiftyOne 的 🤗 Hub 集成</a> 直接从 Datasets 服务器获取数据。为了加速计算，我们只下载前 1,000 个样本。',Fe,R,Ge,V,Ts="打印数据集的摘要，以查看其包含的内容：",ze,N,We,B,Us=`Name:        wikiart
Media type:  image
Num samples: 1000
Persistent:  False
Tags:        []
Sample fields:
    id:       fiftyone.core.fields.ObjectIdField
    filepath: fiftyone.core.fields.StringField
    tags:     fiftyone.core.fields.ListField(fiftyone.core.fields.StringField)
    metadata: fiftyone.core.fields.EmbeddedDocumentField(fiftyone.core.metadata.ImageMetadata)
    artist:   fiftyone.core.fields.EmbeddedDocumentField(fiftyone.core.labels.Classification)
    style:    fiftyone.core.fields.EmbeddedDocumentField(fiftyone.core.labels.Classification)
    genre:    fiftyone.core.fields.EmbeddedDocumentField(fiftyone.core.labels.Classification)
    row_idx:  fiftyone.core.fields.IntField
`,Xe,q,$s='在 <a href="https://docs.voxel51.com/user_guide/app.html" rel="nofollow">FiftyOne 应用</a> 中可视化数据集：',Re,P,Ve,Y,ws='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_wikiart_dataset.jpg" alt="WikiArt Dataset"/>',Ne,A,Js="让我们列出我们将要分析其风格的艺术家名字：",Be,E,qe,Q,_s=`['Unknown Artist', 'albrecht-durer', 'boris-kustodiev', 'camille-pissarro', 'childe-hassam', 'claude-monet', 'edgar-degas', 'eugene-boudin', 'gustave-dore', 'ilya-repin', 'ivan-aivazovsky', 'ivan-shishkin', 'john-singer-sargent', 'marc-chagall', 'martiros-saryan', 'nicholas-roerich', 'pablo-picasso', 'paul-cezanne', 'pierre-auguste-renoir', 'pyotr-konchalovsky', 'raphael-kirchner', 'rembrandt', 'salvador-dali', 'vincent-van-gogh']
`,Pe,S,Ye,O,xs="当你发现一件你喜欢的艺术作品时，想要找到相似的作品是很自然的。我们可以通过向量嵌入来实现这一点！更重要的是，通过使用多模态嵌入，我们将能够根据给定的文本查询（例如描述一幅画或甚至是一首诗）找到与之相似的画作。",Ae,D,ks='让我们使用来自 🤗 Transformers 的预训练 <strong>CLIP Vision Transformer (ViT)</strong> 模型为图像生成多模态嵌入。运行 <a href="https://docs.voxel51.com/user_guide/brain.html" rel="nofollow">FiftyOne Brain</a> 中的 <code>compute_similarity()</code> 函数，将计算这些嵌入并基于这些嵌入生成数据集的相似性索引。',Ee,K,Qe,tt,Zs=`Computing embeddings...
 100% |███████████████| 1000/1000 [5.0m elapsed, 0s remaining, 3.3 samples/s]
`,Se,g,me,Is="或者，您可以直接从 🤗 Transformers 库加载模型并将模型传递进去：",ms,et,os,oe,Hs='有关详细指南，请查看 <a href="https://docs.voxel51.com/integrations/huggingface.html#transformers-library">FiftyOne 的 🤗 Transformers 集成</a>。',Oe,lt,Ls="刷新 <strong>FiftyOne 应用</strong>，在样本网格中选择一个图像的复选框，然后点击照片图标，即可查看数据集中与该图像最相似的图像。在后台，点击此按钮会触发对相似性索引的查询，基于预计算的嵌入，找到与所选图像最相似的图像，并在应用中显示它们。",De,st,Fs='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_image_search.gif" alt="Image Similarity Search"/>',Ke,nt,Gs="我们可以用这个方法查看与给定艺术作品最相似的艺术作品。这对于寻找相似的艺术作品（推荐给用户或添加到收藏）或为新作品获取灵感非常有用。",tl,it,zs="但这还不止于此！由于 CLIP 是多模态的，我们还可以利用它进行语义搜索。这意味着我们可以根据文本查询来搜索图像。例如，我们可以搜索“粉彩树木”，并查看数据集中与该查询相似的所有图像。要做到这一点，请点击 <strong>FiftyOne 应用</strong> 中的搜索图标，并输入文本查询：",el,at,Ws='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_semantic_search.gif" alt="Semantic Search"/>',ll,pt,Xs="在后台，文本会被标记化，并通过 CLIP 的文本编码器进行嵌入，然后用来查询相似性索引，从而找到数据集中与之最相似的图像。这是一种基于文本查询搜索图像的强大方法，非常适合用于寻找符合特定主题或风格的图像。而且，这不仅仅局限于 CLIP；你可以使用任何可以为图像和文本生成嵌入的 CLIP 类模型，从 🤗 Transformers 中获取！",sl,v,Rs='💡 为了在大型数据集上进行高效的向量搜索和索引，FiftyOne 提供了与开源向量数据库的原生 <a href="https://voxel51.com/vector-search">集成</a>。',nl,mt,il,ot,Vs="通过执行相似性和语义搜索，我们可以更有效地与数据进行交互。但我们还可以更进一步，加入一些无监督学习的元素。这将帮助我们在 WikiArt 数据集中识别艺术模式，包括风格、主题，甚至是那些难以用语言描述的艺术主题。",al,ft,Ns="我们将通过两种方式进行：",pl,rt,Bs="<li><strong>降维</strong>：我们将使用 UMAP 将嵌入的维度减少到 2D，并在散点图中可视化数据。这将帮助我们观察图像如何基于风格、流派和艺术家进行聚类。</li> <li><strong>聚类</strong>：我们将使用 K-Means 聚类算法，基于图像的嵌入进行聚类，并观察哪些组别会自然形成。</li>",ml,Mt,qs="对于降维，我们将运行 <strong>FiftyOne Brain</strong> 中的 <code>compute_visualization()</code>，并传入之前计算的嵌入。我们指定 <code>method=&quot;umap&quot;</code> 来使用 UMAP 进行降维，但也可以选择使用 PCA 或 t-SNE：",ol,ut,fl,yt,Ps=`Generating visualization...
`,rl,ct,Ys="现在我们可以在 <strong>FiftyOne 应用</strong> 中打开一个面板，在那里我们将看到数据集中每张图像对应的一个 2D 点。我们可以通过数据集中的任何字段（例如艺术家或流派）为这些点着色，以查看这些属性在我们的图像特征中是如何被捕捉的：",Ml,gt,As='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_visualize_embeddings.gif" alt="UMAP Visualization"/>',ul,ht,Es='我们还可以在嵌入上运行聚类，将相似的图像分为一组——也许这些艺术作品的主导特征并未通过现有标签捕捉到，或者我们可能想要识别出不同的子流派。为了对我们的数据进行聚类，我们需要下载 <a href="https://github.com/jacobmarks/clustering-plugin" rel="nofollow">FiftyOne Clustering 插件</a>：',yl,bt,cl,dt,Qs="再次刷新应用后，我们可以通过应用中的操作符访问聚类功能。按下反引号键（`）打开操作符列表，输入“cluster”并从下拉菜单中选择该操作符。这将打开一个交互式面板，我们可以在其中指定聚类算法、超参数以及要聚类的字段。为了简化操作，我们将使用 K-Means 聚类，并设置为 10 个簇。",gl,vt,Ss="然后，我们可以在应用中可视化这些聚类，查看图像如何根据它们的嵌入进行分组：",hl,jt,Os='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_clustering.gif" alt="K-means Clustering"/>',bl,Ct,Ds="我们可以看到，部分聚类是按艺术家进行分组的；其他聚类则是按流派或风格进行分组的。还有一些聚类更为抽象，可能代表了子流派或其他不容易从数据中直接看出的分组。",dl,Tt,vl,Ut,Ks="我们可以问一个关于数据集的有趣问题，那就是每张图像的<strong>独特性</strong>如何。这对于许多应用场景都非常重要，比如推荐相似图像、检测重复图像或识别异常值。在艺术的语境中，一幅画的独特性可能是决定其价值的重要因素。",jl,$t,tn="尽管有很多方法可以表征独特性，我们的图像嵌入允许我们基于每张图像与数据集中其他图像的相似度，定量地为每个样本分配一个独特性分数。具体而言，<strong>FiftyOne Brain</strong> 的 <code>compute_uniqueness()</code> 函数会查看每个样本的嵌入与其最近邻之间的距离，并基于这个距离计算一个介于 0 和 1 之间的分数。分数为 0 意味着样本没有特色或与其他样本非常相似，而分数为 1 意味着样本非常独特。",Cl,wt,Tl,Jt,en=`Computing uniqueness...
Uniqueness computation complete
`,Ul,_t,ln="然后，我们可以在嵌入面板中根据独特性分数为图像着色，或者通过独特性分数进行筛选，甚至按分数排序，以查看数据集中最独特的图像。",$l,xt,wl,kt,sn='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_most_unique.jpg" alt="Most Unique Images"/>',Jl,Zt,_l,It,nn='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_least_unique.jpg" alt="Least Unique Images"/>',xl,Ht,an="更进一步，我们还可以回答哪个艺术家通常创作出最独特的作品这个问题。我们可以计算每个艺术家在其所有作品中的平均独特性分数：",kl,Lt,Zl,Ft,pn=`Unknown Artist: 0.7932221632002723
boris-kustodiev: 0.7480731948424676
salvador-dali: 0.7368807620414014
raphael-kirchner: 0.7315448102204755
ilya-repin: 0.7204744626806383
marc-chagall: 0.7169373812321908
rembrandt: 0.715205220292227
martiros-saryan: 0.708560775790436
childe-hassam: 0.7018343391132756
edgar-degas: 0.699912746806587
albrecht-durer: 0.6969358680800216
john-singer-sargent: 0.6839955708720844
pablo-picasso: 0.6835137858302969
pyotr-konchalovsky: 0.6780653000855895
nicholas-roerich: 0.6676504687452387
ivan-aivazovsky: 0.6484361530090199
vincent-van-gogh: 0.6472004520699081
gustave-dore: 0.6307283287457358
pierre-auguste-renoir: 0.6271467146993583
paul-cezanne: 0.6251076007168186
eugene-boudin: 0.6103397516167454
camille-pissarro: 0.6046182609119615
claude-monet: 0.5998234558947573
ivan-shishkin: 0.589796389836674
`,Il,Gt,mn="看起来，在我们的数据集中，创作出最独特作品的艺术家是 <strong>Boris Kustodiev</strong>！让我们来看看他的部分作品：",Hl,zt,Ll,Wt,on='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_kustodiev_view.jpg" alt="Boris Kustodiev Artwork"/>',Fl,Xt,Gl,Rt,fn="为了全面分析，我们将回归基础，分析数据集中图像的一些核心特征。我们将计算每张图像的标准指标，如亮度、对比度和饱和度，并查看这些指标与艺术作品的艺术风格和流派之间的相关性。",zl,Vt,rn='为了进行这些分析，我们需要下载 <a href="https://github.com/jacobmarks/image-quality-issues" rel="nofollow">FiftyOne 图像质量插件</a>：',Wl,Nt,Xl,Bt,Mn="再次刷新应用并打开操作符列表。这次输入 <code>compute</code> 并选择其中一个图像质量操作符。我们将从 <strong>亮度</strong> 开始：",Rl,qt,un='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_compute_brightness.gif" alt="Compute Brightness"/>',Vl,Pt,yn="当操作符运行完成后，我们的数据集中将新增一个字段，其中包含每张图像的亮度分数。然后，我们可以在应用中可视化这些数据：",Nl,Yt,cn='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_brightness.gif" alt="Brightness"/>',Bl,At,gn="我们还可以根据亮度为图像着色，甚至查看亮度与数据集中的其他字段（如风格）之间的相关性：",ql,Et,hn='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_style_by_brightness.gif" alt="Style by Brightness"/>',Pl,Qt,bn="现在对比度和饱和度也做相同的操作。以下是饱和度的结果：",Yl,St,dn='<img src="https://huggingface.co/datasets/huggingface/cookbook-images/resolve/main/art_analysis_filter_by_saturation.jpg" alt="Filter by Saturation"/>',Al,Ot,vn="希望这能说明，并非所有的分析都依赖于将深度神经网络应用于数据。有时候，简单的指标同样可以提供有价值的信息，并能为你的数据提供不同的视角 🤓！",El,j,jn='📚 对于更大的数据集，你可能希望 <a href="https://docs.voxel51.com/plugins/using_plugins.html#delegated-operations">委托操作</a> 以便稍后执行。',Ql,Dt,Sl,Kt,Cn='在本 Notebook 中，我们探讨了如何使用多模态嵌入、无监督学习和传统图像处理技术来分析图像中的艺术风格。我们展示了如何执行图像相似性和语义搜索，基于风格对图像进行聚类，分析图像的独特性，并计算图像质量指标。这些技术可以应用于广泛的视觉数据集，从艺术收藏到医学图像再到卫星图像。试着 <a href="https://docs.voxel51.com/integrations/huggingface.html#loading-datasets-from-the-hub" rel="nofollow">加载来自 Hugging Face Hub 的不同数据集</a>，看看你能发现哪些有趣的见解！',Ol,te,Tn="如果你想进一步探索，以下是一些可以尝试的附加分析：",Dl,ee,Un='<li><strong>零样本分类</strong>：使用 🤗 Transformers 提供的预训练视觉语言模型，通过主题或对象对数据集中的图像进行分类，无需任何训练数据。更多信息请参见这个 <a href="https://docs.voxel51.com/tutorials/zero_shot_classification.html" rel="nofollow">零样本分类教程</a>。</li> <li><strong>图像标注</strong>：使用 🤗 Transformers 提供的预训练视觉语言模型为数据集中的图像生成标注。然后，可以利用这些标注进行主题建模，或根据标注的嵌入对艺术作品进行聚类。更多信息请查看 FiftyOne 的 <a href="https://github.com/jacobmarks/fiftyone-image-captioning-plugin" rel="nofollow">图像标注插件</a>。</li>',Kl,le,ts,se,$n='<li><a href="https://docs.voxel51.com/integrations/huggingface.html#huggingface-hub" rel="nofollow">FiftyOne 🤝 🤗 Hub 集成</a></li> <li><a href="https://docs.voxel51.com/integrations/huggingface.html#transformers-library" rel="nofollow">FiftyOne 🤝 🤗 Transformers 集成</a></li> <li><a href="https://voxel51.com/vector-search/" rel="nofollow">FiftyOne 向量搜索集成</a></li> <li><a href="https://docs.voxel51.com/tutorials/dimension_reduction.html" rel="nofollow">使用降维技术可视化数据</a></li> <li><a href="https://docs.voxel51.com/tutorials/clustering.html" rel="nofollow">使用嵌入对图像进行聚类</a></li> <li><a href="https://docs.voxel51.com/tutorials/uniqueness.html" rel="nofollow">使用 FiftyOne 探索图像独特性</a></li>',es,ne,ls,ie,wn='<a href="https://github.com/voxel51/fiftyone/" rel="nofollow">FiftyOne</a> 是构建高质量数据集和计算机视觉模型的领先开源工具包。FiftyOne 已经拥有超过 200 万次下载，全球的开发者和研究人员都信任并使用它。',ss,ae,Jn='💪 FiftyOne 团队欢迎开源社区的贡献！如果你有兴趣为 FiftyOne 做贡献，可以查看 <a href="https://github.com/voxel51/fiftyone/blob/develop/CONTRIBUTING.md" rel="nofollow">贡献指南</a>。',ns,pe,is,Me,as;return C=new Fn({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Google Colab",value:"https://colab.research.google.com/github/huggingface/cookbook/blob/main/notebooks/zh-CN/analyzing_art_with_hf_and_fiftyone.ipynb"}]}}),T=new Ln({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),U=new b({props:{title:"分析艺术风格与多模态嵌入",local:"分析艺术风格与多模态嵌入",headingTag:"h1"}}),k=new b({props:{title:"让我们开始吧! 🚀",local:"让我们开始吧-",headingTag:"h2"}}),I=new c({props:{code:"IXBpcCUyMGluc3RhbGwlMjAtVSUyMHRyYW5zZm9ybWVycyUyMGh1Z2dpbmdmYWNlX2h1YiUyMGZpZnR5b25lJTIwdW1hcC1sZWFybg==",highlighted:"!pip install -U transformers huggingface_hub fiftyone umap-learn",wrap:!1}}),L=new c({props:{code:"cGlwJTIwaW5zdGFsbCUyMGhmLXRyYW5zZmVy",highlighted:"pip install hf-transfer",wrap:!1}}),G=new c({props:{code:"aW1wb3J0JTIwb3MlMEFvcy5lbnZpcm9uJTVCJTIySEZfSFVCX0VOQUJMRV9IRl9UUkFOU0ZFUiUyMiU1RCUyMCUzRCUyMCUyMjElMjI=",highlighted:`import os
os.environ[<span class="hljs-string">&quot;HF_HUB_ENABLE_HF_TRANSFER&quot;</span>] = <span class="hljs-string">&quot;1&quot;</span>`,wrap:!1}}),W=new c({props:{code:"aW1wb3J0JTIwZmlmdHlvbmUlMjBhcyUyMGZvJTIwJTIzJTIwYmFzZSUyMGxpYnJhcnklMjBhbmQlMjBhcHAlMEFpbXBvcnQlMjBmaWZ0eW9uZS56b28lMjBhcyUyMGZveiUyMCUyMyUyMHpvbyUyMGRhdGFzZXRzJTIwYW5kJTIwbW9kZWxzJTBBaW1wb3J0JTIwZmlmdHlvbmUuYnJhaW4lMjBhcyUyMGZvYiUyMCUyMyUyME1MJTIwcm91dGluZXMlMEFmcm9tJTIwZmlmdHlvbmUlMjBpbXBvcnQlMjBWaWV3RmllbGQlMjBhcyUyMEYlMjAlMjMlMjBmb3IlMjBkZWZpbmluZyUyMGN1c3RvbSUyMHZpZXdzJTBBaW1wb3J0JTIwZmlmdHlvbmUudXRpbHMuaHVnZ2luZ2ZhY2UlMjBhcyUyMGZvdWglMjAlMjMlMjBmb3IlMjBsb2FkaW5nJTIwZGF0YXNldHMlMjBmcm9tJTIwSHVnZ2luZyUyMEZhY2U=",highlighted:`<span class="hljs-keyword">import</span> fiftyone <span class="hljs-keyword">as</span> fo <span class="hljs-comment"># base library and app</span>
<span class="hljs-keyword">import</span> fiftyone.zoo <span class="hljs-keyword">as</span> foz <span class="hljs-comment"># zoo datasets and models</span>
<span class="hljs-keyword">import</span> fiftyone.brain <span class="hljs-keyword">as</span> fob <span class="hljs-comment"># ML routines</span>
<span class="hljs-keyword">from</span> fiftyone <span class="hljs-keyword">import</span> ViewField <span class="hljs-keyword">as</span> F <span class="hljs-comment"># for defining custom views</span>
<span class="hljs-keyword">import</span> fiftyone.utils.huggingface <span class="hljs-keyword">as</span> fouh <span class="hljs-comment"># for loading datasets from Hugging Face</span>`,wrap:!1}}),R=new c({props:{code:"ZGF0YXNldCUyMCUzRCUyMGZvdWgubG9hZF9mcm9tX2h1YiglMEElMjAlMjAlMjAlMjAlMjJodWdnYW4lMkZ3aWtpYXJ0JTIyJTJDJTIwJTIzJTIzJTIwcmVwb19pZCUwQSUyMCUyMCUyMCUyMGZvcm1hdCUzRCUyMnBhcnF1ZXQlMjIlMkMlMjAlMjMlMjMlMjBmb3IlMjBQYXJxdWV0JTIwZm9ybWF0JTBBJTIwJTIwJTIwJTIwY2xhc3NpZmljYXRpb25fZmllbGRzJTNEJTVCJTIyYXJ0aXN0JTIyJTJDJTIwJTIyc3R5bGUlMjIlMkMlMjAlMjJnZW5yZSUyMiU1RCUyQyUyMCUyMyUyMGNvbHVtbnMlMjB0byUyMHN0b3JlJTIwYXMlMjBjbGFzc2lmaWNhdGlvbiUyMGZpZWxkcyUwQSUyMCUyMCUyMCUyMG1heF9zYW1wbGVzJTNEMTAwMCUyQyUyMCUyMyUyMG51bWJlciUyMG9mJTIwc2FtcGxlcyUyMHRvJTIwbG9hZCUwQSUyMCUyMCUyMCUyMG5hbWUlM0QlMjJ3aWtpYXJ0JTIyJTJDJTIwJTIzJTIwbmFtZSUyMG9mJTIwdGhlJTIwZGF0YXNldCUyMGluJTIwRmlmdHlPbmUlMEEp",highlighted:`dataset = fouh.load_from_hub(
    <span class="hljs-string">&quot;huggan/wikiart&quot;</span>, <span class="hljs-comment">## repo_id</span>
    <span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;parquet&quot;</span>, <span class="hljs-comment">## for Parquet format</span>
    classification_fields=[<span class="hljs-string">&quot;artist&quot;</span>, <span class="hljs-string">&quot;style&quot;</span>, <span class="hljs-string">&quot;genre&quot;</span>], <span class="hljs-comment"># columns to store as classification fields</span>
    max_samples=<span class="hljs-number">1000</span>, <span class="hljs-comment"># number of samples to load</span>
    name=<span class="hljs-string">&quot;wikiart&quot;</span>, <span class="hljs-comment"># name of the dataset in FiftyOne</span>
)`,wrap:!1}}),N=new c({props:{code:"cHJpbnQoZGF0YXNldCk=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(dataset)',wrap:!1}}),P=new c({props:{code:"c2Vzc2lvbiUyMCUzRCUyMGZvLmxhdW5jaF9hcHAoZGF0YXNldCk=",highlighted:"session = fo.launch_app(dataset)",wrap:!1}}),E=new c({props:{code:"YXJ0aXN0cyUyMCUzRCUyMGRhdGFzZXQuZGlzdGluY3QoJTIyYXJ0aXN0LmxhYmVsJTIyKSUwQXByaW50KGFydGlzdHMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>artists = dataset.distinct(<span class="hljs-string">&quot;artist.label&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(artists)`,wrap:!1}}),S=new b({props:{title:"查找相似的艺术作品",local:"查找相似的艺术作品",headingTag:"h2"}}),K=new c({props:{code:"Zm9iLmNvbXB1dGVfc2ltaWxhcml0eSglMEElMjAlMjAlMjAlMjBkYXRhc2V0JTJDJTIwJTBBJTIwJTIwJTIwJTIwbW9kZWwlM0QlMjJ6ZXJvLXNob3QtY2xhc3NpZmljYXRpb24tdHJhbnNmb3JtZXItdG9yY2glMjIlMkMlMjAlMjMlMjMlMjB0eXBlJTIwb2YlMjBtb2RlbCUyMHRvJTIwbG9hZCUyMGZyb20lMjBtb2RlbCUyMHpvbyUwQSUyMCUyMCUyMCUyMG5hbWVfb3JfcGF0aCUzRCUyMm9wZW5haSUyRmNsaXAtdml0LWJhc2UtcGF0Y2gzMiUyMiUyQyUyMCUyMyUyMyUyMHJlcG9faWQlMjBvZiUyMGNoZWNrcG9pbnQlMEElMjAlMjAlMjAlMjBlbWJlZGRpbmdzJTNEJTIyY2xpcF9lbWJlZGRpbmdzJTIyJTJDJTIwJTIzJTIzJTIwbmFtZSUyMG9mJTIwdGhlJTIwZmllbGQlMjB0byUyMHN0b3JlJTIwZW1iZWRkaW5ncyUwQSUyMCUyMCUyMCUyMGJyYWluX2tleSUzRCUyMmNsaXBfc2ltJTIyJTJDJTIwJTIzJTIzJTIwa2V5JTIwdG8lMjBzdG9yZSUyMHNpbWlsYXJpdHklMjBpbmRleCUyMGluZm8lMEElMjAlMjAlMjAlMjBiYXRjaF9zaXplJTNEMzIlMkMlMjAlMjMlMjMlMjBiYXRjaCUyMHNpemUlMjBmb3IlMjBpbmZlcmVuY2UlMEElMjAlMjAlMjAlMjAp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>fob.compute_similarity(
<span class="hljs-meta">... </span>    dataset, 
<span class="hljs-meta">... </span>    model=<span class="hljs-string">&quot;zero-shot-classification-transformer-torch&quot;</span>, <span class="hljs-comment">## type of model to load from model zoo</span>
<span class="hljs-meta">... </span>    name_or_path=<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>, <span class="hljs-comment">## repo_id of checkpoint</span>
<span class="hljs-meta">... </span>    embeddings=<span class="hljs-string">&quot;clip_embeddings&quot;</span>, <span class="hljs-comment">## name of the field to store embeddings</span>
<span class="hljs-meta">... </span>    brain_key=<span class="hljs-string">&quot;clip_sim&quot;</span>, <span class="hljs-comment">## key to store similarity index info</span>
<span class="hljs-meta">... </span>    batch_size=<span class="hljs-number">32</span>, <span class="hljs-comment">## batch size for inference</span>
<span class="hljs-meta">... </span>    )`,wrap:!1}}),et=new c({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENMSVBNb2RlbCUwQW1vZGVsJTIwJTNEJTIwQ0xJUE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJvcGVuYWklMkZjbGlwLXZpdC1iYXNlLXBhdGNoMzIlMjIpJTBBZm9iLmNvbXB1dGVfc2ltaWxhcml0eSglMEElMjAlMjAlMjAlMjBkYXRhc2V0JTJDJTIwJTBBJTIwJTIwJTIwJTIwbW9kZWwlM0Rtb2RlbCUyQyUwQSUyMCUyMCUyMCUyMGVtYmVkZGluZ3MlM0QlMjJjbGlwX2VtYmVkZGluZ3MlMjIlMkMlMjAlMjAlMjMlMjMlMjAlRTUlQUQlOTglRTUlODIlQTglRTUlQjUlOEMlRTUlODUlQTUlRTclOUElODQlRTUlQUQlOTclRTYlQUUlQjUlRTUlOTAlOEQlRTclQTclQjAlMEElMjAlMjAlMjAlMjBicmFpbl9rZXklM0QlMjJjbGlwX3NpbSUyMiUyMCUyMCUyMyUyMyUyMCVFNSVBRCU5OCVFNSU4MiVBOCVFNyU5QiVCOCVFNCVCQyVCQyVFNiU4MCVBNyVFNyVCNCVBMiVFNSVCQyU5NSVFNCVCRiVBMSVFNiU4MSVBRiVFNyU5QSU4NCVFOSU5NCVBRSUwQSk=",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> CLIPModel
model = CLIPModel.from_pretrained(<span class="hljs-string">&quot;openai/clip-vit-base-patch32&quot;</span>)
fob.compute_similarity(
    dataset, 
    model=model,
    embeddings=<span class="hljs-string">&quot;clip_embeddings&quot;</span>,  <span class="hljs-comment">## 存储嵌入的字段名称</span>
    brain_key=<span class="hljs-string">&quot;clip_sim&quot;</span>  <span class="hljs-comment">## 存储相似性索引信息的键</span>
)`,wrap:!1}}),mt=new b({props:{title:"通过聚类和可视化揭示艺术主题",local:"通过聚类和可视化揭示艺术主题",headingTag:"h2"}}),ut=new c({props:{code:"Zm9iLmNvbXB1dGVfdmlzdWFsaXphdGlvbihkYXRhc2V0JTJDJTIwZW1iZWRkaW5ncyUzRCUyMmNsaXBfZW1iZWRkaW5ncyUyMiUyQyUyMG1ldGhvZCUzRCUyMnVtYXAlMjIlMkMlMjBicmFpbl9rZXklM0QlMjJjbGlwX3ZpcyUyMik=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>fob.compute_visualization(dataset, embeddings=<span class="hljs-string">&quot;clip_embeddings&quot;</span>, method=<span class="hljs-string">&quot;umap&quot;</span>, brain_key=<span class="hljs-string">&quot;clip_vis&quot;</span>)',wrap:!1}}),bt=new c({props:{code:"IWZpZnR5b25lJTIwcGx1Z2lucyUyMGRvd25sb2FkJTIwaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGamFjb2JtYXJrcyUyRmNsdXN0ZXJpbmctcGx1Z2lu",highlighted:"!fiftyone plugins download https://github.com/jacobmarks/clustering-plugin",wrap:!1}}),Tt=new b({props:{title:"识别最独特的艺术作品",local:"识别最独特的艺术作品",headingTag:"h2"}}),wt=new c({props:{code:"Zm9iLmNvbXB1dGVfdW5pcXVlbmVzcyhkYXRhc2V0JTJDJTIwZW1iZWRkaW5ncyUzRCUyMmNsaXBfZW1iZWRkaW5ncyUyMiklMjAlMjMlMjBjb21wdXRlJTIwdW5pcXVlbmVzcyUyMHVzaW5nJTIwQ0xJUCUyMGVtYmVkZGluZ3M=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span>fob.compute_uniqueness(dataset, embeddings=<span class="hljs-string">&quot;clip_embeddings&quot;</span>) <span class="hljs-comment"># compute uniqueness using CLIP embeddings</span>',wrap:!1}}),xt=new c({props:{code:"bW9zdF91bmlxdWVfdmlldyUyMCUzRCUyMGRhdGFzZXQuc29ydF9ieSglMjJ1bmlxdWVuZXNzJTIyJTJDJTIwcmV2ZXJzZSUzRFRydWUpJTBBc2Vzc2lvbi52aWV3JTIwJTNEJTIwbW9zdF91bmlxdWVfdmlldy52aWV3KCklMjAlMjMlMjBNb3N0JTIwdW5pcXVlJTIwaW1hZ2Vz",highlighted:`most_unique_view = dataset.sort_by(<span class="hljs-string">&quot;uniqueness&quot;</span>, reverse=<span class="hljs-literal">True</span>)
session.view = most_unique_view.view() <span class="hljs-comment"># Most unique images</span>`,wrap:!1}}),Zt=new c({props:{code:"bGVhc3RfdW5pcXVlX3ZpZXclMjAlM0QlMjBkYXRhc2V0LnNvcnRfYnkoJTIydW5pcXVlbmVzcyUyMiUyQyUyMHJldmVyc2UlM0RGYWxzZSklMEFzZXNzaW9uLnZpZXclMjAlM0QlMjBsZWFzdF91bmlxdWVfdmlldy52aWV3KCklMjAlMjMlMjBMZWFzdCUyMHVuaXF1ZSUyMGltYWdlcw==",highlighted:`least_unique_view = dataset.sort_by(<span class="hljs-string">&quot;uniqueness&quot;</span>, reverse=<span class="hljs-literal">False</span>)
session.view = least_unique_view.view() <span class="hljs-comment"># Least unique images</span>`,wrap:!1}}),Lt=new c({props:{code:"YXJ0aXN0X3VuaXF1ZV9zY29yZXMlMjAlM0QlMjAlN0IlMEElMjAlMjAlMjAlMjBhcnRpc3QlM0ElMjBkYXRhc2V0Lm1hdGNoKEYoJTIyYXJ0aXN0LmxhYmVsJTIyKSUyMCUzRCUzRCUyMGFydGlzdCkubWVhbiglMjJ1bmlxdWVuZXNzJTIyKSUwQSUyMCUyMCUyMCUyMGZvciUyMGFydGlzdCUyMGluJTIwYXJ0aXN0cyUwQSU3RCUwQSUwQXNvcnRlZF9hcnRpc3RzJTIwJTNEJTIwc29ydGVkKCUwQSUyMCUyMCUyMCUyMGFydGlzdF91bmlxdWVfc2NvcmVzJTJDJTIwa2V5JTNEYXJ0aXN0X3VuaXF1ZV9zY29yZXMuZ2V0JTJDJTIwcmV2ZXJzZSUzRFRydWUlMEEpJTBBJTBBZm9yJTIwYXJ0aXN0JTIwaW4lMjBzb3J0ZWRfYXJ0aXN0cyUzQSUwQSUyMCUyMCUyMCUyMHByaW50KGYlMjIlN0JhcnRpc3QlN0QlM0ElMjAlN0JhcnRpc3RfdW5pcXVlX3Njb3JlcyU1QmFydGlzdCU1RCU3RCUyMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>artist_unique_scores = {
<span class="hljs-meta">... </span>    artist: dataset.<span class="hljs-keyword">match</span>(F(<span class="hljs-string">&quot;artist.label&quot;</span>) == artist).mean(<span class="hljs-string">&quot;uniqueness&quot;</span>)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> artist <span class="hljs-keyword">in</span> artists
<span class="hljs-meta">... </span>}

<span class="hljs-meta">&gt;&gt;&gt; </span>sorted_artists = <span class="hljs-built_in">sorted</span>(
<span class="hljs-meta">... </span>    artist_unique_scores, key=artist_unique_scores.get, reverse=<span class="hljs-literal">True</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">for</span> artist <span class="hljs-keyword">in</span> sorted_artists:
<span class="hljs-meta">... </span>    <span class="hljs-built_in">print</span>(<span class="hljs-string">f&quot;<span class="hljs-subst">{artist}</span>: <span class="hljs-subst">{artist_unique_scores[artist]}</span>&quot;</span>)`,wrap:!1}}),zt=new c({props:{code:"a3VzdG9kaWV2X3ZpZXclMjAlM0QlMjBkYXRhc2V0Lm1hdGNoKEYoJTIyYXJ0aXN0LmxhYmVsJTIyKSUyMCUzRCUzRCUyMCUyMmJvcmlzLWt1c3RvZGlldiUyMiklMEFzZXNzaW9uLnZpZXclMjAlM0QlMjBrdXN0b2RpZXZfdmlldy52aWV3KCk=",highlighted:`kustodiev_view = dataset.<span class="hljs-keyword">match</span>(F(<span class="hljs-string">&quot;artist.label&quot;</span>) == <span class="hljs-string">&quot;boris-kustodiev&quot;</span>)
session.view = kustodiev_view.view()`,wrap:!1}}),Xt=new b({props:{title:"通过视觉特征描述艺术作品",local:"通过视觉特征描述艺术作品",headingTag:"h2"}}),Nt=new c({props:{code:"IWZpZnR5b25lJTIwcGx1Z2lucyUyMGRvd25sb2FkJTIwaHR0cHMlM0ElMkYlMkZnaXRodWIuY29tJTJGamFjb2JtYXJrcyUyRmltYWdlLXF1YWxpdHktaXNzdWVzJTJG",highlighted:"!fiftyone plugins download https://github.com/jacobmarks/image-quality-issues/",wrap:!1}}),Dt=new b({props:{title:"下一步是什么？",local:"下一步是什么",headingTag:"h2"}}),le=new b({props:{title:"📚 资源",local:"-资源",headingTag:"h3"}}),ne=new b({props:{title:"FiftyOne 开源项目",local:"fiftyone-开源项目",headingTag:"h2"}}),pe=new Gn({props:{source:"https://github.com/huggingface/cookbook/blob/main/notebooks/zh-CN/analyzing_art_with_hf_and_fiftyone.md"}}),{c(){h=a("meta"),ce=n(),re=a("p"),ge=n(),o(C.$$.fragment),he=n(),o(T.$$.fragment),be=n(),o(U.$$.fragment),de=n(),$=a("p"),$.innerHTML=Ms,ve=n(),w=a("p"),w.innerHTML=us,je=n(),J=a("p"),J.innerHTML=ys,Ce=n(),_=a("p"),_.innerHTML=cs,Te=n(),x=a("ul"),x.innerHTML=gs,Ue=n(),o(k.$$.fragment),$e=n(),Z=a("p"),Z.textContent=hs,we=n(),o(I.$$.fragment),Je=n(),H=a("p"),H.innerHTML=bs,_e=n(),o(L.$$.fragment),xe=n(),F=a("p"),F.innerHTML=ds,ke=n(),o(G.$$.fragment),Ze=n(),d=a("div"),d.innerHTML=vs,Ie=n(),z=a("p"),z.textContent=js,He=n(),o(W.$$.fragment),Le=n(),X=a("p"),X.innerHTML=Cs,Fe=n(),o(R.$$.fragment),Ge=n(),V=a("p"),V.textContent=Ts,ze=n(),o(N.$$.fragment),We=n(),B=a("pre"),B.textContent=Us,Xe=n(),q=a("p"),q.innerHTML=$s,Re=n(),o(P.$$.fragment),Ve=n(),Y=a("p"),Y.innerHTML=ws,Ne=n(),A=a("p"),A.textContent=Js,Be=n(),o(E.$$.fragment),qe=n(),Q=a("pre"),Q.textContent=_s,Pe=n(),o(S.$$.fragment),Ye=n(),O=a("p"),O.textContent=xs,Ae=n(),D=a("p"),D.innerHTML=ks,Ee=n(),o(K.$$.fragment),Qe=n(),tt=a("pre"),tt.textContent=Zs,Se=n(),g=a("div"),me=a("p"),me.textContent=Is,ms=n(),o(et.$$.fragment),os=n(),oe=a("p"),oe.innerHTML=Hs,Oe=n(),lt=a("p"),lt.innerHTML=Ls,De=n(),st=a("p"),st.innerHTML=Fs,Ke=n(),nt=a("p"),nt.textContent=Gs,tl=n(),it=a("p"),it.innerHTML=zs,el=n(),at=a("p"),at.innerHTML=Ws,ll=n(),pt=a("p"),pt.textContent=Xs,sl=n(),v=a("div"),v.innerHTML=Rs,nl=n(),o(mt.$$.fragment),il=n(),ot=a("p"),ot.textContent=Vs,al=n(),ft=a("p"),ft.textContent=Ns,pl=n(),rt=a("ol"),rt.innerHTML=Bs,ml=n(),Mt=a("p"),Mt.innerHTML=qs,ol=n(),o(ut.$$.fragment),fl=n(),yt=a("pre"),yt.textContent=Ps,rl=n(),ct=a("p"),ct.innerHTML=Ys,Ml=n(),gt=a("p"),gt.innerHTML=As,ul=n(),ht=a("p"),ht.innerHTML=Es,yl=n(),o(bt.$$.fragment),cl=n(),dt=a("p"),dt.textContent=Qs,gl=n(),vt=a("p"),vt.textContent=Ss,hl=n(),jt=a("p"),jt.innerHTML=Os,bl=n(),Ct=a("p"),Ct.textContent=Ds,dl=n(),o(Tt.$$.fragment),vl=n(),Ut=a("p"),Ut.innerHTML=Ks,jl=n(),$t=a("p"),$t.innerHTML=tn,Cl=n(),o(wt.$$.fragment),Tl=n(),Jt=a("pre"),Jt.textContent=en,Ul=n(),_t=a("p"),_t.textContent=ln,$l=n(),o(xt.$$.fragment),wl=n(),kt=a("p"),kt.innerHTML=sn,Jl=n(),o(Zt.$$.fragment),_l=n(),It=a("p"),It.innerHTML=nn,xl=n(),Ht=a("p"),Ht.textContent=an,kl=n(),o(Lt.$$.fragment),Zl=n(),Ft=a("pre"),Ft.textContent=pn,Il=n(),Gt=a("p"),Gt.innerHTML=mn,Hl=n(),o(zt.$$.fragment),Ll=n(),Wt=a("p"),Wt.innerHTML=on,Fl=n(),o(Xt.$$.fragment),Gl=n(),Rt=a("p"),Rt.textContent=fn,zl=n(),Vt=a("p"),Vt.innerHTML=rn,Wl=n(),o(Nt.$$.fragment),Xl=n(),Bt=a("p"),Bt.innerHTML=Mn,Rl=n(),qt=a("p"),qt.innerHTML=un,Vl=n(),Pt=a("p"),Pt.textContent=yn,Nl=n(),Yt=a("p"),Yt.innerHTML=cn,Bl=n(),At=a("p"),At.textContent=gn,ql=n(),Et=a("p"),Et.innerHTML=hn,Pl=n(),Qt=a("p"),Qt.textContent=bn,Yl=n(),St=a("p"),St.innerHTML=dn,Al=n(),Ot=a("p"),Ot.textContent=vn,El=n(),j=a("div"),j.innerHTML=jn,Ql=n(),o(Dt.$$.fragment),Sl=n(),Kt=a("p"),Kt.innerHTML=Cn,Ol=n(),te=a("p"),te.textContent=Tn,Dl=n(),ee=a("ul"),ee.innerHTML=Un,Kl=n(),o(le.$$.fragment),ts=n(),se=a("ul"),se.innerHTML=$n,es=n(),o(ne.$$.fragment),ls=n(),ie=a("p"),ie.innerHTML=wn,ss=n(),ae=a("p"),ae.innerHTML=Jn,ns=n(),o(pe.$$.fragment),is=n(),Me=a("p"),this.h()},l(t){const e=Hn("svelte-u9bgzb",document.head);h=p(e,"META",{name:!0,content:!0}),e.forEach(l),ce=i(t),re=p(t,"P",{}),fs(re).forEach(l),ge=i(t),f(C.$$.fragment,t),he=i(t),f(T.$$.fragment,t),be=i(t),f(U.$$.fragment,t),de=i(t),$=p(t,"P",{"data-svelte-h":!0}),m($)!=="svelte-1n621y5"&&($.innerHTML=Ms),ve=i(t),w=p(t,"P",{"data-svelte-h":!0}),m(w)!=="svelte-1xzj7ip"&&(w.innerHTML=us),je=i(t),J=p(t,"P",{"data-svelte-h":!0}),m(J)!=="svelte-1v48993"&&(J.innerHTML=ys),Ce=i(t),_=p(t,"P",{"data-svelte-h":!0}),m(_)!=="svelte-eo29vv"&&(_.innerHTML=cs),Te=i(t),x=p(t,"UL",{"data-svelte-h":!0}),m(x)!=="svelte-1xk83y0"&&(x.innerHTML=gs),Ue=i(t),f(k.$$.fragment,t),$e=i(t),Z=p(t,"P",{"data-svelte-h":!0}),m(Z)!=="svelte-1yl1sjl"&&(Z.textContent=hs),we=i(t),f(I.$$.fragment,t),Je=i(t),H=p(t,"P",{"data-svelte-h":!0}),m(H)!=="svelte-1qjpzm7"&&(H.innerHTML=bs),_e=i(t),f(L.$$.fragment,t),xe=i(t),F=p(t,"P",{"data-svelte-h":!0}),m(F)!=="svelte-1lyxu81"&&(F.innerHTML=ds),ke=i(t),f(G.$$.fragment,t),Ze=i(t),d=p(t,"DIV",{class:!0,"data-svelte-h":!0}),m(d)!=="svelte-t4feb5"&&(d.innerHTML=vs),Ie=i(t),z=p(t,"P",{"data-svelte-h":!0}),m(z)!=="svelte-15s7ou4"&&(z.textContent=js),He=i(t),f(W.$$.fragment,t),Le=i(t),X=p(t,"P",{"data-svelte-h":!0}),m(X)!=="svelte-1bnfagi"&&(X.innerHTML=Cs),Fe=i(t),f(R.$$.fragment,t),Ge=i(t),V=p(t,"P",{"data-svelte-h":!0}),m(V)!=="svelte-jyo60v"&&(V.textContent=Ts),ze=i(t),f(N.$$.fragment,t),We=i(t),B=p(t,"PRE",{"data-svelte-h":!0}),m(B)!=="svelte-1odavx8"&&(B.textContent=Us),Xe=i(t),q=p(t,"P",{"data-svelte-h":!0}),m(q)!=="svelte-n4sqks"&&(q.innerHTML=$s),Re=i(t),f(P.$$.fragment,t),Ve=i(t),Y=p(t,"P",{"data-svelte-h":!0}),m(Y)!=="svelte-1cy8zue"&&(Y.innerHTML=ws),Ne=i(t),A=p(t,"P",{"data-svelte-h":!0}),m(A)!=="svelte-5dty4u"&&(A.textContent=Js),Be=i(t),f(E.$$.fragment,t),qe=i(t),Q=p(t,"PRE",{"data-svelte-h":!0}),m(Q)!=="svelte-rh6f0n"&&(Q.textContent=_s),Pe=i(t),f(S.$$.fragment,t),Ye=i(t),O=p(t,"P",{"data-svelte-h":!0}),m(O)!=="svelte-fwenmu"&&(O.textContent=xs),Ae=i(t),D=p(t,"P",{"data-svelte-h":!0}),m(D)!=="svelte-1ty1po9"&&(D.innerHTML=ks),Ee=i(t),f(K.$$.fragment,t),Qe=i(t),tt=p(t,"PRE",{"data-svelte-h":!0}),m(tt)!=="svelte-mmre29"&&(tt.textContent=Zs),Se=i(t),g=p(t,"DIV",{style:!0});var fe=fs(g);me=p(fe,"P",{"data-svelte-h":!0}),m(me)!=="svelte-84ubet"&&(me.textContent=Is),ms=i(fe),f(et.$$.fragment,fe),os=i(fe),oe=p(fe,"P",{"data-svelte-h":!0}),m(oe)!=="svelte-akcsst"&&(oe.innerHTML=Hs),fe.forEach(l),Oe=i(t),lt=p(t,"P",{"data-svelte-h":!0}),m(lt)!=="svelte-17n6obl"&&(lt.innerHTML=Ls),De=i(t),st=p(t,"P",{"data-svelte-h":!0}),m(st)!=="svelte-w8rr2"&&(st.innerHTML=Fs),Ke=i(t),nt=p(t,"P",{"data-svelte-h":!0}),m(nt)!=="svelte-1ibwof8"&&(nt.textContent=Gs),tl=i(t),it=p(t,"P",{"data-svelte-h":!0}),m(it)!=="svelte-1sy10b4"&&(it.innerHTML=zs),el=i(t),at=p(t,"P",{"data-svelte-h":!0}),m(at)!=="svelte-8ah19l"&&(at.innerHTML=Ws),ll=i(t),pt=p(t,"P",{"data-svelte-h":!0}),m(pt)!=="svelte-6dxe71"&&(pt.textContent=Xs),sl=i(t),v=p(t,"DIV",{class:!0,"data-svelte-h":!0}),m(v)!=="svelte-wqj8k2"&&(v.innerHTML=Rs),nl=i(t),f(mt.$$.fragment,t),il=i(t),ot=p(t,"P",{"data-svelte-h":!0}),m(ot)!=="svelte-1fxj75f"&&(ot.textContent=Vs),al=i(t),ft=p(t,"P",{"data-svelte-h":!0}),m(ft)!=="svelte-1yqqnuo"&&(ft.textContent=Ns),pl=i(t),rt=p(t,"OL",{"data-svelte-h":!0}),m(rt)!=="svelte-ep87tj"&&(rt.innerHTML=Bs),ml=i(t),Mt=p(t,"P",{"data-svelte-h":!0}),m(Mt)!=="svelte-4j4d59"&&(Mt.innerHTML=qs),ol=i(t),f(ut.$$.fragment,t),fl=i(t),yt=p(t,"PRE",{"data-svelte-h":!0}),m(yt)!=="svelte-bhg5yk"&&(yt.textContent=Ps),rl=i(t),ct=p(t,"P",{"data-svelte-h":!0}),m(ct)!=="svelte-bcz5yn"&&(ct.innerHTML=Ys),Ml=i(t),gt=p(t,"P",{"data-svelte-h":!0}),m(gt)!=="svelte-guqvsc"&&(gt.innerHTML=As),ul=i(t),ht=p(t,"P",{"data-svelte-h":!0}),m(ht)!=="svelte-wssvbl"&&(ht.innerHTML=Es),yl=i(t),f(bt.$$.fragment,t),cl=i(t),dt=p(t,"P",{"data-svelte-h":!0}),m(dt)!=="svelte-6oqt28"&&(dt.textContent=Qs),gl=i(t),vt=p(t,"P",{"data-svelte-h":!0}),m(vt)!=="svelte-18u3z1u"&&(vt.textContent=Ss),hl=i(t),jt=p(t,"P",{"data-svelte-h":!0}),m(jt)!=="svelte-1ccs8bm"&&(jt.innerHTML=Os),bl=i(t),Ct=p(t,"P",{"data-svelte-h":!0}),m(Ct)!=="svelte-16tqcbj"&&(Ct.textContent=Ds),dl=i(t),f(Tt.$$.fragment,t),vl=i(t),Ut=p(t,"P",{"data-svelte-h":!0}),m(Ut)!=="svelte-1xj35a7"&&(Ut.innerHTML=Ks),jl=i(t),$t=p(t,"P",{"data-svelte-h":!0}),m($t)!=="svelte-5bji2r"&&($t.innerHTML=tn),Cl=i(t),f(wt.$$.fragment,t),Tl=i(t),Jt=p(t,"PRE",{"data-svelte-h":!0}),m(Jt)!=="svelte-326il2"&&(Jt.textContent=en),Ul=i(t),_t=p(t,"P",{"data-svelte-h":!0}),m(_t)!=="svelte-1ol4fvk"&&(_t.textContent=ln),$l=i(t),f(xt.$$.fragment,t),wl=i(t),kt=p(t,"P",{"data-svelte-h":!0}),m(kt)!=="svelte-1tb2ntu"&&(kt.innerHTML=sn),Jl=i(t),f(Zt.$$.fragment,t),_l=i(t),It=p(t,"P",{"data-svelte-h":!0}),m(It)!=="svelte-1vqafg6"&&(It.innerHTML=nn),xl=i(t),Ht=p(t,"P",{"data-svelte-h":!0}),m(Ht)!=="svelte-1lskvx4"&&(Ht.textContent=an),kl=i(t),f(Lt.$$.fragment,t),Zl=i(t),Ft=p(t,"PRE",{"data-svelte-h":!0}),m(Ft)!=="svelte-1n3row5"&&(Ft.textContent=pn),Il=i(t),Gt=p(t,"P",{"data-svelte-h":!0}),m(Gt)!=="svelte-1t3f2bp"&&(Gt.innerHTML=mn),Hl=i(t),f(zt.$$.fragment,t),Ll=i(t),Wt=p(t,"P",{"data-svelte-h":!0}),m(Wt)!=="svelte-13rc4gu"&&(Wt.innerHTML=on),Fl=i(t),f(Xt.$$.fragment,t),Gl=i(t),Rt=p(t,"P",{"data-svelte-h":!0}),m(Rt)!=="svelte-1f0onmz"&&(Rt.textContent=fn),zl=i(t),Vt=p(t,"P",{"data-svelte-h":!0}),m(Vt)!=="svelte-1knwbmw"&&(Vt.innerHTML=rn),Wl=i(t),f(Nt.$$.fragment,t),Xl=i(t),Bt=p(t,"P",{"data-svelte-h":!0}),m(Bt)!=="svelte-1uw9n63"&&(Bt.innerHTML=Mn),Rl=i(t),qt=p(t,"P",{"data-svelte-h":!0}),m(qt)!=="svelte-ojjfuj"&&(qt.innerHTML=un),Vl=i(t),Pt=p(t,"P",{"data-svelte-h":!0}),m(Pt)!=="svelte-rx6nc8"&&(Pt.textContent=yn),Nl=i(t),Yt=p(t,"P",{"data-svelte-h":!0}),m(Yt)!=="svelte-1tiw0lq"&&(Yt.innerHTML=cn),Bl=i(t),At=p(t,"P",{"data-svelte-h":!0}),m(At)!=="svelte-1qoywzh"&&(At.textContent=gn),ql=i(t),Et=p(t,"P",{"data-svelte-h":!0}),m(Et)!=="svelte-b6ayaa"&&(Et.innerHTML=hn),Pl=i(t),Qt=p(t,"P",{"data-svelte-h":!0}),m(Qt)!=="svelte-m3wfu1"&&(Qt.textContent=bn),Yl=i(t),St=p(t,"P",{"data-svelte-h":!0}),m(St)!=="svelte-1aj2nhz"&&(St.innerHTML=dn),Al=i(t),Ot=p(t,"P",{"data-svelte-h":!0}),m(Ot)!=="svelte-1gh0eqx"&&(Ot.textContent=vn),El=i(t),j=p(t,"DIV",{class:!0,"data-svelte-h":!0}),m(j)!=="svelte-19wez0m"&&(j.innerHTML=jn),Ql=i(t),f(Dt.$$.fragment,t),Sl=i(t),Kt=p(t,"P",{"data-svelte-h":!0}),m(Kt)!=="svelte-c15amm"&&(Kt.innerHTML=Cn),Ol=i(t),te=p(t,"P",{"data-svelte-h":!0}),m(te)!=="svelte-dje9td"&&(te.textContent=Tn),Dl=i(t),ee=p(t,"UL",{"data-svelte-h":!0}),m(ee)!=="svelte-1741qwg"&&(ee.innerHTML=Un),Kl=i(t),f(le.$$.fragment,t),ts=i(t),se=p(t,"UL",{"data-svelte-h":!0}),m(se)!=="svelte-1g0ulz8"&&(se.innerHTML=$n),es=i(t),f(ne.$$.fragment,t),ls=i(t),ie=p(t,"P",{"data-svelte-h":!0}),m(ie)!=="svelte-1ako6e6"&&(ie.innerHTML=wn),ss=i(t),ae=p(t,"P",{"data-svelte-h":!0}),m(ae)!=="svelte-1mi7wgc"&&(ae.innerHTML=Jn),ns=i(t),f(pe.$$.fragment,t),is=i(t),Me=p(t,"P",{}),fs(Me).forEach(l),this.h()},h(){ue(h,"name","hf:doc:metadata"),ue(h,"content",Wn),ue(d,"class","alert alert-block alert-info"),ps(g,"padding","10px"),ps(g,"border-left","5px solid #0078d4"),ps(g,"font-family","Arial, sans-serif"),ps(g,"margin","10px 0"),ue(v,"class","alert alert-block alert-info"),ue(j,"class","alert alert-block alert-info")},m(t,e){ye(document.head,h),s(t,ce,e),s(t,re,e),s(t,ge,e),r(C,t,e),s(t,he,e),r(T,t,e),s(t,be,e),r(U,t,e),s(t,de,e),s(t,$,e),s(t,ve,e),s(t,w,e),s(t,je,e),s(t,J,e),s(t,Ce,e),s(t,_,e),s(t,Te,e),s(t,x,e),s(t,Ue,e),r(k,t,e),s(t,$e,e),s(t,Z,e),s(t,we,e),r(I,t,e),s(t,Je,e),s(t,H,e),s(t,_e,e),r(L,t,e),s(t,xe,e),s(t,F,e),s(t,ke,e),r(G,t,e),s(t,Ze,e),s(t,d,e),s(t,Ie,e),s(t,z,e),s(t,He,e),r(W,t,e),s(t,Le,e),s(t,X,e),s(t,Fe,e),r(R,t,e),s(t,Ge,e),s(t,V,e),s(t,ze,e),r(N,t,e),s(t,We,e),s(t,B,e),s(t,Xe,e),s(t,q,e),s(t,Re,e),r(P,t,e),s(t,Ve,e),s(t,Y,e),s(t,Ne,e),s(t,A,e),s(t,Be,e),r(E,t,e),s(t,qe,e),s(t,Q,e),s(t,Pe,e),r(S,t,e),s(t,Ye,e),s(t,O,e),s(t,Ae,e),s(t,D,e),s(t,Ee,e),r(K,t,e),s(t,Qe,e),s(t,tt,e),s(t,Se,e),s(t,g,e),ye(g,me),ye(g,ms),r(et,g,null),ye(g,os),ye(g,oe),s(t,Oe,e),s(t,lt,e),s(t,De,e),s(t,st,e),s(t,Ke,e),s(t,nt,e),s(t,tl,e),s(t,it,e),s(t,el,e),s(t,at,e),s(t,ll,e),s(t,pt,e),s(t,sl,e),s(t,v,e),s(t,nl,e),r(mt,t,e),s(t,il,e),s(t,ot,e),s(t,al,e),s(t,ft,e),s(t,pl,e),s(t,rt,e),s(t,ml,e),s(t,Mt,e),s(t,ol,e),r(ut,t,e),s(t,fl,e),s(t,yt,e),s(t,rl,e),s(t,ct,e),s(t,Ml,e),s(t,gt,e),s(t,ul,e),s(t,ht,e),s(t,yl,e),r(bt,t,e),s(t,cl,e),s(t,dt,e),s(t,gl,e),s(t,vt,e),s(t,hl,e),s(t,jt,e),s(t,bl,e),s(t,Ct,e),s(t,dl,e),r(Tt,t,e),s(t,vl,e),s(t,Ut,e),s(t,jl,e),s(t,$t,e),s(t,Cl,e),r(wt,t,e),s(t,Tl,e),s(t,Jt,e),s(t,Ul,e),s(t,_t,e),s(t,$l,e),r(xt,t,e),s(t,wl,e),s(t,kt,e),s(t,Jl,e),r(Zt,t,e),s(t,_l,e),s(t,It,e),s(t,xl,e),s(t,Ht,e),s(t,kl,e),r(Lt,t,e),s(t,Zl,e),s(t,Ft,e),s(t,Il,e),s(t,Gt,e),s(t,Hl,e),r(zt,t,e),s(t,Ll,e),s(t,Wt,e),s(t,Fl,e),r(Xt,t,e),s(t,Gl,e),s(t,Rt,e),s(t,zl,e),s(t,Vt,e),s(t,Wl,e),r(Nt,t,e),s(t,Xl,e),s(t,Bt,e),s(t,Rl,e),s(t,qt,e),s(t,Vl,e),s(t,Pt,e),s(t,Nl,e),s(t,Yt,e),s(t,Bl,e),s(t,At,e),s(t,ql,e),s(t,Et,e),s(t,Pl,e),s(t,Qt,e),s(t,Yl,e),s(t,St,e),s(t,Al,e),s(t,Ot,e),s(t,El,e),s(t,j,e),s(t,Ql,e),r(Dt,t,e),s(t,Sl,e),s(t,Kt,e),s(t,Ol,e),s(t,te,e),s(t,Dl,e),s(t,ee,e),s(t,Kl,e),r(le,t,e),s(t,ts,e),s(t,se,e),s(t,es,e),r(ne,t,e),s(t,ls,e),s(t,ie,e),s(t,ss,e),s(t,ae,e),s(t,ns,e),r(pe,t,e),s(t,is,e),s(t,Me,e),as=!0},p:xn,i(t){as||(M(C.$$.fragment,t),M(T.$$.fragment,t),M(U.$$.fragment,t),M(k.$$.fragment,t),M(I.$$.fragment,t),M(L.$$.fragment,t),M(G.$$.fragment,t),M(W.$$.fragment,t),M(R.$$.fragment,t),M(N.$$.fragment,t),M(P.$$.fragment,t),M(E.$$.fragment,t),M(S.$$.fragment,t),M(K.$$.fragment,t),M(et.$$.fragment,t),M(mt.$$.fragment,t),M(ut.$$.fragment,t),M(bt.$$.fragment,t),M(Tt.$$.fragment,t),M(wt.$$.fragment,t),M(xt.$$.fragment,t),M(Zt.$$.fragment,t),M(Lt.$$.fragment,t),M(zt.$$.fragment,t),M(Xt.$$.fragment,t),M(Nt.$$.fragment,t),M(Dt.$$.fragment,t),M(le.$$.fragment,t),M(ne.$$.fragment,t),M(pe.$$.fragment,t),as=!0)},o(t){u(C.$$.fragment,t),u(T.$$.fragment,t),u(U.$$.fragment,t),u(k.$$.fragment,t),u(I.$$.fragment,t),u(L.$$.fragment,t),u(G.$$.fragment,t),u(W.$$.fragment,t),u(R.$$.fragment,t),u(N.$$.fragment,t),u(P.$$.fragment,t),u(E.$$.fragment,t),u(S.$$.fragment,t),u(K.$$.fragment,t),u(et.$$.fragment,t),u(mt.$$.fragment,t),u(ut.$$.fragment,t),u(bt.$$.fragment,t),u(Tt.$$.fragment,t),u(wt.$$.fragment,t),u(xt.$$.fragment,t),u(Zt.$$.fragment,t),u(Lt.$$.fragment,t),u(zt.$$.fragment,t),u(Xt.$$.fragment,t),u(Nt.$$.fragment,t),u(Dt.$$.fragment,t),u(le.$$.fragment,t),u(ne.$$.fragment,t),u(pe.$$.fragment,t),as=!1},d(t){t&&(l(ce),l(re),l(ge),l(he),l(be),l(de),l($),l(ve),l(w),l(je),l(J),l(Ce),l(_),l(Te),l(x),l(Ue),l($e),l(Z),l(we),l(Je),l(H),l(_e),l(xe),l(F),l(ke),l(Ze),l(d),l(Ie),l(z),l(He),l(Le),l(X),l(Fe),l(Ge),l(V),l(ze),l(We),l(B),l(Xe),l(q),l(Re),l(Ve),l(Y),l(Ne),l(A),l(Be),l(qe),l(Q),l(Pe),l(Ye),l(O),l(Ae),l(D),l(Ee),l(Qe),l(tt),l(Se),l(g),l(Oe),l(lt),l(De),l(st),l(Ke),l(nt),l(tl),l(it),l(el),l(at),l(ll),l(pt),l(sl),l(v),l(nl),l(il),l(ot),l(al),l(ft),l(pl),l(rt),l(ml),l(Mt),l(ol),l(fl),l(yt),l(rl),l(ct),l(Ml),l(gt),l(ul),l(ht),l(yl),l(cl),l(dt),l(gl),l(vt),l(hl),l(jt),l(bl),l(Ct),l(dl),l(vl),l(Ut),l(jl),l($t),l(Cl),l(Tl),l(Jt),l(Ul),l(_t),l($l),l(wl),l(kt),l(Jl),l(_l),l(It),l(xl),l(Ht),l(kl),l(Zl),l(Ft),l(Il),l(Gt),l(Hl),l(Ll),l(Wt),l(Fl),l(Gl),l(Rt),l(zl),l(Vt),l(Wl),l(Xl),l(Bt),l(Rl),l(qt),l(Vl),l(Pt),l(Nl),l(Yt),l(Bl),l(At),l(ql),l(Et),l(Pl),l(Qt),l(Yl),l(St),l(Al),l(Ot),l(El),l(j),l(Ql),l(Sl),l(Kt),l(Ol),l(te),l(Dl),l(ee),l(Kl),l(ts),l(se),l(es),l(ls),l(ie),l(ss),l(ae),l(ns),l(is),l(Me)),l(h),y(C,t),y(T,t),y(U,t),y(k,t),y(I,t),y(L,t),y(G,t),y(W,t),y(R,t),y(N,t),y(P,t),y(E,t),y(S,t),y(K,t),y(et),y(mt,t),y(ut,t),y(bt,t),y(Tt,t),y(wt,t),y(xt,t),y(Zt,t),y(Lt,t),y(zt,t),y(Xt,t),y(Nt,t),y(Dt,t),y(le,t),y(ne,t),y(pe,t)}}}const Wn='{"title":"分析艺术风格与多模态嵌入","local":"分析艺术风格与多模态嵌入","sections":[{"title":"让我们开始吧! 🚀","local":"让我们开始吧-","sections":[],"depth":2},{"title":"查找相似的艺术作品","local":"查找相似的艺术作品","sections":[],"depth":2},{"title":"通过聚类和可视化揭示艺术主题","local":"通过聚类和可视化揭示艺术主题","sections":[],"depth":2},{"title":"识别最独特的艺术作品","local":"识别最独特的艺术作品","sections":[],"depth":2},{"title":"通过视觉特征描述艺术作品","local":"通过视觉特征描述艺术作品","sections":[],"depth":2},{"title":"下一步是什么？","local":"下一步是什么","sections":[{"title":"📚 资源","local":"-资源","sections":[],"depth":3}],"depth":2},{"title":"FiftyOne 开源项目","local":"fiftyone-开源项目","sections":[],"depth":2}],"depth":1}';function Xn(rs){return kn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Pn extends Zn{constructor(h){super(),In(this,h,Xn,zn,_n,{})}}export{Pn as component};
