import{S as mr,i as hr,s as fr,e as a,k as p,w as b,t as l,M as ur,c as t,d as s,m,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 sa}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 aa}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as ee}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as oa}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function _r(J){let h,y,M,u,_;return u=new aa({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=a("p"),y=l("Example:"),M=p(),b(u.$$.fragment)},l(r){h=t(r,"P",{});var g=n(h);y=i(g,"Example:"),g.forEach(s),M=m(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:sa,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=a("p"),y=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),M=a("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=t(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=t(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 aa({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=a("p"),y=l("Examples:"),M=p(),b(u.$$.fragment)},l(r){h=t(r,"P",{});var g=n(h);y=i(g,"Examples:"),g.forEach(s),M=m(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:sa,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=a("p"),y=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),M=a("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=t(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=t(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 aa({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=a("p"),y=l("Examples:"),M=p(),b(u.$$.fragment)},l(r){h=t(r,"P",{});var g=n(h);y=i(g,"Examples:"),g.forEach(s),M=m(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:sa,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=a("p"),y=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),M=a("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=t(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=t(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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IwcmVhZF92aWRlb19weWF2KGNvbnRhaW5lciUyQyUyMGluZGljZXMpJTBBJTBBaW1hZ2VfcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZCglMjJNQ0ctTkpVJTJGdmlkZW9tYWUtYmFzZS1maW5ldHVuZWQta2luZXRpY3MlMjIpJTBBbW9kZWwlMjAlM0QlMjBWaWRlb01BRUZvclZpZGVvQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMk1DRy1OSlUlMkZ2aWRlb21hZS1iYXNlLWZpbmV0dW5lZC1raW5ldGljcyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjBpbWFnZV9wcm9jZXNzb3IobGlzdCh2aWRlbyklMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlMEElMEElMjMlMjBtb2RlbCUyMHByZWRpY3RzJTIwb25lJTIwb2YlMjB0aGUlMjA0MDAlMjBLaW5ldGljcy00MDAlMjBjbGFzc2VzJTBBcHJlZGljdGVkX2xhYmVsJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSkuaXRlbSgpJTBBcHJpbnQobW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2xhYmVsJTVEKQ==",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=a("p"),y=l("Examples:"),M=p(),b(u.$$.fragment)},l(r){h=t(r,"P",{});var g=n(h);y=i(g,"Examples:"),g.forEach(s),M=m(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:sa,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,ta,hs,G,oe,Fo,Ee,na,zo,ra,fs,F,la,Je,ia,da,no,ca,pa,us,ro,ma,gs,lo,Bo,ha,Ms,io,fa,_s,se,Ve,ua,co,ga,Ma,_a,po,mo,ya,ba,ys,ae,dn,bs,te,wa,ho,va,Ta,ws,z,ja,Ae,Ea,Ja,Ie,Va,Aa,vs,N,ne,Go,Ue,Ia,No,Ua,Ts,fo,Za,js,uo,Ro,ka,Es,B,go,Ze,Ca,$a,Wa,So,Mo,xa,Fa,_o,ke,za,Ba,Js,R,re,Po,Ce,Ga,Xo,Na,Vs,A,$e,Ra,S,Sa,yo,Pa,Xa,We,Ya,Qa,Da,P,Ha,bo,La,qa,wo,Ka,Oa,et,le,As,X,ie,Yo,xe,ot,Qo,st,Is,Y,Fe,at,de,ze,tt,Do,nt,Us,Q,ce,Ho,Be,rt,Lo,lt,Zs,k,Ge,it,qo,dt,ct,pe,Ne,pt,Ko,mt,ks,D,me,Oo,Re,ht,es,ft,Cs,C,Se,ut,Pe,gt,Xe,Mt,_t,yt,I,Ye,bt,H,wt,vo,vt,Tt,os,jt,Et,Jt,he,Vt,fe,$s,L,ue,ss,Qe,At,as,It,Ws,$,De,Ut,He,Zt,Le,kt,Ct,$t,U,qe,Wt,q,xt,To,Ft,zt,ts,Bt,Gt,Nt,ge,Rt,Me,xs,K,_e,ns,Ke,St,rs,Pt,Fs,W,Oe,Xt,eo,Yt,oo,Qt,Dt,Ht,Z,so,Lt,O,qt,jo,Kt,Ot,ls,en,on,sn,ye,an,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.31.0/src/transformers/models/videomae/configuration_videomae.py#L28"}}),le=new oa({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.31.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.31.0/src/transformers/image_processing_utils.py#L492"}}),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.31.0/src/transformers/models/videomae/image_processing_videomae.py#L63"}}),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:"**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"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/videomae/image_processing_videomae.py#L279"}}),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.31.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.31.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.31.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.31.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.31.0/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__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.31.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.31.0/src/transformers/models/videomae/modeling_videomae.py#L562",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 oa({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.31.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.31.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.31.0/src/transformers/models/videomae/modeling_videomae.py#L759"}}),qe=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.31.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.31.0/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__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.31.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.31.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.31.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 oa({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.31.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.31.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.31.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.31.0/en/model_doc/auto#transformers.AutoImageProcessor">AutoImageProcessor</a>. See
<a href="/docs/transformers/v4.31.0/en/model_doc/perceiver#transformers.PerceiverFeatureExtractor.__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.31.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.31.0/src/transformers/models/videomae/modeling_videomae.py#L957",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 oa({props:{anchor:"transformers.VideoMAEForVideoClassification.forward.example",$$slots:{default:[jr]},$$scope:{ctx:J}}}),{c(){h=a("meta"),y=p(),M=a("h1"),u=a("a"),_=a("span"),b(r.$$.fragment),g=p(),V=a("span"),ta=l("VideoMAE"),hs=p(),G=a("h2"),oe=a("a"),Fo=a("span"),b(Ee.$$.fragment),na=p(),zo=a("span"),ra=l("Overview"),fs=p(),F=a("p"),la=l("The VideoMAE model was proposed in "),Je=a("a"),ia=l("VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training"),da=l(` by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
VideoMAE extends masked auto encoders (`),no=a("a"),ca=l("MAE"),pa=l(") to video, claiming state-of-the-art performance on several video classification benchmarks."),us=p(),ro=a("p"),ma=l("The abstract from the paper is the following:"),gs=p(),lo=a("p"),Bo=a("em"),ha=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=p(),io=a("p"),fa=l("Tips:"),_s=p(),se=a("ul"),Ve=a("li"),ua=l("One can use "),co=a("a"),ga=l("VideoMAEImageProcessor"),Ma=l(" to prepare videos for the model. It will resize + normalize all frames of a video for you."),_a=p(),po=a("li"),mo=a("a"),ya=l("VideoMAEForPreTraining"),ba=l(" includes the decoder on top for self-supervised pre-training."),ys=p(),ae=a("img"),bs=p(),te=a("small"),wa=l("VideoMAE pre-training. Taken from the "),ho=a("a"),va=l("original paper"),Ta=l("."),ws=p(),z=a("p"),ja=l("This model was contributed by "),Ae=a("a"),Ea=l("nielsr"),Ja=l(`.
The original code can be found `),Ie=a("a"),Va=l("here"),Aa=l("."),vs=p(),N=a("h2"),ne=a("a"),Go=a("span"),b(Ue.$$.fragment),Ia=p(),No=a("span"),Ua=l("Resources"),Ts=p(),fo=a("p"),Za=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=p(),uo=a("p"),Ro=a("strong"),ka=l("Video classification"),Es=p(),B=a("ul"),go=a("li"),Ze=a("a"),Ca=l("A notebook"),$a=l(` that shows how
to fine-tune a VideoMAE model on a custom dataset.`),Wa=p(),So=a("li"),Mo=a("a"),xa=l("Video classification task guide"),Fa=p(),_o=a("li"),ke=a("a"),za=l("A \u{1F917} Space"),Ba=l(" showing how to perform inference with a video classification model."),Js=p(),R=a("h2"),re=a("a"),Po=a("span"),b(Ce.$$.fragment),Ga=p(),Xo=a("span"),Na=l("VideoMAEConfig"),Vs=p(),A=a("div"),b($e.$$.fragment),Ra=p(),S=a("p"),Sa=l("This is the configuration class to store the configuration of a "),yo=a("a"),Pa=l("VideoMAEModel"),Xa=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=a("a"),Ya=l("MCG-NJU/videomae-base"),Qa=l(" architecture."),Da=p(),P=a("p"),Ha=l("Configuration objects inherit from "),bo=a("a"),La=l("PretrainedConfig"),qa=l(` and can be used to control the model outputs. Read the
documentation from `),wo=a("a"),Ka=l("PretrainedConfig"),Oa=l(" for more information."),et=p(),b(le.$$.fragment),As=p(),X=a("h2"),ie=a("a"),Yo=a("span"),b(xe.$$.fragment),ot=p(),Qo=a("span"),st=l("VideoMAEFeatureExtractor"),Is=p(),Y=a("div"),b(Fe.$$.fragment),at=p(),de=a("div"),b(ze.$$.fragment),tt=p(),Do=a("p"),nt=l("Preprocess an image or a batch of images."),Us=p(),Q=a("h2"),ce=a("a"),Ho=a("span"),b(Be.$$.fragment),rt=p(),Lo=a("span"),lt=l("VideoMAEImageProcessor"),Zs=p(),k=a("div"),b(Ge.$$.fragment),it=p(),qo=a("p"),dt=l("Constructs a VideoMAE image processor."),ct=p(),pe=a("div"),b(Ne.$$.fragment),pt=p(),Ko=a("p"),mt=l("Preprocess an image or batch of images."),ks=p(),D=a("h2"),me=a("a"),Oo=a("span"),b(Re.$$.fragment),ht=p(),es=a("span"),ft=l("VideoMAEModel"),Cs=p(),C=a("div"),b(Se.$$.fragment),ut=p(),Pe=a("p"),gt=l(`The bare VideoMAE Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Xe=a("a"),Mt=l("torch.nn.Module"),_t=l(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),yt=p(),I=a("div"),b(Ye.$$.fragment),bt=p(),H=a("p"),wt=l("The "),vo=a("a"),vt=l("VideoMAEModel"),Tt=l(" forward method, overrides the "),os=a("code"),jt=l("__call__"),Et=l(" special method."),Jt=p(),b(he.$$.fragment),Vt=p(),b(fe.$$.fragment),$s=p(),L=a("h2"),ue=a("a"),ss=a("span"),b(Qe.$$.fragment),At=p(),as=a("span"),It=l("VideoMAEForPreTraining"),Ws=p(),$=a("div"),b(De.$$.fragment),Ut=p(),He=a("p"),Zt=l(`The VideoMAE Model transformer with the decoder on top for self-supervised pre-training.
This model is a PyTorch `),Le=a("a"),kt=l("torch.nn.Module"),Ct=l(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),$t=p(),U=a("div"),b(qe.$$.fragment),Wt=p(),q=a("p"),xt=l("The "),To=a("a"),Ft=l("VideoMAEForPreTraining"),zt=l(" forward method, overrides the "),ts=a("code"),Bt=l("__call__"),Gt=l(" special method."),Nt=p(),b(ge.$$.fragment),Rt=p(),b(Me.$$.fragment),xs=p(),K=a("h2"),_e=a("a"),ns=a("span"),b(Ke.$$.fragment),St=p(),rs=a("span"),Pt=l("VideoMAEForVideoClassification"),Fs=p(),W=a("div"),b(Oe.$$.fragment),Xt=p(),eo=a("p"),Yt=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=a("a"),Qt=l("torch.nn.Module"),Dt=l(` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ht=p(),Z=a("div"),b(so.$$.fragment),Lt=p(),O=a("p"),qt=l("The "),jo=a("a"),Kt=l("VideoMAEForVideoClassification"),Ot=l(" forward method, overrides the "),ls=a("code"),en=l("__call__"),on=l(" special method."),sn=p(),b(ye.$$.fragment),an=p(),b(be.$$.fragment),this.h()},l(e){const c=ur('[data-svelte="svelte-1phssyn"]',document.head);h=t(c,"META",{name:!0,content:!0}),c.forEach(s),y=m(e),M=t(e,"H1",{class:!0});var ao=n(M);u=t(ao,"A",{id:!0,class:!0,href:!0});var is=n(u);_=t(is,"SPAN",{});var ds=n(_);w(r.$$.fragment,ds),ds.forEach(s),is.forEach(s),g=m(ao),V=t(ao,"SPAN",{});var cs=n(V);ta=i(cs,"VideoMAE"),cs.forEach(s),ao.forEach(s),hs=m(e),G=t(e,"H2",{class:!0});var to=n(G);oe=t(to,"A",{id:!0,class:!0,href:!0});var ps=n(oe);Fo=t(ps,"SPAN",{});var ms=n(Fo);w(Ee.$$.fragment,ms),ms.forEach(s),ps.forEach(s),na=m(to),zo=t(to,"SPAN",{});var cn=n(zo);ra=i(cn,"Overview"),cn.forEach(s),to.forEach(s),fs=m(e),F=t(e,"P",{});var Eo=n(F);la=i(Eo,"The VideoMAE model was proposed in "),Je=t(Eo,"A",{href:!0,rel:!0});var pn=n(Je);ia=i(pn,"VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training"),pn.forEach(s),da=i(Eo,` by Zhan Tong, Yibing Song, Jue Wang, Limin Wang.
VideoMAE extends masked auto encoders (`),no=t(Eo,"A",{href:!0});var mn=n(no);ca=i(mn,"MAE"),mn.forEach(s),pa=i(Eo,") to video, claiming state-of-the-art performance on several video classification benchmarks."),Eo.forEach(s),us=m(e),ro=t(e,"P",{});var hn=n(ro);ma=i(hn,"The abstract from the paper is the following:"),hn.forEach(s),gs=m(e),lo=t(e,"P",{});var fn=n(lo);Bo=t(fn,"EM",{});var un=n(Bo);ha=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=m(e),io=t(e,"P",{});var gn=n(io);fa=i(gn,"Tips:"),gn.forEach(s),_s=m(e),se=t(e,"UL",{});var Bs=n(se);Ve=t(Bs,"LI",{});var Gs=n(Ve);ua=i(Gs,"One can use "),co=t(Gs,"A",{href:!0});var Mn=n(co);ga=i(Mn,"VideoMAEImageProcessor"),Mn.forEach(s),Ma=i(Gs," to prepare videos for the model. It will resize + normalize all frames of a video for you."),Gs.forEach(s),_a=m(Bs),po=t(Bs,"LI",{});var tn=n(po);mo=t(tn,"A",{href:!0});var _n=n(mo);ya=i(_n,"VideoMAEForPreTraining"),_n.forEach(s),ba=i(tn," includes the decoder on top for self-supervised pre-training."),tn.forEach(s),Bs.forEach(s),ys=m(e),ae=t(e,"IMG",{src:!0,alt:!0,width:!0}),bs=m(e),te=t(e,"SMALL",{});var Ns=n(te);wa=i(Ns,"VideoMAE pre-training. Taken from the "),ho=t(Ns,"A",{href:!0});var yn=n(ho);va=i(yn,"original paper"),yn.forEach(s),Ta=i(Ns,"."),Ns.forEach(s),ws=m(e),z=t(e,"P",{});var Jo=n(z);ja=i(Jo,"This model was contributed by "),Ae=t(Jo,"A",{href:!0,rel:!0});var bn=n(Ae);Ea=i(bn,"nielsr"),bn.forEach(s),Ja=i(Jo,`.
The original code can be found `),Ie=t(Jo,"A",{href:!0,rel:!0});var wn=n(Ie);Va=i(wn,"here"),wn.forEach(s),Aa=i(Jo,"."),Jo.forEach(s),vs=m(e),N=t(e,"H2",{class:!0});var Rs=n(N);ne=t(Rs,"A",{id:!0,class:!0,href:!0});var vn=n(ne);Go=t(vn,"SPAN",{});var Tn=n(Go);w(Ue.$$.fragment,Tn),Tn.forEach(s),vn.forEach(s),Ia=m(Rs),No=t(Rs,"SPAN",{});var jn=n(No);Ua=i(jn,"Resources"),jn.forEach(s),Rs.forEach(s),Ts=m(e),fo=t(e,"P",{});var En=n(fo);Za=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=m(e),uo=t(e,"P",{});var Jn=n(uo);Ro=t(Jn,"STRONG",{});var Vn=n(Ro);ka=i(Vn,"Video classification"),Vn.forEach(s),Jn.forEach(s),Es=m(e),B=t(e,"UL",{});var Vo=n(B);go=t(Vo,"LI",{});var nn=n(go);Ze=t(nn,"A",{href:!0,rel:!0});var An=n(Ze);Ca=i(An,"A notebook"),An.forEach(s),$a=i(nn,` that shows how
to fine-tune a VideoMAE model on a custom dataset.`),nn.forEach(s),Wa=m(Vo),So=t(Vo,"LI",{});var In=n(So);Mo=t(In,"A",{href:!0});var Un=n(Mo);xa=i(Un,"Video classification task guide"),Un.forEach(s),In.forEach(s),Fa=m(Vo),_o=t(Vo,"LI",{});var rn=n(_o);ke=t(rn,"A",{href:!0,rel:!0});var Zn=n(ke);za=i(Zn,"A \u{1F917} Space"),Zn.forEach(s),Ba=i(rn," showing how to perform inference with a video classification model."),rn.forEach(s),Vo.forEach(s),Js=m(e),R=t(e,"H2",{class:!0});var Ss=n(R);re=t(Ss,"A",{id:!0,class:!0,href:!0});var kn=n(re);Po=t(kn,"SPAN",{});var Cn=n(Po);w(Ce.$$.fragment,Cn),Cn.forEach(s),kn.forEach(s),Ga=m(Ss),Xo=t(Ss,"SPAN",{});var $n=n(Xo);Na=i($n,"VideoMAEConfig"),$n.forEach(s),Ss.forEach(s),Vs=m(e),A=t(e,"DIV",{class:!0});var we=n(A);w($e.$$.fragment,we),Ra=m(we),S=t(we,"P",{});var Ao=n(S);Sa=i(Ao,"This is the configuration class to store the configuration of a "),yo=t(Ao,"A",{href:!0});var Wn=n(yo);Pa=i(Wn,"VideoMAEModel"),Wn.forEach(s),Xa=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=t(Ao,"A",{href:!0,rel:!0});var xn=n(We);Ya=i(xn,"MCG-NJU/videomae-base"),xn.forEach(s),Qa=i(Ao," architecture."),Ao.forEach(s),Da=m(we),P=t(we,"P",{});var Io=n(P);Ha=i(Io,"Configuration objects inherit from "),bo=t(Io,"A",{href:!0});var Fn=n(bo);La=i(Fn,"PretrainedConfig"),Fn.forEach(s),qa=i(Io,` and can be used to control the model outputs. Read the
documentation from `),wo=t(Io,"A",{href:!0});var zn=n(wo);Ka=i(zn,"PretrainedConfig"),zn.forEach(s),Oa=i(Io," for more information."),Io.forEach(s),et=m(we),w(le.$$.fragment,we),we.forEach(s),As=m(e),X=t(e,"H2",{class:!0});var Ps=n(X);ie=t(Ps,"A",{id:!0,class:!0,href:!0});var Bn=n(ie);Yo=t(Bn,"SPAN",{});var Gn=n(Yo);w(xe.$$.fragment,Gn),Gn.forEach(s),Bn.forEach(s),ot=m(Ps),Qo=t(Ps,"SPAN",{});var Nn=n(Qo);st=i(Nn,"VideoMAEFeatureExtractor"),Nn.forEach(s),Ps.forEach(s),Is=m(e),Y=t(e,"DIV",{class:!0});var Xs=n(Y);w(Fe.$$.fragment,Xs),at=m(Xs),de=t(Xs,"DIV",{class:!0});var Ys=n(de);w(ze.$$.fragment,Ys),tt=m(Ys),Do=t(Ys,"P",{});var Rn=n(Do);nt=i(Rn,"Preprocess an image or a batch of images."),Rn.forEach(s),Ys.forEach(s),Xs.forEach(s),Us=m(e),Q=t(e,"H2",{class:!0});var Qs=n(Q);ce=t(Qs,"A",{id:!0,class:!0,href:!0});var Sn=n(ce);Ho=t(Sn,"SPAN",{});var Pn=n(Ho);w(Be.$$.fragment,Pn),Pn.forEach(s),Sn.forEach(s),rt=m(Qs),Lo=t(Qs,"SPAN",{});var Xn=n(Lo);lt=i(Xn,"VideoMAEImageProcessor"),Xn.forEach(s),Qs.forEach(s),Zs=m(e),k=t(e,"DIV",{class:!0});var Uo=n(k);w(Ge.$$.fragment,Uo),it=m(Uo),qo=t(Uo,"P",{});var Yn=n(qo);dt=i(Yn,"Constructs a VideoMAE image processor."),Yn.forEach(s),ct=m(Uo),pe=t(Uo,"DIV",{class:!0});var Ds=n(pe);w(Ne.$$.fragment,Ds),pt=m(Ds),Ko=t(Ds,"P",{});var Qn=n(Ko);mt=i(Qn,"Preprocess an image or batch of images."),Qn.forEach(s),Ds.forEach(s),Uo.forEach(s),ks=m(e),D=t(e,"H2",{class:!0});var Hs=n(D);me=t(Hs,"A",{id:!0,class:!0,href:!0});var Dn=n(me);Oo=t(Dn,"SPAN",{});var Hn=n(Oo);w(Re.$$.fragment,Hn),Hn.forEach(s),Dn.forEach(s),ht=m(Hs),es=t(Hs,"SPAN",{});var Ln=n(es);ft=i(Ln,"VideoMAEModel"),Ln.forEach(s),Hs.forEach(s),Cs=m(e),C=t(e,"DIV",{class:!0});var Zo=n(C);w(Se.$$.fragment,Zo),ut=m(Zo),Pe=t(Zo,"P",{});var Ls=n(Pe);gt=i(Ls,`The bare VideoMAE Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Xe=t(Ls,"A",{href:!0,rel:!0});var qn=n(Xe);Mt=i(qn,"torch.nn.Module"),qn.forEach(s),_t=i(Ls,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ls.forEach(s),yt=m(Zo),I=t(Zo,"DIV",{class:!0});var ve=n(I);w(Ye.$$.fragment,ve),bt=m(ve),H=t(ve,"P",{});var ko=n(H);wt=i(ko,"The "),vo=t(ko,"A",{href:!0});var Kn=n(vo);vt=i(Kn,"VideoMAEModel"),Kn.forEach(s),Tt=i(ko," forward method, overrides the "),os=t(ko,"CODE",{});var On=n(os);jt=i(On,"__call__"),On.forEach(s),Et=i(ko," special method."),ko.forEach(s),Jt=m(ve),w(he.$$.fragment,ve),Vt=m(ve),w(fe.$$.fragment,ve),ve.forEach(s),Zo.forEach(s),$s=m(e),L=t(e,"H2",{class:!0});var qs=n(L);ue=t(qs,"A",{id:!0,class:!0,href:!0});var er=n(ue);ss=t(er,"SPAN",{});var or=n(ss);w(Qe.$$.fragment,or),or.forEach(s),er.forEach(s),At=m(qs),as=t(qs,"SPAN",{});var sr=n(as);It=i(sr,"VideoMAEForPreTraining"),sr.forEach(s),qs.forEach(s),Ws=m(e),$=t(e,"DIV",{class:!0});var Co=n($);w(De.$$.fragment,Co),Ut=m(Co),He=t(Co,"P",{});var Ks=n(He);Zt=i(Ks,`The VideoMAE Model transformer with the decoder on top for self-supervised pre-training.
This model is a PyTorch `),Le=t(Ks,"A",{href:!0,rel:!0});var ar=n(Le);kt=i(ar,"torch.nn.Module"),ar.forEach(s),Ct=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),$t=m(Co),U=t(Co,"DIV",{class:!0});var Te=n(U);w(qe.$$.fragment,Te),Wt=m(Te),q=t(Te,"P",{});var $o=n(q);xt=i($o,"The "),To=t($o,"A",{href:!0});var tr=n(To);Ft=i(tr,"VideoMAEForPreTraining"),tr.forEach(s),zt=i($o," forward method, overrides the "),ts=t($o,"CODE",{});var nr=n(ts);Bt=i(nr,"__call__"),nr.forEach(s),Gt=i($o," special method."),$o.forEach(s),Nt=m(Te),w(ge.$$.fragment,Te),Rt=m(Te),w(Me.$$.fragment,Te),Te.forEach(s),Co.forEach(s),xs=m(e),K=t(e,"H2",{class:!0});var Os=n(K);_e=t(Os,"A",{id:!0,class:!0,href:!0});var rr=n(_e);ns=t(rr,"SPAN",{});var lr=n(ns);w(Ke.$$.fragment,lr),lr.forEach(s),rr.forEach(s),St=m(Os),rs=t(Os,"SPAN",{});var ir=n(rs);Pt=i(ir,"VideoMAEForVideoClassification"),ir.forEach(s),Os.forEach(s),Fs=m(e),W=t(e,"DIV",{class:!0});var Wo=n(W);w(Oe.$$.fragment,Wo),Xt=m(Wo),eo=t(Wo,"P",{});var ea=n(eo);Yt=i(ea,`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(ea,"A",{href:!0,rel:!0});var dr=n(oo);Qt=i(dr,"torch.nn.Module"),dr.forEach(s),Dt=i(ea,` subclass. Use it
as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ea.forEach(s),Ht=m(Wo),Z=t(Wo,"DIV",{class:!0});var je=n(Z);w(so.$$.fragment,je),Lt=m(je),O=t(je,"P",{});var xo=n(O);qt=i(xo,"The "),jo=t(xo,"A",{href:!0});var cr=n(jo);Kt=i(cr,"VideoMAEForVideoClassification"),cr.forEach(s),Ot=i(xo," forward method, overrides the "),ls=t(xo,"CODE",{});var pr=n(ls);en=i(pr,"__call__"),pr.forEach(s),on=i(xo," special method."),xo.forEach(s),sn=m(je),w(ye.$$.fragment,je),an=m(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.31.0/en/model_doc/videomae#transformers.VideoMAEImageProcessor"),d(mo,"href","/docs/transformers/v4.31.0/en/model_doc/videomae#transformers.VideoMAEForPreTraining"),gr(ae.src,dn="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/model_doc/videomae_architecture.jpeg")||d(ae,"src",dn),d(ae,"alt","drawing"),d(ae,"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.31.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.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),d(wo,"href","/docs/transformers/v4.31.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(pe,"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(me,"id","transformers.VideoMAEModel"),d(me,"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(me,"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.31.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(L,"class","relative group"),d(Le,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),d(Le,"rel","nofollow"),d(To,"href","/docs/transformers/v4.31.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.31.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,ta),f(e,hs,c),f(e,G,c),o(G,oe),o(oe,Fo),v(Ee,Fo,null),o(G,na),o(G,zo),o(zo,ra),f(e,fs,c),f(e,F,c),o(F,la),o(F,Je),o(Je,ia),o(F,da),o(F,no),o(no,ca),o(F,pa),f(e,us,c),f(e,ro,c),o(ro,ma),f(e,gs,c),f(e,lo,c),o(lo,Bo),o(Bo,ha),f(e,Ms,c),f(e,io,c),o(io,fa),f(e,_s,c),f(e,se,c),o(se,Ve),o(Ve,ua),o(Ve,co),o(co,ga),o(Ve,Ma),o(se,_a),o(se,po),o(po,mo),o(mo,ya),o(po,ba),f(e,ys,c),f(e,ae,c),f(e,bs,c),f(e,te,c),o(te,wa),o(te,ho),o(ho,va),o(te,Ta),f(e,ws,c),f(e,z,c),o(z,ja),o(z,Ae),o(Ae,Ea),o(z,Ja),o(z,Ie),o(Ie,Va),o(z,Aa),f(e,vs,c),f(e,N,c),o(N,ne),o(ne,Go),v(Ue,Go,null),o(N,Ia),o(N,No),o(No,Ua),f(e,Ts,c),f(e,fo,c),o(fo,Za),f(e,js,c),f(e,uo,c),o(uo,Ro),o(Ro,ka),f(e,Es,c),f(e,B,c),o(B,go),o(go,Ze),o(Ze,Ca),o(go,$a),o(B,Wa),o(B,So),o(So,Mo),o(Mo,xa),o(B,Fa),o(B,_o),o(_o,ke),o(ke,za),o(_o,Ba),f(e,Js,c),f(e,R,c),o(R,re),o(re,Po),v(Ce,Po,null),o(R,Ga),o(R,Xo),o(Xo,Na),f(e,Vs,c),f(e,A,c),v($e,A,null),o(A,Ra),o(A,S),o(S,Sa),o(S,yo),o(yo,Pa),o(S,Xa),o(S,We),o(We,Ya),o(S,Qa),o(A,Da),o(A,P),o(P,Ha),o(P,bo),o(bo,La),o(P,qa),o(P,wo),o(wo,Ka),o(P,Oa),o(A,et),v(le,A,null),f(e,As,c),f(e,X,c),o(X,ie),o(ie,Yo),v(xe,Yo,null),o(X,ot),o(X,Qo),o(Qo,st),f(e,Is,c),f(e,Y,c),v(Fe,Y,null),o(Y,at),o(Y,de),v(ze,de,null),o(de,tt),o(de,Do),o(Do,nt),f(e,Us,c),f(e,Q,c),o(Q,ce),o(ce,Ho),v(Be,Ho,null),o(Q,rt),o(Q,Lo),o(Lo,lt),f(e,Zs,c),f(e,k,c),v(Ge,k,null),o(k,it),o(k,qo),o(qo,dt),o(k,ct),o(k,pe),v(Ne,pe,null),o(pe,pt),o(pe,Ko),o(Ko,mt),f(e,ks,c),f(e,D,c),o(D,me),o(me,Oo),v(Re,Oo,null),o(D,ht),o(D,es),o(es,ft),f(e,Cs,c),f(e,C,c),v(Se,C,null),o(C,ut),o(C,Pe),o(Pe,gt),o(Pe,Xe),o(Xe,Mt),o(Pe,_t),o(C,yt),o(C,I),v(Ye,I,null),o(I,bt),o(I,H),o(H,wt),o(H,vo),o(vo,vt),o(H,Tt),o(H,os),o(os,jt),o(H,Et),o(I,Jt),v(he,I,null),o(I,Vt),v(fe,I,null),f(e,$s,c),f(e,L,c),o(L,ue),o(ue,ss),v(Qe,ss,null),o(L,At),o(L,as),o(as,It),f(e,Ws,c),f(e,$,c),v(De,$,null),o($,Ut),o($,He),o(He,Zt),o(He,Le),o(Le,kt),o(He,Ct),o($,$t),o($,U),v(qe,U,null),o(U,Wt),o(U,q),o(q,xt),o(q,To),o(To,Ft),o(q,zt),o(q,ts),o(ts,Bt),o(q,Gt),o(U,Nt),v(ge,U,null),o(U,Rt),v(Me,U,null),f(e,xs,c),f(e,K,c),o(K,_e),o(_e,ns),v(Ke,ns,null),o(K,St),o(K,rs),o(rs,Pt),f(e,Fs,c),f(e,W,c),v(Oe,W,null),o(W,Xt),o(W,eo),o(eo,Yt),o(eo,oo),o(oo,Qt),o(eo,Dt),o(W,Ht),o(W,Z),v(so,Z,null),o(Z,Lt),o(Z,O),o(O,qt),o(O,jo),o(jo,Kt),o(O,Ot),o(O,ls),o(ls,en),o(O,on),o(Z,sn),v(ye,Z,null),o(Z,an),v(be,Z,null),zs=!0},p(e,[c]){const ao={};c&2&&(ao.$$scope={dirty:c,ctx:e}),le.$set(ao);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 to={};c&2&&(to.$$scope={dirty:c,ctx:e}),Me.$set(to);const ps={};c&2&&(ps.$$scope={dirty:c,ctx:e}),ye.$set(ps);const ms={};c&2&&(ms.$$scope={dirty:c,ctx:e}),be.$set(ms)},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(qe.$$.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(qe.$$.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(ae),e&&s(bs),e&&s(te),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(L),E(Qe),e&&s(Ws),e&&s($),E(De),E(qe),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 mr{constructor(h){super();hr(this,h,Vr,Er,fr,{})}}export{$r as default,Jr as metadata};
