# Vision Transformer reconstruct image

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fvision-transformer-reconstruct-image%2F18238%3E%5C
**Category:** 🤗Transformers\
**Created:** [May 22, 2022, 5:30pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fvision-transformer-reconstruct-image%2F18238 "2022-05-22T17:30:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcomameli01](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@marcomameli01](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmarcomameli01)%5C
**Post date:** [May 22, 2022, 5:30pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fvision-transformer-reconstruct-image%2F18238%2F1 "2022-05-22T17:30:54Z")

</div>

Dear,  
from the output of a ViT how I can reconstruct an image of features like the output of a CNN?

I need this kind of representation for a network that uses that representation for the information information.

---

<div class="post-metadata">

**Author:** ![marcomameli01](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@marcomameli01](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmarcomameli01)%5C
**Post date:** [July 21, 2022, 7:23am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fvision-transformer-reconstruct-image%2F18238%2F2 "2022-07-21T07:23:52Z")

</div>

Hello,  
I need to obtain an output like the features images in the video of that image

 ![attention_maps](https://us1.discourse-cdn.com/hellohellohello/original/2X/c/c0bad13471baed783691c956a8193598bbf78245.jpeg)  
to use that image as input for another piece of the network.

---

<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:** [July 21, 2022, 11:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fvision-transformer-reconstruct-image%2F18238%2F3 "2022-07-21T11:19:45Z")

</div>

Hi,

See my notebook here: [Transformers-Tutorials/Visualize\_self\_attention\_of\_DINO.ipynb at master · NielsRogge/Transformers-Tutorials · GitHub](https://github.com/NielsRogge/Transformers-Tutorials/blob/master/DINO/Visualize_self_attention_of_DINO.ipynb).
