# Image size understanding in DinoV2

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimage-size-understanding-in-dinov2%2F65529%3E%5C
**Category:** 🤗Transformers\
**Created:** [December 12, 2023, 2:05pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimage-size-understanding-in-dinov2%2F65529 "2023-12-12T14:05:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lombardata](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/lombardata/32/18464_2.png) [@lombardata](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flombardata)%5C
**Post date:** [December 12, 2023, 2:05pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimage-size-understanding-in-dinov2%2F65529%2F1 "2023-12-12T14:05:23Z")

</div>

Hi everyone,  
I was playing with Dinov2 model of the transformers library of HF and I have a question.  
If I change the image\_size in the config.json file, than this will change the real input image size of the model or will be changed after by the parameters of the preprocessor\_config.json?  
I tried training a model here :

> **[lombardata/dino-large-2023\_12\_08-with\_custom\_head-imgsize1036 · Hugging Face](https://huggingface.co/lombardata/dino-large-2023_12_08-with_custom_head-imgsize1036)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

and I changed the input image size (from 518 to 1036). But then I saw that the “crop\_size” parameter in the preprocessing file is still: {“height”: 224,“width”: 224}. Is useless to change img size if the crop\_size is unchanged?  
What would be the best practice in order to fill the entire image to the model?  
Thank you all in advance !

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fnielsr)%5C
**Post date:** [December 21, 2023, 10:12am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimage-size-understanding-in-dinov2%2F65529%2F2 "2023-12-21T10:12:37Z")

</div>

This question was answered here: [Image size understanding in DinoV2 and Transformers generally · Issue #27977 · huggingface/transformers · GitHub](https://github.com/huggingface/transformers/issues/27977#issuecomment-1852623838)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [January 5, 2024, 10:59am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fimage-size-understanding-in-dinov2%2F65529%2F3 "2024-01-05T10:59:22Z")

</div>

Closed on January 5, 2024, 10:59am UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
