import{S as pr,i as hr,s as fr,e as t,k as m,w as b,t as l,M as ur,c as a,d as s,m as p,a as n,x as w,h as i,b as d,N as gr,G as o,g as f,y as v,q as T,o as j,B as E,v as Mr,L as st}from"../../chunks/vendor-hf-doc-builder.js";import{T as ln}from"../../chunks/Tip-hf-doc-builder.js";import{D as x}from"../../chunks/Docstring-hf-doc-builder.js";import{C as tt}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ee}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as ot}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function _r(J){let h,y,M,u,_;return u=new tt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFZpZGVvTUFFQ29uZmlnJTJDJTIwVmlkZW9NQUVNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBWaWRlb01BRSUyMHZpZGVvbWFlLWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwVmlkZW9NQUVDb25maWcoKSUwQSUwQSUyMyUyMFJhbmRvbWx5JTIwaW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFZpZGVvTUFFTW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> VideoMAEConfig, VideoMAEModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a VideoMAE videomae-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = VideoMAEConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Randomly initializing a model from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VideoMAEModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){h=t("p"),y=l("Example:"),M=m(),b(u.$$.fragment)},l(r){h=a(r,"P",{});var g=n(h);y=i(g,"Example:"),g.forEach(s),M=p(r),w(u.$$.fragment,r)},m(r,g){f(r,h,g),o(h,y),f(r,M,g),v(u,r,g),_=!0},p:st,i(r){_||(T(u.$$.fragment,r),_=!0)},o(r){j(u.$$.fragment,r),_=!1},d(r){r&&s(h),r&&s(M),E(u,r)}}}function yr(J){let h,y,M,u,_;return{c(){h=t("p"),y=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),M=t("code"),u=l("Module"),_=l(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){h=a(r,"P",{});var g=n(h);y=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),M=a(g,"CODE",{});var V=n(M);u=i(V,"Module"),V.forEach(s),_=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(s)},m(r,g){f(r,h,g),o(h,y),o(h,M),o(M,u),o(h,_)},d(r){r&&s(h)}}}function br(J){let h,y,M,u,_;return u=new tt({props:{code:"aW1wb3J0JTIwYXYlMEFpbXBvcnQlMjBudW1weSUyMGFzJTIwbnAlMEElMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b0ltYWdlUHJvY2Vzc29yJTJDJTIwVmlkZW9NQUVNb2RlbCUwQWZyb20lMjBodWdnaW5nZmFjZV9odWIlMjBpbXBvcnQlMjBoZl9odWJfZG93bmxvYWQlMEElMEFucC5yYW5kb20uc2VlZCgwKSUwQSUwQSUwQWRlZiUyMHJlYWRfdmlkZW9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nZV9wcm9jZXNzb3IobGlzdCh2aWRlbyklMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMGZvcndhcmQlMjBwYXNzJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGUlMEFsaXN0KGxhc3RfaGlkZGVuX3N0YXRlcy5zaGFwZSk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> av
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, VideoMAEModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download

<span class="hljs-meta">&gt;&gt;&gt; </span>np.random.seed(<span class="hljs-number">0</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">read_video_pyav</span>(<span class="hljs-params">container, indices</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Decode the video with PyAV decoder.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        container (\`av.container.input.InputContainer\`): PyAV container.
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of frame indices to decode.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        result (np.ndarray): np array of decoded frames of shape (num_frames, height, width, 3).
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    frames = []
<span class="hljs-meta">... </span>    container.seek(<span class="hljs-number">0</span>)
<span class="hljs-meta">... </span>    start_index = indices[<span class="hljs-number">0</span>]
<span class="hljs-meta">... </span>    end_index = indices[-<span class="hljs-number">1</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> i, frame <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(container.decode(video=<span class="hljs-number">0</span>)):
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt; end_index:
<span class="hljs-meta">... </span>            <span class="hljs-keyword">break</span>
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt;= start_index <span class="hljs-keyword">and</span> i <span class="hljs-keyword">in</span> indices:
<span class="hljs-meta">... </span>            frames.append(frame)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> np.stack([x.to_ndarray(<span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;rgb24&quot;</span>) <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> frames])


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">sample_frame_indices</span>(<span class="hljs-params">clip_len, frame_sample_rate, seg_len</span>):
<span class="hljs-meta">... </span>    converted_len = <span class="hljs-built_in">int</span>(clip_len * frame_sample_rate)
<span class="hljs-meta">... </span>    end_idx = np.random.randint(converted_len, seg_len)
<span class="hljs-meta">... </span>    start_idx = end_idx - converted_len
<span class="hljs-meta">... </span>    indices = np.linspace(start_idx, end_idx, num=clip_len)
<span class="hljs-meta">... </span>    indices = np.clip(indices, start_idx, end_idx - <span class="hljs-number">1</span>).astype(np.int64)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> indices


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># video clip consists of 300 frames (10 seconds at 30 FPS)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>file_path = hf_hub_download(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;nielsr/video-demo&quot;</span>, filename=<span class="hljs-string">&quot;eating_spaghetti.mp4&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>container = av.<span class="hljs-built_in">open</span>(file_path)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># sample 16 frames</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = sample_frame_indices(clip_len=<span class="hljs-number">16</span>, frame_sample_rate=<span class="hljs-number">1</span>, seg_len=container.streams.video[<span class="hljs-number">0</span>].frames)
<span class="hljs-meta">&gt;&gt;&gt; </span>video = read_video_pyav(container, indices)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VideoMAEModel.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># prepare video for the model</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(<span class="hljs-built_in">list</span>(video), return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># forward pass</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(last_hidden_states.shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">1568</span>, <span class="hljs-number">768</span>]`}}),{c(){h=t("p"),y=l("Examples:"),M=m(),b(u.$$.fragment)},l(r){h=a(r,"P",{});var g=n(h);y=i(g,"Examples:"),g.forEach(s),M=p(r),w(u.$$.fragment,r)},m(r,g){f(r,h,g),o(h,y),f(r,M,g),v(u,r,g),_=!0},p:st,i(r){_||(T(u.$$.fragment,r),_=!0)},o(r){j(u.$$.fragment,r),_=!1},d(r){r&&s(h),r&&s(M),E(u,r)}}}function wr(J){let h,y,M,u,_;return{c(){h=t("p"),y=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),M=t("code"),u=l("Module"),_=l(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){h=a(r,"P",{});var g=n(h);y=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),M=a(g,"CODE",{});var V=n(M);u=i(V,"Module"),V.forEach(s),_=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(s)},m(r,g){f(r,h,g),o(h,y),o(h,M),o(M,u),o(h,_)},d(r){r&&s(h)}}}function vr(J){let h,y,M,u,_;return u=new tt({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9JbWFnZVByb2Nlc3NvciUyQyUyMFZpZGVvTUFFRm9yUHJlVHJhaW5pbmclMEFpbXBvcnQlMjBudW1weSUyMGFzJTIwbnAlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQW51bV9mcmFtZXMlMjAlM0QlMjAxNiUwQXZpZGVvJTIwJTNEJTIwbGlzdChucC5yYW5kb20ucmFuZGludCgwJTJDJTIwMjU2JTJDJTIwKG51bV9mcmFtZXMlMkMlMjAzJTJDJTIwMjI0JTJDJTIwMjI0KSkpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJNQ0ctTkpVJTJGdmlkZW9tYWUtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFZpZGVvTUFFRm9yUHJlVHJhaW5pbmcuZnJvbV9wcmV0cmFpbmVkKCUyMk1DRy1OSlUlMkZ2aWRlb21hZS1iYXNlJTIyKSUwQSUwQXBpeGVsX3ZhbHVlcyUyMCUzRCUyMGltYWdlX3Byb2Nlc3Nvcih2aWRlbyUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpLnBpeGVsX3ZhbHVlcyUwQSUwQW51bV9wYXRjaGVzX3Blcl9mcmFtZSUyMCUzRCUyMChtb2RlbC5jb25maWcuaW1hZ2Vfc2l6ZSUyMCUyRiUyRiUyMG1vZGVsLmNvbmZpZy5wYXRjaF9zaXplKSUyMCoqJTIwMiUwQXNlcV9sZW5ndGglMjAlM0QlMjAobnVtX2ZyYW1lcyUyMCUyRiUyRiUyMG1vZGVsLmNvbmZpZy50dWJlbGV0X3NpemUpJTIwKiUyMG51bV9wYXRjaGVzX3Blcl9mcmFtZSUwQWJvb2xfbWFza2VkX3BvcyUyMCUzRCUyMHRvcmNoLnJhbmRpbnQoMCUyQyUyMDIlMkMlMjAoMSUyQyUyMHNlcV9sZW5ndGgpKS5ib29sKCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwocGl4ZWxfdmFsdWVzJTJDJTIwYm9vbF9tYXNrZWRfcG9zJTNEYm9vbF9tYXNrZWRfcG9zKSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3M=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, VideoMAEForPreTraining
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>num_frames = <span class="hljs-number">16</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>video = <span class="hljs-built_in">list</span>(np.random.randint(<span class="hljs-number">0</span>, <span class="hljs-number">256</span>, (num_frames, <span class="hljs-number">3</span>, <span class="hljs-number">224</span>, <span class="hljs-number">224</span>)))

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VideoMAEForPreTraining.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>pixel_values = image_processor(video, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).pixel_values

<span class="hljs-meta">&gt;&gt;&gt; </span>num_patches_per_frame = (model.config.image_size // model.config.patch_size) ** <span class="hljs-number">2</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>seq_length = (num_frames // model.config.tubelet_size) * num_patches_per_frame
<span class="hljs-meta">&gt;&gt;&gt; </span>bool_masked_pos = torch.randint(<span class="hljs-number">0</span>, <span class="hljs-number">2</span>, (<span class="hljs-number">1</span>, seq_length)).<span class="hljs-built_in">bool</span>()

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(pixel_values, bool_masked_pos=bool_masked_pos)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){h=t("p"),y=l("Examples:"),M=m(),b(u.$$.fragment)},l(r){h=a(r,"P",{});var g=n(h);y=i(g,"Examples:"),g.forEach(s),M=p(r),w(u.$$.fragment,r)},m(r,g){f(r,h,g),o(h,y),f(r,M,g),v(u,r,g),_=!0},p:st,i(r){_||(T(u.$$.fragment,r),_=!0)},o(r){j(u.$$.fragment,r),_=!1},d(r){r&&s(h),r&&s(M),E(u,r)}}}function Tr(J){let h,y,M,u,_;return{c(){h=t("p"),y=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),M=t("code"),u=l("Module"),_=l(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(r){h=a(r,"P",{});var g=n(h);y=i(g,"Although the recipe for forward pass needs to be defined within this function, one should call the "),M=a(g,"CODE",{});var V=n(M);u=i(V,"Module"),V.forEach(s),_=i(g,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),g.forEach(s)},m(r,g){f(r,h,g),o(h,y),o(h,M),o(M,u),o(h,_)},d(r){r&&s(h)}}}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cmVhZF92aWRlb19weWF2KGNvbnRhaW5lciUyQyUyMGluZGljZXMpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJNQ0ctTkpVJTJGdmlkZW9tYWUtYmFzZS1maW5ldHVuZWQta2luZXRpY3MlMjIpJTBBbW9kZWwlMjAlM0QlMjBWaWRlb01BRUZvclZpZGVvQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMk1DRy1OSlUlMkZ2aWRlb21hZS1iYXNlLWZpbmV0dW5lZC1raW5ldGljcyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IobGlzdCh2aWRlbyklMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjA0MDAlMjBLaW5ldGljcy00MDAlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> av
<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">import</span> numpy <span class="hljs-keyword">as</span> np

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, VideoMAEForVideoClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> hf_hub_download

<span class="hljs-meta">&gt;&gt;&gt; </span>np.random.seed(<span class="hljs-number">0</span>)


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">read_video_pyav</span>(<span class="hljs-params">container, indices</span>):
<span class="hljs-meta">... </span>    <span class="hljs-string">&#x27;&#x27;&#x27;
<span class="hljs-meta">... </span>    Decode the video with PyAV decoder.
<span class="hljs-meta">... </span>    Args:
<span class="hljs-meta">... </span>        container (\`av.container.input.InputContainer\`): PyAV container.
<span class="hljs-meta">... </span>        indices (\`List[int]\`): List of frame indices to decode.
<span class="hljs-meta">... </span>    Returns:
<span class="hljs-meta">... </span>        result (np.ndarray): np array of decoded frames of shape (num_frames, height, width, 3).
<span class="hljs-meta">... </span>    &#x27;&#x27;&#x27;</span>
<span class="hljs-meta">... </span>    frames = []
<span class="hljs-meta">... </span>    container.seek(<span class="hljs-number">0</span>)
<span class="hljs-meta">... </span>    start_index = indices[<span class="hljs-number">0</span>]
<span class="hljs-meta">... </span>    end_index = indices[-<span class="hljs-number">1</span>]
<span class="hljs-meta">... </span>    <span class="hljs-keyword">for</span> i, frame <span class="hljs-keyword">in</span> <span class="hljs-built_in">enumerate</span>(container.decode(video=<span class="hljs-number">0</span>)):
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt; end_index:
<span class="hljs-meta">... </span>            <span class="hljs-keyword">break</span>
<span class="hljs-meta">... </span>        <span class="hljs-keyword">if</span> i &gt;= start_index <span class="hljs-keyword">and</span> i <span class="hljs-keyword">in</span> indices:
<span class="hljs-meta">... </span>            frames.append(frame)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> np.stack([x.to_ndarray(<span class="hljs-built_in">format</span>=<span class="hljs-string">&quot;rgb24&quot;</span>) <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> frames])


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">def</span> <span class="hljs-title function_">sample_frame_indices</span>(<span class="hljs-params">clip_len, frame_sample_rate, seg_len</span>):
<span class="hljs-meta">... </span>    converted_len = <span class="hljs-built_in">int</span>(clip_len * frame_sample_rate)
<span class="hljs-meta">... </span>    end_idx = np.random.randint(converted_len, seg_len)
<span class="hljs-meta">... </span>    start_idx = end_idx - converted_len
<span class="hljs-meta">... </span>    indices = np.linspace(start_idx, end_idx, num=clip_len)
<span class="hljs-meta">... </span>    indices = np.clip(indices, start_idx, end_idx - <span class="hljs-number">1</span>).astype(np.int64)
<span class="hljs-meta">... </span>    <span class="hljs-keyword">return</span> indices


<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># video clip consists of 300 frames (10 seconds at 30 FPS)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>file_path = hf_hub_download(
<span class="hljs-meta">... </span>    repo_id=<span class="hljs-string">&quot;nielsr/video-demo&quot;</span>, filename=<span class="hljs-string">&quot;eating_spaghetti.mp4&quot;</span>, repo_type=<span class="hljs-string">&quot;dataset&quot;</span>
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>container = av.<span class="hljs-built_in">open</span>(file_path)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># sample 16 frames</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>indices = sample_frame_indices(clip_len=<span class="hljs-number">16</span>, frame_sample_rate=<span class="hljs-number">1</span>, seg_len=container.streams.video[<span class="hljs-number">0</span>].frames)
<span class="hljs-meta">&gt;&gt;&gt; </span>video = read_video_pyav(container, indices)

<span class="hljs-meta">&gt;&gt;&gt; </span>image_processor = AutoImageProcessor.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base-finetuned-kinetics&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = VideoMAEForVideoClassification.from_pretrained(<span class="hljs-string">&quot;MCG-NJU/videomae-base-finetuned-kinetics&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = image_processor(<span class="hljs-built_in">list</span>(video), return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<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">... </span>    logits = outputs.logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># model predicts one of the 400 Kinetics-400 classes</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_label = logits.argmax(-<span class="hljs-number">1</span>).item()
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">print</span>(model.config.id2label[predicted_label])
eating spaghetti`}}),{c(){h=t("p"),y=l("Examples:"),M=m(),b(u.$$.fragment)},l(r){h=a(r,"P",{});var g=n(h);y=i(g,"Examples:"),g.forEach(s),M=p(r),w(u.$$.fragment,r)},m(r,g){f(r,h,g),o(h,y),f(r,M,g),v(u,r,g),_=!0},p:st,i(r){_||(T(u.$$.fragment,r),_=!0)},o(r){j(u.$$.fragment,r),_=!1},d(r){r&&s(h),r&&s(M),E(u,r)}}}function Er(J){let h,y,M,u,_,r,g,V,at,hs,G,oe,Fo,Ee,nt,zo,rt,fs,F,lt,Je,it,dt,no,ct,mt,us,ro,pt,gs,lo,Bo,ht,Ms,io,ft,_s,se,Ve,ut,co,gt,Mt,_t,mo,po,yt,bt,ys,te,dn,bs,ae,wt,ho,vt,Tt,ws,z,jt,Ae,Et,Jt,Ie,Vt,At,vs,N,ne,Go,Ue,It,No,Ut,Ts,fo,Zt,js,uo,Ro,kt,Es,B,go,Ze,Ct,$t,Wt,So,Mo,xt,Ft,_o,ke,zt,Bt,Js,R,re,Po,Ce,Gt,Xo,Nt,Vs,A,$e,Rt,S,St,yo,Pt,Xt,We,Yt,Qt,Dt,P,Ht,bo,qt,Lt,wo,Kt,Ot,ea,le,As,X,ie,Yo,xe,oa,Qo,sa,Is,Y,Fe,ta,de,ze,aa,Do,na,Us,Q,ce,Ho,Be,ra,qo,la,Zs,k,Ge,ia,Lo,da,ca,me,Ne,ma,Ko,pa,ks,D,pe,Oo,Re,ha,es,fa,Cs,C,Se,ua,Pe,ga,Xe,Ma,_a,ya,I,Ye,ba,H,wa,vo,va,Ta,os,ja,Ea,Ja,he,Va,fe,$s,q,ue,ss,Qe,Aa,ts,Ia,Ws,$,De,Ua,He,Za,qe,ka,Ca,$a,U,Le,Wa,L,xa,To,Fa,za,as,Ba,Ga,Na,ge,Ra,Me,xs,K,_e,ns,Ke,Sa,rs,Pa,Fs,W,Oe,Xa,eo,Ya,oo,Qa,Da,Ha,Z,so,qa,O,La,jo,Ka,Oa,ls,en,on,sn,ye,tn,be,zs;return r=new ee({}),Ee=new ee({}),Ue=new ee({}),Ce=new ee({}),$e=new x({props:{name:"class transformers.VideoMAEConfig",anchor:"transformers.VideoMAEConfig",parameters:[{name:"image_size",val:" = 224"},{name:"patch_size",val:" = 16"},{name:"num_channels",val:" = 3"},{name:"num_frames",val:" = 16"},{name:"tubelet_size",val:" = 2"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"qkv_bias",val:" = True"},{name:"use_mean_pooling",val:" = True"},{name:"decoder_num_attention_heads",val:" = 6"},{name:"decoder_hidden_size",val:" = 384"},{name:"decoder_num_hidden_layers",val:" = 4"},{name:"decoder_intermediate_size",val:" = 1536"},{name:"norm_pix_loss",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEConfig.image_size",description:`<strong>image_size</strong> (<code>int</code>, <em>optional</em>, defaults to 224) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.VideoMAEConfig.patch_size",description:`<strong>patch_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.VideoMAEConfig.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.VideoMAEConfig.num_frames",description:`<strong>num_frames</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
The number of frames in each video.`,name:"num_frames"},{anchor:"transformers.VideoMAEConfig.tubelet_size",description:`<strong>tubelet_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The number of tubelets.`,name:"tubelet_size"},{anchor:"transformers.VideoMAEConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.VideoMAEConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.VideoMAEConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.VideoMAEConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.VideoMAEConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.VideoMAEConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.VideoMAEConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.VideoMAEConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.VideoMAEConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.VideoMAEConfig.qkv_bias",description:`<strong>qkv_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to add a bias to the queries, keys and values.`,name:"qkv_bias"},{anchor:"transformers.VideoMAEConfig.use_mean_pooling",description:`<strong>use_mean_pooling</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to mean pool the final hidden states instead of using the final hidden state of the [CLS] token.`,name:"use_mean_pooling"},{anchor:"transformers.VideoMAEConfig.decoder_num_attention_heads",description:`<strong>decoder_num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 6) &#x2014;
Number of attention heads for each attention layer in the decoder.`,name:"decoder_num_attention_heads"},{anchor:"transformers.VideoMAEConfig.decoder_hidden_size",description:`<strong>decoder_hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 384) &#x2014;
Dimensionality of the decoder.`,name:"decoder_hidden_size"},{anchor:"transformers.VideoMAEConfig.decoder_num_hidden_layers",description:`<strong>decoder_num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of hidden layers in the decoder.`,name:"decoder_num_hidden_layers"},{anchor:"transformers.VideoMAEConfig.decoder_intermediate_size",description:`<strong>decoder_intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1536) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the decoder.`,name:"decoder_intermediate_size"},{anchor:"transformers.VideoMAEConfig.norm_pix_loss",description:`<strong>norm_pix_loss</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the target patch pixels.`,name:"norm_pix_loss"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/videomae/configuration_videomae.py#L28"}}),le=new ot({props:{anchor:"transformers.VideoMAEConfig.example",$$slots:{default:[_r]},$$scope:{ctx:J}}}),xe=new ee({}),Fe=new x({props:{name:"class transformers.VideoMAEFeatureExtractor",anchor:"transformers.VideoMAEFeatureExtractor",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/videomae/feature_extraction_videomae.py#L26"}}),ze=new x({props:{name:"__call__",anchor:"transformers.VideoMAEFeatureExtractor.__call__",parameters:[{name:"images",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/image_processing_utils.py#L544"}}),Be=new ee({}),Ge=new x({props:{name:"class transformers.VideoMAEImageProcessor",anchor:"transformers.VideoMAEImageProcessor",parameters:[{name:"do_resize",val:": bool = True"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = <Resampling.BILINEAR: 2>"},{name:"do_center_crop",val:": bool = True"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": bool = True"},{name:"rescale_factor",val:": typing.Union[int, float] = 0.00392156862745098"},{name:"do_normalize",val:": bool = True"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEImageProcessor.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to resize the image&#x2019;s (height, width) dimensions to the specified <code>size</code>. Can be overridden by the
<code>do_resize</code> parameter in the <code>preprocess</code> method.`,name:"do_resize"},{anchor:"transformers.VideoMAEImageProcessor.size",description:`<strong>size</strong> (<code>Dict[str, int]</code> <em>optional</em>, defaults to <code>{&quot;shortest_edge&quot; -- 224}</code>):
Size of the output image after resizing. The shortest edge of the image will be resized to
<code>size[&quot;shortest_edge&quot;]</code> while maintaining the aspect ratio of the original image. Can be overriden by
<code>size</code> in the <code>preprocess</code> method.`,name:"size"},{anchor:"transformers.VideoMAEImageProcessor.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>PILImageResampling.BILINEAR</code>) &#x2014;
Resampling filter to use if resizing the image. Can be overridden by the <code>resample</code> parameter in the
<code>preprocess</code> method.`,name:"resample"},{anchor:"transformers.VideoMAEImageProcessor.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to center crop the image to the specified <code>crop_size</code>. Can be overridden by the <code>do_center_crop</code>
parameter in the <code>preprocess</code> method.`,name:"do_center_crop"},{anchor:"transformers.VideoMAEImageProcessor.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>{&quot;height&quot; -- 224, &quot;width&quot;: 224}</code>):
Size of the image after applying the center crop. Can be overridden by the <code>crop_size</code> parameter in the
<code>preprocess</code> method.`,name:"crop_size"},{anchor:"transformers.VideoMAEImageProcessor.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to rescale the image by the specified scale <code>rescale_factor</code>. Can be overridden by the <code>do_rescale</code>
parameter in the <code>preprocess</code> method.`,name:"do_rescale"},{anchor:"transformers.VideoMAEImageProcessor.rescale_factor",description:`<strong>rescale_factor</strong> (<code>int</code> or <code>float</code>, <em>optional</em>, defaults to <code>1/255</code>) &#x2014;
Defines the scale factor to use if rescaling the image. Can be overridden by the <code>rescale_factor</code> parameter
in the <code>preprocess</code> method.`,name:"rescale_factor"},{anchor:"transformers.VideoMAEImageProcessor.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to normalize the image. Can be overridden by the <code>do_normalize</code> parameter in the <code>preprocess</code>
method.`,name:"do_normalize"},{anchor:"transformers.VideoMAEImageProcessor.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_MEAN</code>) &#x2014;
Mean to use if normalizing the image. This is a float or list of floats the length of the number of
channels in the image. Can be overridden by the <code>image_mean</code> parameter in the <code>preprocess</code> method.`,name:"image_mean"},{anchor:"transformers.VideoMAEImageProcessor.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>IMAGENET_STANDARD_STD</code>) &#x2014;
Standard deviation to use if normalizing the image. This is a float or list of floats the length of the
number of channels in the image. Can be overridden by the <code>image_std</code> parameter in the <code>preprocess</code> method.`,name:"image_std"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/videomae/image_processing_videomae.py#L61"}}),Ne=new x({props:{name:"preprocess",anchor:"transformers.VideoMAEImageProcessor.preprocess",parameters:[{name:"videos",val:": typing.Union[ForwardRef('PIL.Image.Image'), numpy.ndarray, ForwardRef('torch.Tensor'), typing.List[ForwardRef('PIL.Image.Image')], typing.List[numpy.ndarray], typing.List[ForwardRef('torch.Tensor')]]"},{name:"do_resize",val:": bool = None"},{name:"size",val:": typing.Dict[str, int] = None"},{name:"resample",val:": Resampling = None"},{name:"do_center_crop",val:": bool = None"},{name:"crop_size",val:": typing.Dict[str, int] = None"},{name:"do_rescale",val:": bool = None"},{name:"rescale_factor",val:": float = None"},{name:"do_normalize",val:": bool = None"},{name:"image_mean",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"image_std",val:": typing.Union[float, typing.List[float], NoneType] = None"},{name:"return_tensors",val:": typing.Union[str, transformers.utils.generic.TensorType, NoneType] = None"},{name:"data_format",val:": ChannelDimension = <ChannelDimension.FIRST: 'channels_first'>"},{name:"input_data_format",val:": typing.Union[str, transformers.image_utils.ChannelDimension, NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEImageProcessor.preprocess.images",description:`<strong>images</strong> (<code>ImageInput</code>) &#x2014;
Image to preprocess.`,name:"images"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.do_resize",description:`<strong>do_resize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_resize</code>) &#x2014;
Whether to resize the image.`,name:"do_resize"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.size",description:`<strong>size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.size</code>) &#x2014;
Size of the image after applying resize.`,name:"size"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.resample",description:`<strong>resample</strong> (<code>PILImageResampling</code>, <em>optional</em>, defaults to <code>self.resample</code>) &#x2014;
Resampling filter to use if resizing the image. This can be one of the enum <code>PILImageResampling</code>, Only
has an effect if <code>do_resize</code> is set to <code>True</code>.`,name:"resample"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.do_center_crop",description:`<strong>do_center_crop</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_centre_crop</code>) &#x2014;
Whether to centre crop the image.`,name:"do_center_crop"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.crop_size",description:`<strong>crop_size</strong> (<code>Dict[str, int]</code>, <em>optional</em>, defaults to <code>self.crop_size</code>) &#x2014;
Size of the image after applying the centre crop.`,name:"crop_size"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.do_rescale",description:`<strong>do_rescale</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_rescale</code>) &#x2014;
Whether to rescale the image values between [0 - 1].`,name:"do_rescale"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.rescale_factor",description:`<strong>rescale_factor</strong> (<code>float</code>, <em>optional</em>, defaults to <code>self.rescale_factor</code>) &#x2014;
Rescale factor to rescale the image by if <code>do_rescale</code> is set to <code>True</code>.`,name:"rescale_factor"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.do_normalize",description:`<strong>do_normalize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>self.do_normalize</code>) &#x2014;
Whether to normalize the image.`,name:"do_normalize"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.image_mean",description:`<strong>image_mean</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_mean</code>) &#x2014;
Image mean.`,name:"image_mean"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.image_std",description:`<strong>image_std</strong> (<code>float</code> or <code>List[float]</code>, <em>optional</em>, defaults to <code>self.image_std</code>) &#x2014;
Image standard deviation.`,name:"image_std"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.return_tensors",description:`<strong>return_tensors</strong> (<code>str</code> or <code>TensorType</code>, <em>optional</em>) &#x2014;
The type of tensors to return. Can be one of:<ul>
<li>Unset: Return a list of <code>np.ndarray</code>.</li>
<li><code>TensorType.TENSORFLOW</code> or <code>&apos;tf&apos;</code>: Return a batch of type <code>tf.Tensor</code>.</li>
<li><code>TensorType.PYTORCH</code> or <code>&apos;pt&apos;</code>: Return a batch of type <code>torch.Tensor</code>.</li>
<li><code>TensorType.NUMPY</code> or <code>&apos;np&apos;</code>: Return a batch of type <code>np.ndarray</code>.</li>
<li><code>TensorType.JAX</code> or <code>&apos;jax&apos;</code>: Return a batch of type <code>jax.numpy.ndarray</code>.</li>
</ul>`,name:"return_tensors"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.data_format",description:`<strong>data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>, defaults to <code>ChannelDimension.FIRST</code>) &#x2014;
The channel dimension format for the output image. Can be one of:<ul>
<li><code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li>Unset: Use the inferred channel dimension format of the input image.</li>
</ul>`,name:"data_format"},{anchor:"transformers.VideoMAEImageProcessor.preprocess.input_data_format",description:`<strong>input_data_format</strong> (<code>ChannelDimension</code> or <code>str</code>, <em>optional</em>) &#x2014;
The channel dimension format for the input image. If unset, the channel dimension format is inferred
from the input image. Can be one of:<ul>
<li><code>&quot;channels_first&quot;</code> or <code>ChannelDimension.FIRST</code>: image in (num_channels, height, width) format.</li>
<li><code>&quot;channels_last&quot;</code> or <code>ChannelDimension.LAST</code>: image in (height, width, num_channels) format.</li>
<li><code>&quot;none&quot;</code> or <code>ChannelDimension.NONE</code>: image in (height, width) format.</li>
</ul>`,name:"input_data_format"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/videomae/image_processing_videomae.py#L226"}}),Re=new ee({}),Se=new x({props:{name:"class transformers.VideoMAEModel",anchor:"transformers.VideoMAEModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEConfig">VideoMAEConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/videomae/modeling_videomae.py#L535"}}),Ye=new x({props:{name:"forward",anchor:"transformers.VideoMAEModel.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"bool_masked_pos",val:": typing.Optional[torch.BoolTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.VideoMAEModel.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_frames, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.32.0/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">VideoMAEImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.VideoMAEModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.VideoMAEModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.VideoMAEModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.VideoMAEModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.VideoMAEModel.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0). Each video in the
batch must have the same number of masked patches. If <code>None</code>, then all patches are considered. Sequence
length is <code>(num_frames // tubelet_size) * (image_size // patch_size) ** 2</code>.`,name:"bool_masked_pos"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/videomae/modeling_videomae.py#L562",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEConfig"
>VideoMAEConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),he=new ln({props:{$$slots:{default:[yr]},$$scope:{ctx:J}}}),fe=new ot({props:{anchor:"transformers.VideoMAEModel.forward.example",$$slots:{default:[br]},$$scope:{ctx:J}}}),Qe=new ee({}),De=new x({props:{name:"class transformers.VideoMAEForPreTraining",anchor:"transformers.VideoMAEForPreTraining",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEConfig">VideoMAEConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/videomae/modeling_videomae.py#L759"}}),Le=new x({props:{name:"forward",anchor:"transformers.VideoMAEForPreTraining.forward",parameters:[{name:"pixel_values",val:": FloatTensor"},{name:"bool_masked_pos",val:": BoolTensor"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.VideoMAEForPreTraining.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_frames, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.32.0/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">VideoMAEImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.VideoMAEForPreTraining.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.VideoMAEForPreTraining.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.VideoMAEForPreTraining.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.VideoMAEForPreTraining.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.VideoMAEForPreTraining.forward.bool_masked_pos",description:`<strong>bool_masked_pos</strong> (<code>torch.BoolTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Boolean masked positions. Indicates which patches are masked (1) and which aren&#x2019;t (0). Each video in the
batch must have the same number of masked patches. Sequence length is <code>(num_frames // tubelet_size) * (image_size // patch_size) ** 2</code>.`,name:"bool_masked_pos"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/videomae/modeling_videomae.py#L777",returnDescription:`
<p>A <code>transformers.models.videomae.modeling_videomae.VideoMAEForPreTrainingOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEConfig"
>VideoMAEConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Pixel reconstruction loss.</li>
<li><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, patch_size ** 2 * num_channels)</code>) \u2014 Pixel reconstruction logits.</li>
<li><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer
plus the initial embedding outputs.</li>
<li><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Attentions weights after the attention softmax, used to compute the weighted average in
the self-attention heads.</li>
</ul>
`,returnType:`
<p><code>transformers.models.videomae.modeling_videomae.VideoMAEForPreTrainingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ge=new ln({props:{$$slots:{default:[wr]},$$scope:{ctx:J}}}),Me=new ot({props:{anchor:"transformers.VideoMAEForPreTraining.forward.example",$$slots:{default:[vr]},$$scope:{ctx:J}}}),Ke=new ee({}),Oe=new x({props:{name:"class transformers.VideoMAEForVideoClassification",anchor:"transformers.VideoMAEForVideoClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.VideoMAEForVideoClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEConfig">VideoMAEConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/videomae/modeling_videomae.py#L943"}}),so=new x({props:{name:"forward",anchor:"transformers.VideoMAEForVideoClassification.forward",parameters:[{name:"pixel_values",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.VideoMAEForVideoClassification.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_frames, num_channels, height, width)</code>) &#x2014;
Pixel values. Pixel values can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.32.0/en/model_doc/donut#transformers.DonutFeatureExtractor.__call__">VideoMAEImageProcessor.<strong>call</strong>()</a> for details.`,name:"pixel_values"},{anchor:"transformers.VideoMAEForVideoClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.VideoMAEForVideoClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.VideoMAEForVideoClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.VideoMAEForVideoClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.VideoMAEForVideoClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the image classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/videomae/modeling_videomae.py#L957",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEConfig"
>VideoMAEConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each stage) of shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states
(also called feature maps) of the model at the output of each stage.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, patch_size, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.ImageClassifierOutput"
>transformers.modeling_outputs.ImageClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ye=new ln({props:{$$slots:{default:[Tr]},$$scope:{ctx:J}}}),be=new ot({props:{anchor:"transformers.VideoMAEForVideoClassification.forward.example",$$slots:{default:[jr]},$$scope:{ctx:J}}}),{c(){h=t("meta"),y=m(),M=t("h1"),u=t("a"),_=t("span"),b(r.$$.fragment),g=m(),V=t("span"),at=l("VideoMAE"),hs=m(),G=t("h2"),oe=t("a"),Fo=t("span"),b(Ee.$$.fragment),nt=m(),zo=t("span"),rt=l("Overview"),fs=m(),F=t("p"),lt=l("The VideoMAE model was proposed in "),Je=t("a"),it=l("VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training"),dt=l(` by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
VideoMAE extends masked auto encoders (`),no=t("a"),ct=l("MAE"),mt=l(") to video, claiming state-of-the-art performance on several video classification benchmarks."),us=m(),ro=t("p"),pt=l("The abstract from the paper is the following:"),gs=m(),lo=t("p"),Bo=t("em"),ht=l("Pre-training video transformers on extra large-scale datasets is generally required to achieve premier performance on relatively small datasets. In this paper, we show that video masked autoencoders (VideoMAE) are data-efficient learners for self-supervised video pre-training (SSVP). We are inspired by the recent ImageMAE and propose customized video tube masking and reconstruction. These simple designs turn out to be effective for overcoming information leakage caused by the temporal correlation during video reconstruction. We obtain three important findings on SSVP: (1) An extremely high proportion of masking ratio (i.e., 90% to 95%) still yields favorable performance of VideoMAE. The temporally redundant video content enables higher masking ratio than that of images. (2) VideoMAE achieves impressive results on very small datasets (i.e., around 3k-4k videos) without using any extra data. This is partially ascribed to the challenging task of video reconstruction to enforce high-level structure learning. (3) VideoMAE shows that data quality is more important than data quantity for SSVP. Domain shift between pre-training and target datasets are important issues in SSVP. Notably, our VideoMAE with the vanilla ViT backbone can achieve 83.9% on Kinects-400, 75.3% on Something-Something V2, 90.8% on UCF101, and 61.1% on HMDB51 without using any extra data."),Ms=m(),io=t("p"),ft=l("Tips:"),_s=m(),se=t("ul"),Ve=t("li"),ut=l("One can use "),co=t("a"),gt=l("VideoMAEImageProcessor"),Mt=l(" to prepare videos for the model. It will resize + normalize all frames of a video for you."),_t=m(),mo=t("li"),po=t("a"),yt=l("VideoMAEForPreTraining"),bt=l(" includes the decoder on top for self-supervised pre-training."),ys=m(),te=t("img"),bs=m(),ae=t("small"),wt=l("VideoMAE pre-training. Taken from the "),ho=t("a"),vt=l("original paper"),Tt=l("."),ws=m(),z=t("p"),jt=l("This model was contributed by "),Ae=t("a"),Et=l("nielsr"),Jt=l(`.
The original code can be found `),Ie=t("a"),Vt=l("here"),At=l("."),vs=m(),N=t("h2"),ne=t("a"),Go=t("span"),b(Ue.$$.fragment),It=m(),No=t("span"),Ut=l("Resources"),Ts=m(),fo=t("p"),Zt=l(`A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with VideoMAE. If
you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll
review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.`),js=m(),uo=t("p"),Ro=t("strong"),kt=l("Video classification"),Es=m(),B=t("ul"),go=t("li"),Ze=t("a"),Ct=l("A notebook"),$t=l(` that shows how
to fine-tune a VideoMAE model on a custom dataset.`),Wt=m(),So=t("li"),Mo=t("a"),xt=l("Video classification task guide"),Ft=m(),_o=t("li"),ke=t("a"),zt=l("A \u{1F917} Space"),Bt=l(" showing how to perform inference with a video classification model."),Js=m(),R=t("h2"),re=t("a"),Po=t("span"),b(Ce.$$.fragment),Gt=m(),Xo=t("span"),Nt=l("VideoMAEConfig"),Vs=m(),A=t("div"),b($e.$$.fragment),Rt=m(),S=t("p"),St=l("This is the configuration class to store the configuration of a "),yo=t("a"),Pt=l("VideoMAEModel"),Xt=l(`. It is used to instantiate a
VideoMAE model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the VideoMAE
`),We=t("a"),Yt=l("MCG-NJU/videomae-base"),Qt=l(" architecture."),Dt=m(),P=t("p"),Ht=l("Configuration objects inherit from "),bo=t("a"),qt=l("PretrainedConfig"),Lt=l(` and can be used to control the model outputs. Read the
documentation from `),wo=t("a"),Kt=l("PretrainedConfig"),Ot=l(" for more information."),ea=m(),b(le.$$.fragment),As=m(),X=t("h2"),ie=t("a"),Yo=t("span"),b(xe.$$.fragment),oa=m(),Qo=t("span"),sa=l("VideoMAEFeatureExtractor"),Is=m(),Y=t("div"),b(Fe.$$.fragment),ta=m(),de=t("div"),b(ze.$$.fragment),aa=m(),Do=t("p"),na=l("Preprocess an image or a batch of images."),Us=m(),Q=t("h2"),ce=t("a"),Ho=t("span"),b(Be.$$.fragment),ra=m(),qo=t("span"),la=l("VideoMAEImageProcessor"),Zs=m(),k=t("div"),b(Ge.$$.fragment),ia=m(),Lo=t("p"),da=l("Constructs a VideoMAE image processor."),ca=m(),me=t("div"),b(Ne.$$.fragment),ma=m(),Ko=t("p"),pa=l("Preprocess an image or batch of images."),ks=m(),D=t("h2"),pe=t("a"),Oo=t("span"),b(Re.$$.fragment),ha=m(),es=t("span"),fa=l("VideoMAEModel"),Cs=m(),C=t("div"),b(Se.$$.fragment),ua=m(),Pe=t("p"),ga=l(`The bare VideoMAE Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Xe=t("a"),Ma=l("torch.nn.Module"),_a=l(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ya=m(),I=t("div"),b(Ye.$$.fragment),ba=m(),H=t("p"),wa=l("The "),vo=t("a"),va=l("VideoMAEModel"),Ta=l(" forward method, overrides the "),os=t("code"),ja=l("__call__"),Ea=l(" special method."),Ja=m(),b(he.$$.fragment),Va=m(),b(fe.$$.fragment),$s=m(),q=t("h2"),ue=t("a"),ss=t("span"),b(Qe.$$.fragment),Aa=m(),ts=t("span"),Ia=l("VideoMAEForPreTraining"),Ws=m(),$=t("div"),b(De.$$.fragment),Ua=m(),He=t("p"),Za=l(`The VideoMAE Model transformer with the decoder on top for self-supervised pre-training.
This model is a PyTorch `),qe=t("a"),ka=l("torch.nn.Module"),Ca=l(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),$a=m(),U=t("div"),b(Le.$$.fragment),Wa=m(),L=t("p"),xa=l("The "),To=t("a"),Fa=l("VideoMAEForPreTraining"),za=l(" forward method, overrides the "),as=t("code"),Ba=l("__call__"),Ga=l(" special method."),Na=m(),b(ge.$$.fragment),Ra=m(),b(Me.$$.fragment),xs=m(),K=t("h2"),_e=t("a"),ns=t("span"),b(Ke.$$.fragment),Sa=m(),rs=t("span"),Pa=l("VideoMAEForVideoClassification"),Fs=m(),W=t("div"),b(Oe.$$.fragment),Xa=m(),eo=t("p"),Ya=l(`VideoMAE Model transformer with a video classification head on top (a linear layer on top of the average pooled hidden
states of all tokens) e.g. for ImageNet.
This model is a PyTorch `),oo=t("a"),Qa=l("torch.nn.Module"),Da=l(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ha=m(),Z=t("div"),b(so.$$.fragment),qa=m(),O=t("p"),La=l("The "),jo=t("a"),Ka=l("VideoMAEForVideoClassification"),Oa=l(" forward method, overrides the "),ls=t("code"),en=l("__call__"),on=l(" special method."),sn=m(),b(ye.$$.fragment),tn=m(),b(be.$$.fragment),this.h()},l(e){const c=ur('[data-svelte="svelte-1phssyn"]',document.head);h=a(c,"META",{name:!0,content:!0}),c.forEach(s),y=p(e),M=a(e,"H1",{class:!0});var to=n(M);u=a(to,"A",{id:!0,class:!0,href:!0});var is=n(u);_=a(is,"SPAN",{});var ds=n(_);w(r.$$.fragment,ds),ds.forEach(s),is.forEach(s),g=p(to),V=a(to,"SPAN",{});var cs=n(V);at=i(cs,"VideoMAE"),cs.forEach(s),to.forEach(s),hs=p(e),G=a(e,"H2",{class:!0});var ao=n(G);oe=a(ao,"A",{id:!0,class:!0,href:!0});var ms=n(oe);Fo=a(ms,"SPAN",{});var ps=n(Fo);w(Ee.$$.fragment,ps),ps.forEach(s),ms.forEach(s),nt=p(ao),zo=a(ao,"SPAN",{});var cn=n(zo);rt=i(cn,"Overview"),cn.forEach(s),ao.forEach(s),fs=p(e),F=a(e,"P",{});var Eo=n(F);lt=i(Eo,"The VideoMAE model was proposed in "),Je=a(Eo,"A",{href:!0,rel:!0});var mn=n(Je);it=i(mn,"VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training"),mn.forEach(s),dt=i(Eo,` by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
VideoMAE extends masked auto encoders (`),no=a(Eo,"A",{href:!0});var pn=n(no);ct=i(pn,"MAE"),pn.forEach(s),mt=i(Eo,") to video, claiming state-of-the-art performance on several video classification benchmarks."),Eo.forEach(s),us=p(e),ro=a(e,"P",{});var hn=n(ro);pt=i(hn,"The abstract from the paper is the following:"),hn.forEach(s),gs=p(e),lo=a(e,"P",{});var fn=n(lo);Bo=a(fn,"EM",{});var un=n(Bo);ht=i(un,"Pre-training video transformers on extra large-scale datasets is generally required to achieve premier performance on relatively small datasets. In this paper, we show that video masked autoencoders (VideoMAE) are data-efficient learners for self-supervised video pre-training (SSVP). We are inspired by the recent ImageMAE and propose customized video tube masking and reconstruction. These simple designs turn out to be effective for overcoming information leakage caused by the temporal correlation during video reconstruction. We obtain three important findings on SSVP: (1) An extremely high proportion of masking ratio (i.e., 90% to 95%) still yields favorable performance of VideoMAE. The temporally redundant video content enables higher masking ratio than that of images. (2) VideoMAE achieves impressive results on very small datasets (i.e., around 3k-4k videos) without using any extra data. This is partially ascribed to the challenging task of video reconstruction to enforce high-level structure learning. (3) VideoMAE shows that data quality is more important than data quantity for SSVP. Domain shift between pre-training and target datasets are important issues in SSVP. Notably, our VideoMAE with the vanilla ViT backbone can achieve 83.9% on Kinects-400, 75.3% on Something-Something V2, 90.8% on UCF101, and 61.1% on HMDB51 without using any extra data."),un.forEach(s),fn.forEach(s),Ms=p(e),io=a(e,"P",{});var gn=n(io);ft=i(gn,"Tips:"),gn.forEach(s),_s=p(e),se=a(e,"UL",{});var Bs=n(se);Ve=a(Bs,"LI",{});var Gs=n(Ve);ut=i(Gs,"One can use "),co=a(Gs,"A",{href:!0});var Mn=n(co);gt=i(Mn,"VideoMAEImageProcessor"),Mn.forEach(s),Mt=i(Gs," to prepare videos for the model. It will resize + normalize all frames of a video for you."),Gs.forEach(s),_t=p(Bs),mo=a(Bs,"LI",{});var an=n(mo);po=a(an,"A",{href:!0});var _n=n(po);yt=i(_n,"VideoMAEForPreTraining"),_n.forEach(s),bt=i(an," includes the decoder on top for self-supervised pre-training."),an.forEach(s),Bs.forEach(s),ys=p(e),te=a(e,"IMG",{src:!0,alt:!0,width:!0}),bs=p(e),ae=a(e,"SMALL",{});var Ns=n(ae);wt=i(Ns,"VideoMAE pre-training. Taken from the "),ho=a(Ns,"A",{href:!0});var yn=n(ho);vt=i(yn,"original paper"),yn.forEach(s),Tt=i(Ns,"."),Ns.forEach(s),ws=p(e),z=a(e,"P",{});var Jo=n(z);jt=i(Jo,"This model was contributed by "),Ae=a(Jo,"A",{href:!0,rel:!0});var bn=n(Ae);Et=i(bn,"nielsr"),bn.forEach(s),Jt=i(Jo,`.
The original code can be found `),Ie=a(Jo,"A",{href:!0,rel:!0});var wn=n(Ie);Vt=i(wn,"here"),wn.forEach(s),At=i(Jo,"."),Jo.forEach(s),vs=p(e),N=a(e,"H2",{class:!0});var Rs=n(N);ne=a(Rs,"A",{id:!0,class:!0,href:!0});var vn=n(ne);Go=a(vn,"SPAN",{});var Tn=n(Go);w(Ue.$$.fragment,Tn),Tn.forEach(s),vn.forEach(s),It=p(Rs),No=a(Rs,"SPAN",{});var jn=n(No);Ut=i(jn,"Resources"),jn.forEach(s),Rs.forEach(s),Ts=p(e),fo=a(e,"P",{});var En=n(fo);Zt=i(En,`A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with VideoMAE. If
you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll
review it! The resource should ideally demonstrate something new instead of duplicating an existing resource.`),En.forEach(s),js=p(e),uo=a(e,"P",{});var Jn=n(uo);Ro=a(Jn,"STRONG",{});var Vn=n(Ro);kt=i(Vn,"Video classification"),Vn.forEach(s),Jn.forEach(s),Es=p(e),B=a(e,"UL",{});var Vo=n(B);go=a(Vo,"LI",{});var nn=n(go);Ze=a(nn,"A",{href:!0,rel:!0});var An=n(Ze);Ct=i(An,"A notebook"),An.forEach(s),$t=i(nn,` that shows how
to fine-tune a VideoMAE model on a custom dataset.`),nn.forEach(s),Wt=p(Vo),So=a(Vo,"LI",{});var In=n(So);Mo=a(In,"A",{href:!0});var Un=n(Mo);xt=i(Un,"Video classification task guide"),Un.forEach(s),In.forEach(s),Ft=p(Vo),_o=a(Vo,"LI",{});var rn=n(_o);ke=a(rn,"A",{href:!0,rel:!0});var Zn=n(ke);zt=i(Zn,"A \u{1F917} Space"),Zn.forEach(s),Bt=i(rn," showing how to perform inference with a video classification model."),rn.forEach(s),Vo.forEach(s),Js=p(e),R=a(e,"H2",{class:!0});var Ss=n(R);re=a(Ss,"A",{id:!0,class:!0,href:!0});var kn=n(re);Po=a(kn,"SPAN",{});var Cn=n(Po);w(Ce.$$.fragment,Cn),Cn.forEach(s),kn.forEach(s),Gt=p(Ss),Xo=a(Ss,"SPAN",{});var $n=n(Xo);Nt=i($n,"VideoMAEConfig"),$n.forEach(s),Ss.forEach(s),Vs=p(e),A=a(e,"DIV",{class:!0});var we=n(A);w($e.$$.fragment,we),Rt=p(we),S=a(we,"P",{});var Ao=n(S);St=i(Ao,"This is the configuration class to store the configuration of a "),yo=a(Ao,"A",{href:!0});var Wn=n(yo);Pt=i(Wn,"VideoMAEModel"),Wn.forEach(s),Xt=i(Ao,`. It is used to instantiate a
VideoMAE model according to the specified arguments, defining the model architecture. Instantiating a configuration
with the defaults will yield a similar configuration to that of the VideoMAE
`),We=a(Ao,"A",{href:!0,rel:!0});var xn=n(We);Yt=i(xn,"MCG-NJU/videomae-base"),xn.forEach(s),Qt=i(Ao," architecture."),Ao.forEach(s),Dt=p(we),P=a(we,"P",{});var Io=n(P);Ht=i(Io,"Configuration objects inherit from "),bo=a(Io,"A",{href:!0});var Fn=n(bo);qt=i(Fn,"PretrainedConfig"),Fn.forEach(s),Lt=i(Io,` and can be used to control the model outputs. Read the
documentation from `),wo=a(Io,"A",{href:!0});var zn=n(wo);Kt=i(zn,"PretrainedConfig"),zn.forEach(s),Ot=i(Io," for more information."),Io.forEach(s),ea=p(we),w(le.$$.fragment,we),we.forEach(s),As=p(e),X=a(e,"H2",{class:!0});var Ps=n(X);ie=a(Ps,"A",{id:!0,class:!0,href:!0});var Bn=n(ie);Yo=a(Bn,"SPAN",{});var Gn=n(Yo);w(xe.$$.fragment,Gn),Gn.forEach(s),Bn.forEach(s),oa=p(Ps),Qo=a(Ps,"SPAN",{});var Nn=n(Qo);sa=i(Nn,"VideoMAEFeatureExtractor"),Nn.forEach(s),Ps.forEach(s),Is=p(e),Y=a(e,"DIV",{class:!0});var Xs=n(Y);w(Fe.$$.fragment,Xs),ta=p(Xs),de=a(Xs,"DIV",{class:!0});var Ys=n(de);w(ze.$$.fragment,Ys),aa=p(Ys),Do=a(Ys,"P",{});var Rn=n(Do);na=i(Rn,"Preprocess an image or a batch of images."),Rn.forEach(s),Ys.forEach(s),Xs.forEach(s),Us=p(e),Q=a(e,"H2",{class:!0});var Qs=n(Q);ce=a(Qs,"A",{id:!0,class:!0,href:!0});var Sn=n(ce);Ho=a(Sn,"SPAN",{});var Pn=n(Ho);w(Be.$$.fragment,Pn),Pn.forEach(s),Sn.forEach(s),ra=p(Qs),qo=a(Qs,"SPAN",{});var Xn=n(qo);la=i(Xn,"VideoMAEImageProcessor"),Xn.forEach(s),Qs.forEach(s),Zs=p(e),k=a(e,"DIV",{class:!0});var Uo=n(k);w(Ge.$$.fragment,Uo),ia=p(Uo),Lo=a(Uo,"P",{});var Yn=n(Lo);da=i(Yn,"Constructs a VideoMAE image processor."),Yn.forEach(s),ca=p(Uo),me=a(Uo,"DIV",{class:!0});var Ds=n(me);w(Ne.$$.fragment,Ds),ma=p(Ds),Ko=a(Ds,"P",{});var Qn=n(Ko);pa=i(Qn,"Preprocess an image or batch of images."),Qn.forEach(s),Ds.forEach(s),Uo.forEach(s),ks=p(e),D=a(e,"H2",{class:!0});var Hs=n(D);pe=a(Hs,"A",{id:!0,class:!0,href:!0});var Dn=n(pe);Oo=a(Dn,"SPAN",{});var Hn=n(Oo);w(Re.$$.fragment,Hn),Hn.forEach(s),Dn.forEach(s),ha=p(Hs),es=a(Hs,"SPAN",{});var qn=n(es);fa=i(qn,"VideoMAEModel"),qn.forEach(s),Hs.forEach(s),Cs=p(e),C=a(e,"DIV",{class:!0});var Zo=n(C);w(Se.$$.fragment,Zo),ua=p(Zo),Pe=a(Zo,"P",{});var qs=n(Pe);ga=i(qs,`The bare VideoMAE Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Xe=a(qs,"A",{href:!0,rel:!0});var Ln=n(Xe);Ma=i(Ln,"torch.nn.Module"),Ln.forEach(s),_a=i(qs,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),qs.forEach(s),ya=p(Zo),I=a(Zo,"DIV",{class:!0});var ve=n(I);w(Ye.$$.fragment,ve),ba=p(ve),H=a(ve,"P",{});var ko=n(H);wa=i(ko,"The "),vo=a(ko,"A",{href:!0});var Kn=n(vo);va=i(Kn,"VideoMAEModel"),Kn.forEach(s),Ta=i(ko," forward method, overrides the "),os=a(ko,"CODE",{});var On=n(os);ja=i(On,"__call__"),On.forEach(s),Ea=i(ko," special method."),ko.forEach(s),Ja=p(ve),w(he.$$.fragment,ve),Va=p(ve),w(fe.$$.fragment,ve),ve.forEach(s),Zo.forEach(s),$s=p(e),q=a(e,"H2",{class:!0});var Ls=n(q);ue=a(Ls,"A",{id:!0,class:!0,href:!0});var er=n(ue);ss=a(er,"SPAN",{});var or=n(ss);w(Qe.$$.fragment,or),or.forEach(s),er.forEach(s),Aa=p(Ls),ts=a(Ls,"SPAN",{});var sr=n(ts);Ia=i(sr,"VideoMAEForPreTraining"),sr.forEach(s),Ls.forEach(s),Ws=p(e),$=a(e,"DIV",{class:!0});var Co=n($);w(De.$$.fragment,Co),Ua=p(Co),He=a(Co,"P",{});var Ks=n(He);Za=i(Ks,`The VideoMAE Model transformer with the decoder on top for self-supervised pre-training.
This model is a PyTorch `),qe=a(Ks,"A",{href:!0,rel:!0});var tr=n(qe);ka=i(tr,"torch.nn.Module"),tr.forEach(s),Ca=i(Ks,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ks.forEach(s),$a=p(Co),U=a(Co,"DIV",{class:!0});var Te=n(U);w(Le.$$.fragment,Te),Wa=p(Te),L=a(Te,"P",{});var $o=n(L);xa=i($o,"The "),To=a($o,"A",{href:!0});var ar=n(To);Fa=i(ar,"VideoMAEForPreTraining"),ar.forEach(s),za=i($o," forward method, overrides the "),as=a($o,"CODE",{});var nr=n(as);Ba=i(nr,"__call__"),nr.forEach(s),Ga=i($o," special method."),$o.forEach(s),Na=p(Te),w(ge.$$.fragment,Te),Ra=p(Te),w(Me.$$.fragment,Te),Te.forEach(s),Co.forEach(s),xs=p(e),K=a(e,"H2",{class:!0});var Os=n(K);_e=a(Os,"A",{id:!0,class:!0,href:!0});var rr=n(_e);ns=a(rr,"SPAN",{});var lr=n(ns);w(Ke.$$.fragment,lr),lr.forEach(s),rr.forEach(s),Sa=p(Os),rs=a(Os,"SPAN",{});var ir=n(rs);Pa=i(ir,"VideoMAEForVideoClassification"),ir.forEach(s),Os.forEach(s),Fs=p(e),W=a(e,"DIV",{class:!0});var Wo=n(W);w(Oe.$$.fragment,Wo),Xa=p(Wo),eo=a(Wo,"P",{});var et=n(eo);Ya=i(et,`VideoMAE Model transformer with a video classification head on top (a linear layer on top of the average pooled hidden
states of all tokens) e.g. for ImageNet.
This model is a PyTorch `),oo=a(et,"A",{href:!0,rel:!0});var dr=n(oo);Qa=i(dr,"torch.nn.Module"),dr.forEach(s),Da=i(et,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),et.forEach(s),Ha=p(Wo),Z=a(Wo,"DIV",{class:!0});var je=n(Z);w(so.$$.fragment,je),qa=p(je),O=a(je,"P",{});var xo=n(O);La=i(xo,"The "),jo=a(xo,"A",{href:!0});var cr=n(jo);Ka=i(cr,"VideoMAEForVideoClassification"),cr.forEach(s),Oa=i(xo," forward method, overrides the "),ls=a(xo,"CODE",{});var mr=n(ls);en=i(mr,"__call__"),mr.forEach(s),on=i(xo," special method."),xo.forEach(s),sn=p(je),w(ye.$$.fragment,je),tn=p(je),w(be.$$.fragment,je),je.forEach(s),Wo.forEach(s),this.h()},h(){d(h,"name","hf:doc:metadata"),d(h,"content",JSON.stringify(Jr)),d(u,"id","videomae"),d(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"),d(u,"href","#videomae"),d(M,"class","relative group"),d(oe,"id","overview"),d(oe,"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"),d(oe,"href","#overview"),d(G,"class","relative group"),d(Je,"href","https://arxiv.org/abs/2203.12602"),d(Je,"rel","nofollow"),d(no,"href","vit_mae"),d(co,"href","/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEImageProcessor"),d(po,"href","/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEForPreTraining"),gr(te.src,dn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/videomae_architecture.jpeg")||d(te,"src",dn),d(te,"alt","drawing"),d(te,"width","600"),d(ho,"href","https://arxiv.org/abs/2203.12602"),d(Ae,"href","https://huggingface.co/nielsr"),d(Ae,"rel","nofollow"),d(Ie,"href","https://github.com/MCG-NJU/VideoMAE"),d(Ie,"rel","nofollow"),d(ne,"id","resources"),d(ne,"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"),d(ne,"href","#resources"),d(N,"class","relative group"),d(Ze,"href","https://github.com/huggingface/notebooks/blob/main/examples/video_classification.ipynb"),d(Ze,"rel","nofollow"),d(Mo,"href","../tasks/video-classification"),d(ke,"href","https://huggingface.co/spaces/sayakpaul/video-classification-ucf101-subset"),d(ke,"rel","nofollow"),d(re,"id","transformers.VideoMAEConfig"),d(re,"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"),d(re,"href","#transformers.VideoMAEConfig"),d(R,"class","relative group"),d(yo,"href","/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEModel"),d(We,"href","https://huggingface.co/MCG-NJU/videomae-base"),d(We,"rel","nofollow"),d(bo,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(wo,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ie,"id","transformers.VideoMAEFeatureExtractor"),d(ie,"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"),d(ie,"href","#transformers.VideoMAEFeatureExtractor"),d(X,"class","relative group"),d(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ce,"id","transformers.VideoMAEImageProcessor"),d(ce,"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"),d(ce,"href","#transformers.VideoMAEImageProcessor"),d(Q,"class","relative group"),d(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(pe,"id","transformers.VideoMAEModel"),d(pe,"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"),d(pe,"href","#transformers.VideoMAEModel"),d(D,"class","relative group"),d(Xe,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Xe,"rel","nofollow"),d(vo,"href","/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEModel"),d(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(ue,"id","transformers.VideoMAEForPreTraining"),d(ue,"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"),d(ue,"href","#transformers.VideoMAEForPreTraining"),d(q,"class","relative group"),d(qe,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(qe,"rel","nofollow"),d(To,"href","/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEForPreTraining"),d(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d($,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(_e,"id","transformers.VideoMAEForVideoClassification"),d(_e,"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"),d(_e,"href","#transformers.VideoMAEForVideoClassification"),d(K,"class","relative group"),d(oo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(oo,"rel","nofollow"),d(jo,"href","/docs/transformers/v4.32.0/en/model_doc/videomae#transformers.VideoMAEForVideoClassification"),d(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),d(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,c){o(document.head,h),f(e,y,c),f(e,M,c),o(M,u),o(u,_),v(r,_,null),o(M,g),o(M,V),o(V,at),f(e,hs,c),f(e,G,c),o(G,oe),o(oe,Fo),v(Ee,Fo,null),o(G,nt),o(G,zo),o(zo,rt),f(e,fs,c),f(e,F,c),o(F,lt),o(F,Je),o(Je,it),o(F,dt),o(F,no),o(no,ct),o(F,mt),f(e,us,c),f(e,ro,c),o(ro,pt),f(e,gs,c),f(e,lo,c),o(lo,Bo),o(Bo,ht),f(e,Ms,c),f(e,io,c),o(io,ft),f(e,_s,c),f(e,se,c),o(se,Ve),o(Ve,ut),o(Ve,co),o(co,gt),o(Ve,Mt),o(se,_t),o(se,mo),o(mo,po),o(po,yt),o(mo,bt),f(e,ys,c),f(e,te,c),f(e,bs,c),f(e,ae,c),o(ae,wt),o(ae,ho),o(ho,vt),o(ae,Tt),f(e,ws,c),f(e,z,c),o(z,jt),o(z,Ae),o(Ae,Et),o(z,Jt),o(z,Ie),o(Ie,Vt),o(z,At),f(e,vs,c),f(e,N,c),o(N,ne),o(ne,Go),v(Ue,Go,null),o(N,It),o(N,No),o(No,Ut),f(e,Ts,c),f(e,fo,c),o(fo,Zt),f(e,js,c),f(e,uo,c),o(uo,Ro),o(Ro,kt),f(e,Es,c),f(e,B,c),o(B,go),o(go,Ze),o(Ze,Ct),o(go,$t),o(B,Wt),o(B,So),o(So,Mo),o(Mo,xt),o(B,Ft),o(B,_o),o(_o,ke),o(ke,zt),o(_o,Bt),f(e,Js,c),f(e,R,c),o(R,re),o(re,Po),v(Ce,Po,null),o(R,Gt),o(R,Xo),o(Xo,Nt),f(e,Vs,c),f(e,A,c),v($e,A,null),o(A,Rt),o(A,S),o(S,St),o(S,yo),o(yo,Pt),o(S,Xt),o(S,We),o(We,Yt),o(S,Qt),o(A,Dt),o(A,P),o(P,Ht),o(P,bo),o(bo,qt),o(P,Lt),o(P,wo),o(wo,Kt),o(P,Ot),o(A,ea),v(le,A,null),f(e,As,c),f(e,X,c),o(X,ie),o(ie,Yo),v(xe,Yo,null),o(X,oa),o(X,Qo),o(Qo,sa),f(e,Is,c),f(e,Y,c),v(Fe,Y,null),o(Y,ta),o(Y,de),v(ze,de,null),o(de,aa),o(de,Do),o(Do,na),f(e,Us,c),f(e,Q,c),o(Q,ce),o(ce,Ho),v(Be,Ho,null),o(Q,ra),o(Q,qo),o(qo,la),f(e,Zs,c),f(e,k,c),v(Ge,k,null),o(k,ia),o(k,Lo),o(Lo,da),o(k,ca),o(k,me),v(Ne,me,null),o(me,ma),o(me,Ko),o(Ko,pa),f(e,ks,c),f(e,D,c),o(D,pe),o(pe,Oo),v(Re,Oo,null),o(D,ha),o(D,es),o(es,fa),f(e,Cs,c),f(e,C,c),v(Se,C,null),o(C,ua),o(C,Pe),o(Pe,ga),o(Pe,Xe),o(Xe,Ma),o(Pe,_a),o(C,ya),o(C,I),v(Ye,I,null),o(I,ba),o(I,H),o(H,wa),o(H,vo),o(vo,va),o(H,Ta),o(H,os),o(os,ja),o(H,Ea),o(I,Ja),v(he,I,null),o(I,Va),v(fe,I,null),f(e,$s,c),f(e,q,c),o(q,ue),o(ue,ss),v(Qe,ss,null),o(q,Aa),o(q,ts),o(ts,Ia),f(e,Ws,c),f(e,$,c),v(De,$,null),o($,Ua),o($,He),o(He,Za),o(He,qe),o(qe,ka),o(He,Ca),o($,$a),o($,U),v(Le,U,null),o(U,Wa),o(U,L),o(L,xa),o(L,To),o(To,Fa),o(L,za),o(L,as),o(as,Ba),o(L,Ga),o(U,Na),v(ge,U,null),o(U,Ra),v(Me,U,null),f(e,xs,c),f(e,K,c),o(K,_e),o(_e,ns),v(Ke,ns,null),o(K,Sa),o(K,rs),o(rs,Pa),f(e,Fs,c),f(e,W,c),v(Oe,W,null),o(W,Xa),o(W,eo),o(eo,Ya),o(eo,oo),o(oo,Qa),o(eo,Da),o(W,Ha),o(W,Z),v(so,Z,null),o(Z,qa),o(Z,O),o(O,La),o(O,jo),o(jo,Ka),o(O,Oa),o(O,ls),o(ls,en),o(O,on),o(Z,sn),v(ye,Z,null),o(Z,tn),v(be,Z,null),zs=!0},p(e,[c]){const to={};c&2&&(to.$$scope={dirty:c,ctx:e}),le.$set(to);const is={};c&2&&(is.$$scope={dirty:c,ctx:e}),he.$set(is);const ds={};c&2&&(ds.$$scope={dirty:c,ctx:e}),fe.$set(ds);const cs={};c&2&&(cs.$$scope={dirty:c,ctx:e}),ge.$set(cs);const ao={};c&2&&(ao.$$scope={dirty:c,ctx:e}),Me.$set(ao);const ms={};c&2&&(ms.$$scope={dirty:c,ctx:e}),ye.$set(ms);const ps={};c&2&&(ps.$$scope={dirty:c,ctx:e}),be.$set(ps)},i(e){zs||(T(r.$$.fragment,e),T(Ee.$$.fragment,e),T(Ue.$$.fragment,e),T(Ce.$$.fragment,e),T($e.$$.fragment,e),T(le.$$.fragment,e),T(xe.$$.fragment,e),T(Fe.$$.fragment,e),T(ze.$$.fragment,e),T(Be.$$.fragment,e),T(Ge.$$.fragment,e),T(Ne.$$.fragment,e),T(Re.$$.fragment,e),T(Se.$$.fragment,e),T(Ye.$$.fragment,e),T(he.$$.fragment,e),T(fe.$$.fragment,e),T(Qe.$$.fragment,e),T(De.$$.fragment,e),T(Le.$$.fragment,e),T(ge.$$.fragment,e),T(Me.$$.fragment,e),T(Ke.$$.fragment,e),T(Oe.$$.fragment,e),T(so.$$.fragment,e),T(ye.$$.fragment,e),T(be.$$.fragment,e),zs=!0)},o(e){j(r.$$.fragment,e),j(Ee.$$.fragment,e),j(Ue.$$.fragment,e),j(Ce.$$.fragment,e),j($e.$$.fragment,e),j(le.$$.fragment,e),j(xe.$$.fragment,e),j(Fe.$$.fragment,e),j(ze.$$.fragment,e),j(Be.$$.fragment,e),j(Ge.$$.fragment,e),j(Ne.$$.fragment,e),j(Re.$$.fragment,e),j(Se.$$.fragment,e),j(Ye.$$.fragment,e),j(he.$$.fragment,e),j(fe.$$.fragment,e),j(Qe.$$.fragment,e),j(De.$$.fragment,e),j(Le.$$.fragment,e),j(ge.$$.fragment,e),j(Me.$$.fragment,e),j(Ke.$$.fragment,e),j(Oe.$$.fragment,e),j(so.$$.fragment,e),j(ye.$$.fragment,e),j(be.$$.fragment,e),zs=!1},d(e){s(h),e&&s(y),e&&s(M),E(r),e&&s(hs),e&&s(G),E(Ee),e&&s(fs),e&&s(F),e&&s(us),e&&s(ro),e&&s(gs),e&&s(lo),e&&s(Ms),e&&s(io),e&&s(_s),e&&s(se),e&&s(ys),e&&s(te),e&&s(bs),e&&s(ae),e&&s(ws),e&&s(z),e&&s(vs),e&&s(N),E(Ue),e&&s(Ts),e&&s(fo),e&&s(js),e&&s(uo),e&&s(Es),e&&s(B),e&&s(Js),e&&s(R),E(Ce),e&&s(Vs),e&&s(A),E($e),E(le),e&&s(As),e&&s(X),E(xe),e&&s(Is),e&&s(Y),E(Fe),E(ze),e&&s(Us),e&&s(Q),E(Be),e&&s(Zs),e&&s(k),E(Ge),E(Ne),e&&s(ks),e&&s(D),E(Re),e&&s(Cs),e&&s(C),E(Se),E(Ye),E(he),E(fe),e&&s($s),e&&s(q),E(Qe),e&&s(Ws),e&&s($),E(De),E(Le),E(ge),E(Me),e&&s(xs),e&&s(K),E(Ke),e&&s(Fs),e&&s(W),E(Oe),E(so),E(ye),E(be)}}}const Jr={local:"videomae",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.VideoMAEConfig",title:"VideoMAEConfig"},{local:"transformers.VideoMAEFeatureExtractor",title:"VideoMAEFeatureExtractor"},{local:"transformers.VideoMAEImageProcessor",title:"VideoMAEImageProcessor"},{local:"transformers.VideoMAEModel",title:"VideoMAEModel"},{local:"transformers.VideoMAEForPreTraining",title:"VideoMAEForPreTraining"},{local:"transformers.VideoMAEForVideoClassification",title:"VideoMAEForVideoClassification"}],title:"VideoMAE"};function Vr(J){return Mr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class $r extends pr{constructor(h){super();hr(this,h,Vr,Er,fr,{})}}export{$r as default,Jr as metadata};
