import{s as xt,n as wt,o as Jt}from"../chunks/scheduler.56730f09.js";import{S as vt,i as Ut,g as p,s as a,u as h,A as Tt,h as o,f as t,c as n,j,v as m,y as i,k as r,o as c,a as l,w as g,d as u,t as f,x as d}from"../chunks/index.ba464511.js";import{I as Vs}from"../chunks/IconCopyLink.89bde88e.js";import{C}from"../chunks/CodeBlock.2302fd0d.js";import{D as Ct}from"../chunks/DocNotebookDropdown.68fd8653.js";function $t(As){let y,rs,as,cs,b,w,ns,$,Fs,ts,Ps="제로샷(zero-shot) 이미지 분류",hs,k,ms,_,Ds="제로샷(zero-shot) 이미지 분류는 특정 카테고리의 예시가 포함된 데이터를 학습되지 않은 모델을 사용해 이미지 분류를 수행하는 작업입니다.",gs,Z,Ls=`일반적으로 이미지 분류를 위해서는 레이블이 달린 특정 이미지 데이터로 모델 학습이 필요하며, 이 모델은 특정 이미지의 특징을 레이블에 “매핑”하는 방법을 학습합니다.
새로운 레이블이 있는 분류 작업에 이러한 모델을 사용해야 하는 경우에는, 모델을 “재보정”하기 위해 미세 조정이 필요합니다.`,us,z,Ks=`이와 대조적으로, 제로샷 또는 개방형 어휘(open vocabulary) 이미지 분류 모델은 일반적으로 대규모 이미지 데이터와 해당 설명에 대해 학습된 멀티모달(multimodal) 모델입니다.
이러한 모델은 제로샷 이미지 분류를 포함한 많은 다운스트림 작업에 사용할 수 있는 정렬된(aligned) 비전 언어 표현을 학습합니다.`,fs,R,Os=`이는 이미지 분류에 대한 보다 유연한 접근 방식으로, 추가 학습 데이터 없이 새로운 레이블이나 학습하지 못한 카테고리에 대해 모델을 일반화할 수 있습니다.
또한, 사용자가 대상 개체에 대한 자유 형식의 텍스트 설명으로 이미지를 검색할 수 있습니다.`,ds,G,st="이번 가이드에서 배울 내용은 다음과 같습니다:",js,I,tt="<li>제로샷 이미지 분류 파이프라인 만들기</li> <li>직접 제로샷 이미지 분류 모델 추론 실행하기</li>",ys,E,et="시작하기 전에 필요한 라이브러리가 모두 설치되어 있는지 확인하세요:",bs,W,Ms,M,J,ps,B,Qs,es,lt="제로샷(zero-shot) 이미지 분류 파이프라인",xs,H,at=`<code>pipeline()</code>을 활용하면 가장 간단하게 제로샷 이미지 분류를 지원하는 모델로 추론해볼 수 있습니다.
<a href="https://huggingface.co/models?pipeline_tag=zero-shot-image-classification&amp;sort=downloads" rel="nofollow">Hugging Face Hub에 업로드된 체크포인트</a>에서 파이프라인을 인스턴스화합니다.`,ws,N,Js,Y,nt="다음으로, 분류하고 싶은 이미지를 선택하세요.",vs,q,Us,v,pt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/owl.jpg" alt="Photo of an owl"/>',Ts,S,ot=`이미지와 해당 이미지의 후보 레이블인 <code>candidate_labels</code>를 파이프라인으로 전달합니다.
여기서는 이미지를 직접 전달하지만, 컴퓨터에 저장된 이미지의 경로나 url로 전달할 수도 있습니다.
<code>candidate_labels</code>는 이 예시처럼 간단한 단어일 수도 있고 좀 더 설명적인 단어일 수도 있습니다.`,Cs,F,$s,x,U,os,Q,Xs,ls,it="직접 제로샷(zero-shot) 이미지 분류하기",ks,X,rt="이제 제로샷 이미지 분류 파이프라인 사용 방법을 살펴보았으니, 실행하는 방법을 살펴보겠습니다.",_s,V,ct=`<a href="https://huggingface.co/models?pipeline_tag=zero-shot-image-classification&amp;sort=downloads" rel="nofollow">Hugging Face Hub에 업로드된 체크포인트</a>에서 모델과 프로세서를 가져오는 것으로 시작합니다.
여기서는 이전과 동일한 체크포인트를 사용하겠습니다:`,Zs,A,zs,P,ht="다른 이미지를 사용해 보겠습니다.",Rs,D,Gs,T,mt='<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg" alt="Photo of a car"/>',Is,L,gt=`프로세서를 사용해 모델의 입력을 준비합니다.
프로세서는 모델의 입력으로 사용하기 위해 이미지 크기를 변환하고 정규화하는 이미지 프로세서와 텍스트 입력을 처리하는 토크나이저로 구성됩니다.`,Es,K,Ws,O,ut="모델에 입력을 전달하고, 결과를 후처리합니다:",Bs,ss,Hs,is,Ns;return $=new Vs({}),k=new Ct({props:{classNames:"absolute z-10 right-0 top-0",options:[{label:"Mixed",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/zero_shot_image_classification.ipynb"},{label:"PyTorch",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/zero_shot_image_classification.ipynb"},{label:"TensorFlow",value:"https://colab.research.google.com/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/zero_shot_image_classification.ipynb"},{label:"Mixed",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/zero_shot_image_classification.ipynb"},{label:"PyTorch",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/pytorch/zero_shot_image_classification.ipynb"},{label:"TensorFlow",value:"https://studiolab.sagemaker.aws/import/github/huggingface/notebooks/blob/main/transformers_doc/ko/tensorflow/zero_shot_image_classification.ipynb"}]}}),W=new C({props:{code:"cGlwJTIwaW5zdGFsbCUyMC1xJTIwdHJhbnNmb3JtZXJz",highlighted:"pip install -q transformers",wrap:!1}}),B=new Vs({}),N=new C({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMHBpcGVsaW5lJTBBJTBBY2hlY2twb2ludCUyMCUzRCUyMCUyMm9wZW5haSUyRmNsaXAtdml0LWxhcmdlLXBhdGNoMTQlMjIlMEFkZXRlY3RvciUyMCUzRCUyMHBpcGVsaW5lKG1vZGVsJTNEY2hlY2twb2ludCUyQyUyMHRhc2slM0QlMjJ6ZXJvLXNob3QtaW1hZ2UtY2xhc3NpZmljYXRpb24lMjIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> pipeline

<span class="hljs-meta">&gt;&gt;&gt; </span>checkpoint = <span class="hljs-string">&quot;openai/clip-vit-large-patch14&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>detector = pipeline(model=checkpoint, task=<span class="hljs-string">&quot;zero-shot-image-classification&quot;</span>)`,wrap:!1}}),q=new C({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRnVuc3BsYXNoLmNvbSUyRnBob3RvcyUyRmc4b1M4LTgyRHhJJTJGZG93bmxvYWQlM0ZpeGlkJTNETW53eE1qQTNmREI4TVh4MGIzQnBZM3g4U25Cbk5rdHBaR3d0U0d0OGZIeDhmREo4ZkRFMk56Z3hNRFl3T0RjJTI2Zm9yY2UlM0R0cnVlJTI2dyUzRDY0MCUyMiUwQWltYWdlJTIwJTNEJTIwSW1hZ2Uub3BlbihyZXF1ZXN0cy5nZXQodXJsJTJDJTIwc3RyZWFtJTNEVHJ1ZSkucmF3KSUwQSUwQWltYWdl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://unsplash.com/photos/g8oS8-82DxI/download?ixid=MnwxMjA3fDB8MXx0b3BpY3x8SnBnNktpZGwtSGt8fHx8fDJ8fDE2NzgxMDYwODc&amp;force=true&amp;w=640&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image`,wrap:!1}}),F=new C({props:{code:"cHJlZGljdGlvbnMlMjAlM0QlMjBjbGFzc2lmaWVyKGltYWdlJTJDJTIwY2FuZGlkYXRlX2xhYmVscyUzRCU1QiUyMmZveCUyMiUyQyUyMCUyMmJlYXIlMjIlMkMlMjAlMjJzZWFndWxsJTIyJTJDJTIwJTIyb3dsJTIyJTVEKSUwQXByZWRpY3Rpb25z",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>predictions = classifier(image, candidate_labels=[<span class="hljs-string">&quot;fox&quot;</span>, <span class="hljs-string">&quot;bear&quot;</span>, <span class="hljs-string">&quot;seagull&quot;</span>, <span class="hljs-string">&quot;owl&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>predictions
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.9996670484542847</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;owl&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.000199399160919711</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;seagull&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">7.392891711788252e-05</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;fox&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">5.96074532950297e-05</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;bear&#x27;</span>}]`,wrap:!1}}),Q=new Vs({}),A=new C({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Qcm9jZXNzb3IlMkMlMjBBdXRvTW9kZWxGb3JaZXJvU2hvdEltYWdlQ2xhc3NpZmljYXRpb24lMEElMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclplcm9TaG90SW1hZ2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoY2hlY2twb2ludCklMEFwcm9jZXNzb3IlMjAlM0QlMjBBdXRvUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChjaGVja3BvaW50KQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoProcessor, AutoModelForZeroShotImageClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>model = AutoModelForZeroShotImageClassification.from_pretrained(checkpoint)
<span class="hljs-meta">&gt;&gt;&gt; </span>processor = AutoProcessor.from_pretrained(checkpoint)`,wrap:!1}}),D=new C({props:{code:"ZnJvbSUyMFBJTCUyMGltcG9ydCUyMEltYWdlJTBBaW1wb3J0JTIwcmVxdWVzdHMlMEElMEF1cmwlMjAlM0QlMjAlMjJodHRwcyUzQSUyRiUyRnVuc3BsYXNoLmNvbSUyRnBob3RvcyUyRnhCUlFmUjJicU5JJTJGZG93bmxvYWQlM0ZpeGlkJTNETW53eE1qQTNmREI4TVh4aGJHeDhmSHg4Zkh4OGZId3hOamM0TXpnNE9ERXglMjZmb3JjZSUzRHRydWUlMjZ3JTNENjQwJTIyJTBBaW1hZ2UlMjAlM0QlMjBJbWFnZS5vcGVuKHJlcXVlc3RzLmdldCh1cmwlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW1hZ2U=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> requests

<span class="hljs-meta">&gt;&gt;&gt; </span>url = <span class="hljs-string">&quot;https://unsplash.com/photos/xBRQfR2bqNI/download?ixid=MnwxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNjc4Mzg4ODEx&amp;force=true&amp;w=640&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>image = Image.<span class="hljs-built_in">open</span>(requests.get(url, stream=<span class="hljs-literal">True</span>).raw)

<span class="hljs-meta">&gt;&gt;&gt; </span>image`,wrap:!1}}),K=new C({props:{code:"Y2FuZGlkYXRlX2xhYmVscyUyMCUzRCUyMCU1QiUyMnRyZWUlMjIlMkMlMjAlMjJjYXIlMjIlMkMlMjAlMjJiaWtlJTIyJTJDJTIwJTIyY2F0JTIyJTVEJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwdGV4dCUzRGNhbmRpZGF0ZV9sYWJlbHMlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>candidate_labels = [<span class="hljs-string">&quot;tree&quot;</span>, <span class="hljs-string">&quot;car&quot;</span>, <span class="hljs-string">&quot;bike&quot;</span>, <span class="hljs-string">&quot;cat&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = processor(images=image, text=candidate_labels, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)`,wrap:!1}}),ss=new C({props:{code:"aW1wb3J0JTIwdG9yY2glMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzX3Blcl9pbWFnZSU1QjAlNUQlMEFwcm9icyUyMCUzRCUyMGxvZ2l0cy5zb2Z0bWF4KGRpbSUzRC0xKS5udW1weSgpJTBBc2NvcmVzJTIwJTNEJTIwcHJvYnMudG9saXN0KCklMEElMEFyZXN1bHQlMjAlM0QlMjAlNUIlMEElMjAlMjAlMjAlMjAlN0IlMjJzY29yZSUyMiUzQSUyMHNjb3JlJTJDJTIwJTIybGFiZWwlMjIlM0ElMjBjYW5kaWRhdGVfbGFiZWwlN0QlMEElMjAlMjAlMjAlMjBmb3IlMjBzY29yZSUyQyUyMGNhbmRpZGF0ZV9sYWJlbCUyMGluJTIwc29ydGVkKHppcChwcm9icyUyQyUyMGNhbmRpZGF0ZV9sYWJlbHMpJTJDJTIwa2V5JTNEbGFtYmRhJTIweCUzQSUyMC14JTVCMCU1RCklMEElNUQlMEElMEFyZXN1bHQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits_per_image[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>probs = logits.softmax(dim=-<span class="hljs-number">1</span>).numpy()
<span class="hljs-meta">&gt;&gt;&gt; </span>scores = probs.tolist()

<span class="hljs-meta">&gt;&gt;&gt; </span>result = [
<span class="hljs-meta">... </span>    {<span class="hljs-string">&quot;score&quot;</span>: score, <span class="hljs-string">&quot;label&quot;</span>: candidate_label}
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> score, candidate_label <span class="hljs-keyword">in</span> <span class="hljs-built_in">sorted</span>(<span class="hljs-built_in">zip</span>(probs, candidate_labels), key=<span class="hljs-keyword">lambda</span> x: -x[<span class="hljs-number">0</span>])
<span class="hljs-meta">... </span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>result
[{<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.998572</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;car&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0010570387</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;bike&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">0.0003393686</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;tree&#x27;</span>},
 {<span class="hljs-string">&#x27;score&#x27;</span>: <span class="hljs-number">3.1572064e-05</span>, <span class="hljs-string">&#x27;label&#x27;</span>: <span class="hljs-string">&#x27;cat&#x27;</span>}]`,wrap:!1}}),{c(){y=p("meta"),rs=a(),as=p("p"),cs=a(),b=p("h1"),w=p("a"),ns=p("span"),h($.$$.fragment),Fs=a(),ts=p("span"),ts.textContent=Ps,hs=a(),h(k.$$.fragment),ms=a(),_=p("p"),_.textContent=Ds,gs=a(),Z=p("p"),Z.textContent=Ls,us=a(),z=p("p"),z.textContent=Ks,fs=a(),R=p("p"),R.textContent=Os,ds=a(),G=p("p"),G.textContent=st,js=a(),I=p("ul"),I.innerHTML=tt,ys=a(),E=p("p"),E.textContent=et,bs=a(),h(W.$$.fragment),Ms=a(),M=p("h2"),J=p("a"),ps=p("span"),h(B.$$.fragment),Qs=a(),es=p("span"),es.textContent=lt,xs=a(),H=p("p"),H.innerHTML=at,ws=a(),h(N.$$.fragment),Js=a(),Y=p("p"),Y.textContent=nt,vs=a(),h(q.$$.fragment),Us=a(),v=p("div"),v.innerHTML=pt,Ts=a(),S=p("p"),S.innerHTML=ot,Cs=a(),h(F.$$.fragment),$s=a(),x=p("h2"),U=p("a"),os=p("span"),h(Q.$$.fragment),Xs=a(),ls=p("span"),ls.textContent=it,ks=a(),X=p("p"),X.textContent=rt,_s=a(),V=p("p"),V.innerHTML=ct,Zs=a(),h(A.$$.fragment),zs=a(),P=p("p"),P.textContent=ht,Rs=a(),h(D.$$.fragment),Gs=a(),T=p("div"),T.innerHTML=mt,Is=a(),L=p("p"),L.textContent=gt,Es=a(),h(K.$$.fragment),Ws=a(),O=p("p"),O.textContent=ut,Bs=a(),h(ss.$$.fragment),Hs=a(),is=p("p"),this.h()},l(s){const e=Tt("svelte-1phssyn",document.head);y=o(e,"META",{name:!0,content:!0}),e.forEach(t),rs=n(s),as=o(s,"P",{}),j(as).forEach(t),cs=n(s),b=o(s,"H1",{class:!0});var Ys=j(b);w=o(Ys,"A",{id:!0,class:!0,href:!0});var ft=j(w);ns=o(ft,"SPAN",{});var dt=j(ns);m($.$$.fragment,dt),dt.forEach(t),ft.forEach(t),Fs=n(Ys),ts=o(Ys,"SPAN",{"data-svelte-h":!0}),i(ts)!=="svelte-13peh4q"&&(ts.textContent=Ps),Ys.forEach(t),hs=n(s),m(k.$$.fragment,s),ms=n(s),_=o(s,"P",{"data-svelte-h":!0}),i(_)!=="svelte-1ohgv1c"&&(_.textContent=Ds),gs=n(s),Z=o(s,"P",{"data-svelte-h":!0}),i(Z)!=="svelte-w8qz18"&&(Z.textContent=Ls),us=n(s),z=o(s,"P",{"data-svelte-h":!0}),i(z)!=="svelte-o87ayh"&&(z.textContent=Ks),fs=n(s),R=o(s,"P",{"data-svelte-h":!0}),i(R)!=="svelte-ryenqj"&&(R.textContent=Os),ds=n(s),G=o(s,"P",{"data-svelte-h":!0}),i(G)!=="svelte-pdyjx9"&&(G.textContent=st),js=n(s),I=o(s,"UL",{"data-svelte-h":!0}),i(I)!=="svelte-1nsu74x"&&(I.innerHTML=tt),ys=n(s),E=o(s,"P",{"data-svelte-h":!0}),i(E)!=="svelte-1k0z9pm"&&(E.textContent=et),bs=n(s),m(W.$$.fragment,s),Ms=n(s),M=o(s,"H2",{class:!0});var qs=j(M);J=o(qs,"A",{id:!0,class:!0,href:!0});var jt=j(J);ps=o(jt,"SPAN",{});var yt=j(ps);m(B.$$.fragment,yt),yt.forEach(t),jt.forEach(t),Qs=n(qs),es=o(qs,"SPAN",{"data-svelte-h":!0}),i(es)!=="svelte-68pkpu"&&(es.textContent=lt),qs.forEach(t),xs=n(s),H=o(s,"P",{"data-svelte-h":!0}),i(H)!=="svelte-jljpqr"&&(H.innerHTML=at),ws=n(s),m(N.$$.fragment,s),Js=n(s),Y=o(s,"P",{"data-svelte-h":!0}),i(Y)!=="svelte-tza26b"&&(Y.textContent=nt),vs=n(s),m(q.$$.fragment,s),Us=n(s),v=o(s,"DIV",{class:!0,"data-svelte-h":!0}),i(v)!=="svelte-10yxso1"&&(v.innerHTML=pt),Ts=n(s),S=o(s,"P",{"data-svelte-h":!0}),i(S)!=="svelte-1vlt2d5"&&(S.innerHTML=ot),Cs=n(s),m(F.$$.fragment,s),$s=n(s),x=o(s,"H2",{class:!0});var Ss=j(x);U=o(Ss,"A",{id:!0,class:!0,href:!0});var bt=j(U);os=o(bt,"SPAN",{});var Mt=j(os);m(Q.$$.fragment,Mt),Mt.forEach(t),bt.forEach(t),Xs=n(Ss),ls=o(Ss,"SPAN",{"data-svelte-h":!0}),i(ls)!=="svelte-1ieyrm4"&&(ls.textContent=it),Ss.forEach(t),ks=n(s),X=o(s,"P",{"data-svelte-h":!0}),i(X)!=="svelte-chmorg"&&(X.textContent=rt),_s=n(s),V=o(s,"P",{"data-svelte-h":!0}),i(V)!=="svelte-1to009q"&&(V.innerHTML=ct),Zs=n(s),m(A.$$.fragment,s),zs=n(s),P=o(s,"P",{"data-svelte-h":!0}),i(P)!=="svelte-qe32ys"&&(P.textContent=ht),Rs=n(s),m(D.$$.fragment,s),Gs=n(s),T=o(s,"DIV",{class:!0,"data-svelte-h":!0}),i(T)!=="svelte-1kfxibh"&&(T.innerHTML=mt),Is=n(s),L=o(s,"P",{"data-svelte-h":!0}),i(L)!=="svelte-sjszr1"&&(L.textContent=gt),Es=n(s),m(K.$$.fragment,s),Ws=n(s),O=o(s,"P",{"data-svelte-h":!0}),i(O)!=="svelte-11wh2d9"&&(O.textContent=ut),Bs=n(s),m(ss.$$.fragment,s),Hs=n(s),is=o(s,"P",{}),j(is).forEach(t),this.h()},h(){r(y,"name","hf:doc:metadata"),r(y,"content",JSON.stringify(kt)),r(w,"id","zeroshot-image-classification"),r(w,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),r(w,"href","#zeroshot-image-classification"),r(b,"class","relative group"),r(J,"id","zeroshot-image-classification-pipeline"),r(J,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),r(J,"href","#zeroshot-image-classification-pipeline"),r(M,"class","relative group"),r(v,"class","flex justify-center"),r(U,"id","zeroshot-image-classification-by-hand"),r(U,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),r(U,"href","#zeroshot-image-classification-by-hand"),r(x,"class","relative group"),r(T,"class","flex justify-center")},m(s,e){c(document.head,y),l(s,rs,e),l(s,as,e),l(s,cs,e),l(s,b,e),c(b,w),c(w,ns),g($,ns,null),c(b,Fs),c(b,ts),l(s,hs,e),g(k,s,e),l(s,ms,e),l(s,_,e),l(s,gs,e),l(s,Z,e),l(s,us,e),l(s,z,e),l(s,fs,e),l(s,R,e),l(s,ds,e),l(s,G,e),l(s,js,e),l(s,I,e),l(s,ys,e),l(s,E,e),l(s,bs,e),g(W,s,e),l(s,Ms,e),l(s,M,e),c(M,J),c(J,ps),g(B,ps,null),c(M,Qs),c(M,es),l(s,xs,e),l(s,H,e),l(s,ws,e),g(N,s,e),l(s,Js,e),l(s,Y,e),l(s,vs,e),g(q,s,e),l(s,Us,e),l(s,v,e),l(s,Ts,e),l(s,S,e),l(s,Cs,e),g(F,s,e),l(s,$s,e),l(s,x,e),c(x,U),c(U,os),g(Q,os,null),c(x,Xs),c(x,ls),l(s,ks,e),l(s,X,e),l(s,_s,e),l(s,V,e),l(s,Zs,e),g(A,s,e),l(s,zs,e),l(s,P,e),l(s,Rs,e),g(D,s,e),l(s,Gs,e),l(s,T,e),l(s,Is,e),l(s,L,e),l(s,Es,e),g(K,s,e),l(s,Ws,e),l(s,O,e),l(s,Bs,e),g(ss,s,e),l(s,Hs,e),l(s,is,e),Ns=!0},p:wt,i(s){Ns||(u($.$$.fragment,s),u(k.$$.fragment,s),u(W.$$.fragment,s),u(B.$$.fragment,s),u(N.$$.fragment,s),u(q.$$.fragment,s),u(F.$$.fragment,s),u(Q.$$.fragment,s),u(A.$$.fragment,s),u(D.$$.fragment,s),u(K.$$.fragment,s),u(ss.$$.fragment,s),Ns=!0)},o(s){f($.$$.fragment,s),f(k.$$.fragment,s),f(W.$$.fragment,s),f(B.$$.fragment,s),f(N.$$.fragment,s),f(q.$$.fragment,s),f(F.$$.fragment,s),f(Q.$$.fragment,s),f(A.$$.fragment,s),f(D.$$.fragment,s),f(K.$$.fragment,s),f(ss.$$.fragment,s),Ns=!1},d(s){s&&(t(rs),t(as),t(cs),t(b),t(hs),t(ms),t(_),t(gs),t(Z),t(us),t(z),t(fs),t(R),t(ds),t(G),t(js),t(I),t(ys),t(E),t(bs),t(Ms),t(M),t(xs),t(H),t(ws),t(Js),t(Y),t(vs),t(Us),t(v),t(Ts),t(S),t(Cs),t($s),t(x),t(ks),t(X),t(_s),t(V),t(Zs),t(zs),t(P),t(Rs),t(Gs),t(T),t(Is),t(L),t(Es),t(Ws),t(O),t(Bs),t(Hs),t(is)),t(y),d($),d(k,s),d(W,s),d(B),d(N,s),d(q,s),d(F,s),d(Q),d(A,s),d(D,s),d(K,s),d(ss,s)}}}const kt={local:"zeroshot-image-classification",sections:[{local:"zeroshot-image-classification-pipeline",title:"제로샷(zero-shot) 이미지 분류 파이프라인"},{local:"zeroshot-image-classification-by-hand",title:"직접 제로샷(zero-shot) 이미지 분류하기"}],title:"제로샷(zero-shot) 이미지 분류"};function _t(As){return Jt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Et extends vt{constructor(y){super(),Ut(this,y,_t,$t,xt,{})}}export{Et as component};
