Buckets:

download
raw
30.2 kB
import"../chunks/DsnmJJEf.js";import{i as P,h as W,C as I,H as o,a as J,D as t,E as S,s as Z}from"../chunks/D6eQvJIN.js";import{p as q,o as R,s as e,f as B,a as m,b as V,c as n,d as p,n as r,r as a}from"../chunks/D9TCMYxZ.js";import{T as X}from"../chunks/eoUhp3Ag.js";const L='{"title":"EoMT-DINOv3","local":"eomt-dinov3","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage examples","local":"usage-examples","sections":[],"depth":2},{"title":"EomtDinov3Config","local":"transformers.EomtDinov3Config","sections":[],"depth":2},{"title":"EomtDinov3PreTrainedModel","local":"transformers.EomtDinov3PreTrainedModel","sections":[],"depth":2},{"title":"EomtDinov3ForUniversalSegmentation","local":"transformers.EomtDinov3ForUniversalSegmentation","sections":[],"depth":2}],"depth":1}';var O=p('<meta name="hf:doc:metadata"/>'),G=p(`<p>Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code> instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.</p>`),Q=p(`<p></p> <p><em>This model was published in HF papers on 2025-03-24 and contributed to Hugging Face Transformers on 2026-02-02.</em></p> <!> <!> <div class="flex flex-wrap space-x-1"><img alt="SDPA" src="https://img.shields.io/badge/SDPA-DE3412?style=flat&amp;logo=pytorch&amp;logoColor=white"/></div> <!> <p>The <strong>EoMT-DINOv3</strong> family extends the <a href="eomt">Encoder-only Mask Transformer</a> architecture with
Vision Transformers that are pre-trained using <a href="dinov3">DINOv3</a>. The update delivers stronger segmentation quality across ADE20K and COCO
benchmarks while preserving the encoder-only design that made EoMT attractive for real-time applications.</p> <p>Compared to the DINOv2-based models, the DINOv3 variants leverage rotary position embeddings, optional gated MLP blocks
and the latest pre-training recipes from Meta AI. These changes yield measurable performance gains across semantic,
instance and panoptic segmentation tasks, as highlighted in the <a href="https://github.com/tue-mps/eomt/blob/master/model_zoo/dinov3.md" rel="nofollow">DINOv3 model zoo</a>.</p> <p>The original EoMT architecture was introduced in the CVPR 2025 Highlight paper <em><a href="https://huggingface.co/papers/2503.19108" rel="nofollow">Your ViT is Secretly an Image
Segmentation Model</a></em> by Tommie Kerssies, Niccolò Cavagnero, Alexander Hermans,
Narges Norouzi, Giuseppe Averta, Bastian Leibe, Gijs Dubbelman and Daan de Geus. The DINOv3 upgrade keeps the same
lightweight segmentation head and query-based inference strategy while swapping the encoder for DINOv3 ViT checkpoints.</p> <p>Tips:</p> <ul><li>The configuration exposes DINOv3-specific knobs such as <code>rope_theta</code> and <code>use_gated_mlp</code>. Large DINOv3 backbones
such as <code>dinov3-vitg14</code> expect <code>use_gated_mlp=True</code>.</li> <li>DINOv3 models can operate on a broader range of resolutions thanks to rotary position embeddings. The image processor
still defaults to square crops but custom sizes can be supplied through <code>AutoImageProcessor</code>.</li> <li>The pre-trained checkpoints hosted by the TU/e Mobile Perception Systems Lab provide delta weights that should be
combined with the upstream DINOv3 backbones. The conversion utilities in the <a href="https://github.com/tue-mps/eomt" rel="nofollow">official repository</a> describe this workflow in detail.</li></ul> <p>This model was contributed by <a href="https://huggingface.co/nielsr" rel="nofollow">nielsr</a>.
The original code can be found <a href="https://github.com/tue-mps/eomt" rel="nofollow">here</a>.</p> <!> <p>Below is a minimal example showing how to run panoptic segmentation with a DINOv3-backed EoMT model. The same
image processor can be reused for semantic or instance segmentation simply by swapping the checkpoint.</p> <!> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>This is the configuration class to store the configuration of a Eomt Dinov3Model. It is used to instantiate a Eomt Dinov3
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 <a href="https://huggingface.co/tue-mps/coco_panoptic_eomt_large_640_dinov3" rel="nofollow">tue-mps/coco_panoptic_eomt_large_640_dinov3</a></p> <p>Configuration objects inherit from <a href="/docs/transformers/pr_36708/en/main_classes/configuration#transformers.PreTrainedConfig">PreTrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_36708/en/main_classes/configuration#transformers.PreTrainedConfig">PreTrainedConfig</a> for more information.</p></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>This model inherits from <a href="/docs/transformers/pr_36708/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)</p> <p>This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>A mock value for a dotted path (e.g. <code>torch.float32</code>): attribute access chains,
calls behave as pass-through decorators, <code>repr</code> is the dotted path, and using it
as a base class substitutes a plain-<code>type</code> base (PEP 560 <code>__mro_entries__</code>), so
real subclasses keep a normal metaclass and <code>inspect.signature</code> reads their real <code>__init__</code> instead of a mock’s.</p></div></div> <!> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>The EoMT-DINOv3 model with head on top for instance/semantic/panoptic segmentation.</p> <p>This model inherits from <a href="/docs/transformers/pr_36708/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)</p> <p>This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.</p> <div class="docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"><!> <p>The <a href="/docs/transformers/pr_36708/en/model_doc/eomt_dinov3#transformers.EomtDinov3ForUniversalSegmentation">EomtDinov3ForUniversalSegmentation</a> forward method, overrides the <code>__call__</code> special method.</p> <!> <ul><li><strong>loss</strong> (<code>torch.Tensor</code>, <em>optional</em>) — The computed loss, returned when labels are present.</li> <li><strong>class_queries_logits</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) — A tensor of shape <code>(batch_size, num_queries, num_labels + 1)</code> representing the proposed classes for each
query. Note the <code>+ 1</code> is needed because we incorporate the null class.</li> <li><strong>masks_queries_logits</strong> (<code>torch.FloatTensor</code>, <em>optional</em>) — A tensor of shape <code>(batch_size, num_queries, height, width)</code> representing the proposed masks for each
query.</li> <li><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_channels, height, width)</code>) — Last hidden states (final feature map) of the last layer.</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>) — Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each stage) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states all layers of the model.</li> <li><strong>attentions</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) — Tuple of <code>tuple(torch.FloatTensor)</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>. Self and Cross Attentions weights from transformer decoder.</li> <li><strong>patch_offsets</strong> (<code>list[torch.Tensor]</code>, <em>optional</em>) — list of tuples indicating the image index and start and end positions of patches for semantic segmentation.</li></ul></div></div> <!> <p></p>`,1);function $(x,k){q(k,!1),R(()=>{new URLSearchParams(window.location.search).get("fw")}),P();var h=Q();W("14ct8hd",s=>{var c=O();Z(c,"content",L),m(s,c)});var g=e(B(h),4);I(g,{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"});var f=e(g,2);o(f,{title:"EoMT-DINOv3",local:"eomt-dinov3",headingTag:"h1"});var u=e(f,4);o(u,{title:"Overview",local:"overview",headingTag:"h2"});var _=e(u,14);o(_,{title:"Usage examples",local:"usage-examples",headingTag:"h2"});var v=e(_,4);J(v,{code:"aW1wb3J0JTIwcmVxdWVzdHMlMEFpbXBvcnQlMjB0b3JjaCUwQWZyb20lMjBQSUwlMjBpbXBvcnQlMjBJbWFnZSUwQSUwQWZyb20lMjB0cmFuc2Zvcm1lcnMlMjBpbXBvcnQlMjBBdXRvSW1hZ2VQcm9jZXNzb3IlMkMlMjBBdXRvTW9kZWxGb3JVbml2ZXJzYWxTZWdtZW50YXRpb24lMEElMEElMEFtb2RlbF9pZCUyMCUzRCUyMCUyMnR1ZS1tcHMlMkZlb210LWRpbm92My1jb2NvLXBhbm9wdGljLWJhc2UtNjQwJTIyJTBBcHJvY2Vzc29yJTIwJTNEJTIwQXV0b0ltYWdlUHJvY2Vzc29yLmZyb21fcHJldHJhaW5lZChtb2RlbF9pZCklMEFtb2RlbCUyMCUzRCUyMEF1dG9Nb2RlbEZvclVuaXZlcnNhbFNlZ21lbnRhdGlvbi5mcm9tX3ByZXRyYWluZWQobW9kZWxfaWQlMkMlMjBkZXZpY2VfbWFwJTNEJTIyYXV0byUyMiklMEElMEFpbWFnZSUyMCUzRCUyMEltYWdlLm9wZW4ocmVxdWVzdHMuZ2V0KCUyMmh0dHAlM0ElMkYlMkZpbWFnZXMuY29jb2RhdGFzZXQub3JnJTJGdmFsMjAxNyUyRjAwMDAwMDAzOTc2OS5qcGclMjIlMkMlMjBzdHJlYW0lM0RUcnVlKS5yYXcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwcHJvY2Vzc29yKGltYWdlcyUzRGltYWdlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMikudG8obW9kZWwuZGV2aWNlKSUwQSUwQXdpdGglMjB0b3JjaC5pbmZlcmVuY2VfbW9kZSgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQXNlZ21lbnRhdGlvbiUyMCUzRCUyMHByb2Nlc3Nvci5wb3N0X3Byb2Nlc3NfcGFub3B0aWNfc2VnbWVudGF0aW9uKG91dHB1dHMlMkMlMjB0YXJnZXRfc2l6ZXMlM0QlNUJpbWFnZS5zaXplJTVCJTNBJTNBLTElNUQlNUQpJTVCMCU1RCUwQWxpc3Qoc2VnbWVudGF0aW9uLmtleXMoKSklMEElNUInc2VnbWVudGF0aW9uJyUyQyUyMCdzZWdtZW50c19pbmZvJyU1RA==",highlighted:`<span class="hljs-keyword">import</span> requests
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">from</span> PIL <span class="hljs-keyword">import</span> Image
<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoImageProcessor, AutoModelForUniversalSegmentation
model_id = <span class="hljs-string">&quot;tue-mps/eomt-dinov3-coco-panoptic-base-640&quot;</span>
processor = AutoImageProcessor.from_pretrained(model_id)
model = AutoModelForUniversalSegmentation.from_pretrained(model_id, device_map=<span class="hljs-string">&quot;auto&quot;</span>)
image = Image.<span class="hljs-built_in">open</span>(requests.get(<span class="hljs-string">&quot;http://images.cocodataset.org/val2017/000000039769.jpg&quot;</span>, stream=<span class="hljs-literal">True</span>).raw)
inputs = processor(images=image, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>).to(model.device)
<span class="hljs-keyword">with</span> torch.inference_mode():
outputs = model(**inputs)
segmentation = processor.post_process_panoptic_segmentation(outputs, target_sizes=[image.size[::-<span class="hljs-number">1</span>]])[<span class="hljs-number">0</span>]
<span class="hljs-built_in">list</span>(segmentation.keys())
[<span class="hljs-string">&#x27;segmentation&#x27;</span>, <span class="hljs-string">&#x27;segments_info&#x27;</span>]`,lang:"python",wrap:!1});var b=e(v,2);o(b,{title:"EomtDinov3Config",local:"transformers.EomtDinov3Config",headingTag:"h2"});var i=e(b,2),N=n(i);t(N,{name:"class transformers.EomtDinov3Config",anchor:"transformers.EomtDinov3Config",source:"https://github.com/huggingface/transformers/blob/vr_36708/src/transformers/models/eomt_dinov3/configuration_eomt_dinov3.py#L29",parameters:[{name:"transformers_version",val:": str | None = None"},{name:"architectures",val:": list[str] | None = None"},{name:"output_hidden_states",val:": bool | None = False"},{name:"return_dict",val:": bool | None = True"},{name:"dtype",val:": str | torch.dtype | None = None"},{name:"chunk_size_feed_forward",val:": int = 0"},{name:"is_encoder_decoder",val:": bool = False"},{name:"id2label",val:": dict[int, str] | dict[str, str] | None = None"},{name:"label2id",val:": dict[str, int] | dict[str, str] | None = None"},{name:"problem_type",val:": Literal['regression', 'single_label_classification', 'multi_label_classification'] | None = None"},{name:"hidden_size",val:": int = 1024"},{name:"num_hidden_layers",val:": int = 24"},{name:"num_attention_heads",val:": int = 16"},{name:"hidden_act",val:": str = 'gelu'"},{name:"hidden_dropout_prob",val:": float | int = 0.0"},{name:"initializer_range",val:": float = 0.02"},{name:"layer_norm_eps",val:": float = 1e-06"},{name:"image_size",val:": int | list[int] | tuple[int, int] = 640"},{name:"patch_size",val:": int | list[int] | tuple[int, int] = 16"},{name:"num_channels",val:": int = 3"},{name:"layerscale_value",val:": float = 1.0"},{name:"drop_path_rate",val:": float | int = 0.0"},{name:"num_upscale_blocks",val:": int = 2"},{name:"attention_dropout",val:": float | int = 0.0"},{name:"num_blocks",val:": int = 4"},{name:"no_object_weight",val:": float = 0.1"},{name:"class_weight",val:": float = 2.0"},{name:"mask_weight",val:": float = 5.0"},{name:"dice_weight",val:": float = 5.0"},{name:"train_num_points",val:": int = 12544"},{name:"oversample_ratio",val:": float = 3.0"},{name:"importance_sample_ratio",val:": float = 0.75"},{name:"num_queries",val:": int = 200"},{name:"num_register_tokens",val:": int = 4"},{name:"intermediate_size",val:": int = 4096"},{name:"rope_parameters",val:": transformers.modeling_rope_utils.RopeParameters | dict | None = None"},{name:"query_bias",val:": bool = True"},{name:"key_bias",val:": bool = False"},{name:"value_bias",val:": bool = True"},{name:"proj_bias",val:": bool = True"},{name:"mlp_bias",val:": bool = True"},{name:"use_gated_mlp",val:": bool = False"},{name:"pos_embed_shift",val:": float | None = None"},{name:"pos_embed_jitter",val:": float | None = None"},{name:"pos_embed_rescale",val:": float | None = 2.0"}],parametersDescription:[{anchor:"transformers.EomtDinov3Config.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>1024</code>) &#x2014;
Dimension of the hidden representations.`,name:"hidden_size"},{anchor:"transformers.EomtDinov3Config.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to <code>24</code>) &#x2014;
Number of hidden layers in the Transformer decoder.`,name:"num_hidden_layers"},{anchor:"transformers.EomtDinov3Config.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to <code>16</code>) &#x2014;
Number of attention heads for each attention layer in the Transformer decoder.`,name:"num_attention_heads"},{anchor:"transformers.EomtDinov3Config.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code>, <em>optional</em>, defaults to <code>gelu</code>) &#x2014;
The non-linear activation function (function or string) in the decoder. For example, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code>, etc.`,name:"hidden_act"},{anchor:"transformers.EomtDinov3Config.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>Union[float, int]</code>, <em>optional</em>, defaults to <code>0.0</code>) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.EomtDinov3Config.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to <code>0.02</code>) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.EomtDinov3Config.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to <code>1e-06</code>) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.EomtDinov3Config.image_size",description:`<strong>image_size</strong> (<code>Union[int, list[int], tuple[int, int]]</code>, <em>optional</em>, defaults to <code>640</code>) &#x2014;
The size (resolution) of each image.`,name:"image_size"},{anchor:"transformers.EomtDinov3Config.patch_size",description:`<strong>patch_size</strong> (<code>Union[int, list[int], tuple[int, int]]</code>, <em>optional</em>, defaults to <code>16</code>) &#x2014;
The size (resolution) of each patch.`,name:"patch_size"},{anchor:"transformers.EomtDinov3Config.num_channels",description:`<strong>num_channels</strong> (<code>int</code>, <em>optional</em>, defaults to <code>3</code>) &#x2014;
The number of input channels.`,name:"num_channels"},{anchor:"transformers.EomtDinov3Config.layerscale_value",description:`<strong>layerscale_value</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
Initial value for the LayerScale parameter.`,name:"layerscale_value"},{anchor:"transformers.EomtDinov3Config.drop_path_rate",description:`<strong>drop_path_rate</strong> (<code>Union[float, int]</code>, <em>optional</em>, defaults to <code>0.0</code>) &#x2014;
Drop path rate for the patch fusion.`,name:"drop_path_rate"},{anchor:"transformers.EomtDinov3Config.num_upscale_blocks",description:`<strong>num_upscale_blocks</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Number of upsampling blocks used in the decoder or segmentation head.`,name:"num_upscale_blocks"},{anchor:"transformers.EomtDinov3Config.attention_dropout",description:`<strong>attention_dropout</strong> (<code>Union[float, int]</code>, <em>optional</em>, defaults to <code>0.0</code>) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.EomtDinov3Config.num_blocks",description:`<strong>num_blocks</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of feature blocks or stages in the architecture.`,name:"num_blocks"},{anchor:"transformers.EomtDinov3Config.no_object_weight",description:`<strong>no_object_weight</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Loss weight for the &#x201C;no object&#x201D; class in panoptic/instance segmentation.`,name:"no_object_weight"},{anchor:"transformers.EomtDinov3Config.class_weight",description:`<strong>class_weight</strong> (<code>float</code>, <em>optional</em>, defaults to <code>2.0</code>) &#x2014;
Relative weight of the classification error in the Hungarian matching cost.`,name:"class_weight"},{anchor:"transformers.EomtDinov3Config.mask_weight",description:`<strong>mask_weight</strong> (<code>float</code>, <em>optional</em>, defaults to <code>5.0</code>) &#x2014;
Relative weight of the focal loss in the panoptic segmentation loss.`,name:"mask_weight"},{anchor:"transformers.EomtDinov3Config.dice_weight",description:`<strong>dice_weight</strong> (<code>float</code>, <em>optional</em>, defaults to <code>5.0</code>) &#x2014;
Relative weight of the dice loss in the panoptic segmentation loss.`,name:"dice_weight"},{anchor:"transformers.EomtDinov3Config.train_num_points",description:`<strong>train_num_points</strong> (<code>int</code>, <em>optional</em>, defaults to 12544) &#x2014;
Number of points to sample for mask loss computation during training.`,name:"train_num_points"},{anchor:"transformers.EomtDinov3Config.oversample_ratio",description:`<strong>oversample_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 3.0) &#x2014;
Oversampling ratio used in point sampling for mask training.`,name:"oversample_ratio"},{anchor:"transformers.EomtDinov3Config.importance_sample_ratio",description:`<strong>importance_sample_ratio</strong> (<code>float</code>, <em>optional</em>, defaults to 0.75) &#x2014;
Ratio of points to sample based on importance during training.`,name:"importance_sample_ratio"},{anchor:"transformers.EomtDinov3Config.num_queries",description:`<strong>num_queries</strong> (<code>int</code>, <em>optional</em>, defaults to 200) &#x2014;
Number of object queries in the Transformer.`,name:"num_queries"},{anchor:"transformers.EomtDinov3Config.num_register_tokens",description:`<strong>num_register_tokens</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Number of learnable register tokens added to the transformer input.`,name:"num_register_tokens"},{anchor:"transformers.EomtDinov3Config.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to <code>4096</code>) &#x2014;
Dimension of the MLP representations.`,name:"intermediate_size"},{anchor:"transformers.EomtDinov3Config.rope_parameters",description:`<strong>rope_parameters</strong> (<code>Union[~modeling_rope_utils.RopeParameters, dict]</code>, <em>optional</em>) &#x2014;
Dictionary containing the configuration parameters for the RoPE embeddings. The dictionary should contain
a value for <code>rope_theta</code> and optionally parameters used for scaling in case you want to use RoPE
with longer <code>max_position_embeddings</code>.`,name:"rope_parameters"},{anchor:"transformers.EomtDinov3Config.query_bias",description:`<strong>query_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use bias in query projection.`,name:"query_bias"},{anchor:"transformers.EomtDinov3Config.key_bias",description:`<strong>key_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use bias in key projection.`,name:"key_bias"},{anchor:"transformers.EomtDinov3Config.value_bias",description:`<strong>value_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use bias in value projection.`,name:"value_bias"},{anchor:"transformers.EomtDinov3Config.proj_bias",description:`<strong>proj_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use bias in output projection.`,name:"proj_bias"},{anchor:"transformers.EomtDinov3Config.mlp_bias",description:`<strong>mlp_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use a bias in up_proj, down_proj and gate_proj layers in the MLP layers.`,name:"mlp_bias"},{anchor:"transformers.EomtDinov3Config.use_gated_mlp",description:`<strong>use_gated_mlp</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to use gated MLP layers.`,name:"use_gated_mlp"},{anchor:"transformers.EomtDinov3Config.pos_embed_shift",description:`<strong>pos_embed_shift</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Shift value for position embeddings.`,name:"pos_embed_shift"},{anchor:"transformers.EomtDinov3Config.pos_embed_jitter",description:`<strong>pos_embed_jitter</strong> (<code>float</code>, <em>optional</em>) &#x2014;
Jitter value for position embeddings.`,name:"pos_embed_jitter"},{anchor:"transformers.EomtDinov3Config.pos_embed_rescale",description:`<strong>pos_embed_rescale</strong> (<code>float</code>, <em>optional</em>, defaults to 2.0) &#x2014;
Rescale value for position embeddings.`,name:"pos_embed_rescale"}]}),r(4),a(i);var T=e(i,2);o(T,{title:"EomtDinov3PreTrainedModel",local:"transformers.EomtDinov3PreTrainedModel",headingTag:"h2"});var l=e(T,2),w=n(l);t(w,{name:"class transformers.EomtDinov3PreTrainedModel",anchor:"transformers.EomtDinov3PreTrainedModel",source:"https://github.com/huggingface/transformers/blob/vr_36708/src/transformers/models/eomt_dinov3/modeling_eomt_dinov3.py#L1061",parameters:[{name:"config",val:": PreTrainedConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.EomtDinov3PreTrainedModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_36708/en/main_classes/configuration#transformers.PreTrainedConfig">PreTrainedConfig</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/pr_36708/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]});var y=e(w,6),U=n(y);t(U,{name:"forward",anchor:"transformers.EomtDinov3PreTrainedModel.forward",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}]}),r(2),a(y),a(l);var E=e(l,2);o(E,{title:"EomtDinov3ForUniversalSegmentation",local:"transformers.EomtDinov3ForUniversalSegmentation",headingTag:"h2"});var d=e(E,2),M=n(d);t(M,{name:"class transformers.EomtDinov3ForUniversalSegmentation",anchor:"transformers.EomtDinov3ForUniversalSegmentation",source:"https://github.com/huggingface/transformers/blob/vr_36708/src/transformers/models/eomt_dinov3/modeling_eomt_dinov3.py#L1168",parameters:[{name:"config",val:": EomtDinov3Config"}],parametersDescription:[{anchor:"transformers.EomtDinov3ForUniversalSegmentation.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_36708/en/model_doc/eomt_dinov3#transformers.EomtDinov3Config">EomtDinov3Config</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/pr_36708/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}]});var D=e(M,8),C=n(D);t(C,{name:"forward",anchor:"transformers.EomtDinov3ForUniversalSegmentation.forward",source:"https://github.com/huggingface/transformers/blob/vr_36708/src/transformers/models/eomt_dinov3/modeling_eomt_dinov3.py#L1232",parameters:[{name:"pixel_values",val:": Tensor"},{name:"mask_labels",val:": list[torch.Tensor] | None = None"},{name:"class_labels",val:": list[torch.Tensor] | None = None"},{name:"patch_offsets",val:": list[torch.Tensor] | None = None"},{name:"**kwargs",val:": *<class 'transformers.utils.generic.TransformersKwargs'>"}],parametersDescription:[{anchor:"transformers.EomtDinov3ForUniversalSegmentation.forward.pixel_values",description:`<strong>pixel_values</strong> (<code>torch.Tensor</code> of shape <code>(batch_size, num_channels, image_size, image_size)</code>) &#x2014;
The tensors corresponding to the input images. Pixel values can be obtained using
<a href="/docs/transformers/pr_36708/en/model_doc/eomt#transformers.EomtImageProcessor">EomtImageProcessor</a>. See <a href="/docs/transformers/pr_36708/en/model_doc/molmo2#transformers.Molmo2ImageProcessor.__call__">EomtImageProcessor.<strong>call</strong>()</a> for details (<code>processor_class</code> uses
<a href="/docs/transformers/pr_36708/en/model_doc/eomt#transformers.EomtImageProcessor">EomtImageProcessor</a> for processing images).`,name:"pixel_values"},{anchor:"transformers.EomtDinov3ForUniversalSegmentation.forward.mask_labels",description:`<strong>mask_labels</strong> (<code>list[torch.Tensor]</code>, <em>optional</em>) &#x2014;
list of mask labels of shape <code>(num_labels, height, width)</code> to be fed to a model`,name:"mask_labels"},{anchor:"transformers.EomtDinov3ForUniversalSegmentation.forward.class_labels",description:`<strong>class_labels</strong> (<code>list[torch.LongTensor]</code>, <em>optional</em>) &#x2014;
list of target class labels of shape <code>(num_labels, height, width)</code> to be fed to a model. They identify the
labels of <code>mask_labels</code>, e.g. the label of <code>mask_labels[i][j]</code> if <code>class_labels[i][j]</code>.`,name:"class_labels"},{anchor:"transformers.EomtDinov3ForUniversalSegmentation.forward.patch_offsets",description:`<strong>patch_offsets</strong> (<code>list[torch.Tensor]</code>, <em>optional</em>) &#x2014;
list of tuples indicating the image index and start and end positions of patches for semantic segmentation.`,name:"patch_offsets"}],returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>
<p>A <code>EomtDinov3ForUniversalSegmentationOutput</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/pr_36708/en/model_doc/eomt_dinov3#transformers.EomtDinov3Config"
>EomtDinov3Config</a>) and inputs.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>
<p><code>EomtDinov3ForUniversalSegmentationOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`});var j=e(C,4);X(j,{children:(s,c)=>{var F=G();m(s,F)},$$slots:{default:!0}}),r(2),a(D),a(d);var z=e(d,2);S(z,{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/eomt_dinov3.md"}),r(2),m(x,h),V()}export{$ as component};

Xet Storage Details

Size:
30.2 kB
·
Xet hash:
b340783a4ee576ae9712038d43985e2e439a5ca9e9717015e840fc0380c451bc

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.